PHPIDS
Current file: /home/mario/workspace/php-ids.org/trunk/lib/IDS/vendors/htmlpurifier/HTMLPurifier/AttrDef/HTML/Bool.php
Legend: executed not executed dead code

  Coverage
  Classes Methods Lines
Total
100.00 %100.00%
100.00% 1 / 1
33.33 %33.33%
33.33% 1 / 3
75.00 %75.00%
75.00% 3 / 4
 
HTMLPurifier_AttrDef_HTML_Bool
100.00 %100.00%
100.00% 1 / 1
33.33 %33.33%
33.33% 1 / 3
75.00 %75.00%
75.00% 3 / 4
 public function __construct($name = false)
0.00 %0.00%
0.00% 0 / 1
100.00 %100.00%
100.00% 0 / 0
 public function validate($string, $config, $context)
100.00 %100.00%
100.00% 1 / 1
100.00 %100.00%
100.00% 2 / 2
 public function make($string)
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 1


       1                 : <?php                                                                
       2                 :                                                                      
       3                 : /**                                                                  
       4                 :  * Validates a boolean attribute                                     
       5                 :  */                                                                  
       6               1 : class HTMLPurifier_AttrDef_HTML_Bool extends HTMLPurifier_AttrDef    
       7                 : {                                                                    
       8                 :                                                                      
       9                 :     protected $name;                                                 
      10                 :     public $minimized = true;                                        
      11                 :                                                                      
      12                 :     public function __construct($name = false) {$this->name = $name;}
      13                 :                                                                      
      14                 :     public function validate($string, $config, $context) {           
      15               2 :         if (empty($string)) return false;                            
      16               2 :         return $this->name;                                          
      17                 :     }                                                                
      18                 :                                                                      
      19                 :     /**                                                              
      20                 :      * @param $string Name of attribute                              
      21                 :      */                                                              
      22                 :     public function make($string) {                                  
      23               0 :         return new HTMLPurifier_AttrDef_HTML_Bool($string);          
      24                 :     }                                                                
      25                 :                                                                      
      26                 : }                                                                    
      27                 :                                                                      

Generated by PHPUnit 3.3.1 and Xdebug 2.0.2 at Thu Sep 25 18:42:10 CEST 2008.