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

  Coverage
  Classes Methods Lines
Total
100.00 %100.00%
100.00% 1 / 1
40.00 %40.00%
40.00% 2 / 5
35.71 %35.71%
35.71% 5 / 14
 
HTMLPurifier_DefinitionCache_Decorator_Cleanup
100.00 %100.00%
100.00% 1 / 1
40.00 %40.00%
40.00% 2 / 5
35.71 %35.71%
35.71% 5 / 14
 public function copy()
100.00 %100.00%
100.00% 1 / 1
100.00 %100.00%
100.00% 1 / 1
 public function add($def, $config)
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 3
 public function set($def, $config)
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 3
 public function replace($def, $config)
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 3
 public function get($config)
100.00 %100.00%
100.00% 1 / 1
100.00 %100.00%
100.00% 3 / 3


       1                 : <?php                                                               
       2                 :                                                                     
       3                 : /**                                                                 
       4                 :  * Definition cache decorator class that cleans up the cache        
       5                 :  * whenever there is a cache miss.                                  
       6                 :  */                                                                 
       7                 : class HTMLPurifier_DefinitionCache_Decorator_Cleanup extends        
       8               1 :       HTMLPurifier_DefinitionCache_Decorator                        
       9                 : {                                                                   
      10                 :                                                                     
      11                 :     public $name = 'Cleanup';                                       
      12                 :                                                                     
      13                 :     public function copy() {                                        
      14               1 :         return new HTMLPurifier_DefinitionCache_Decorator_Cleanup();
      15                 :     }                                                               
      16                 :                                                                     
      17                 :     public function add($def, $config) {                            
      18               0 :         $status = parent::add($def, $config);                       
      19               0 :         if (!$status) parent::cleanup($config);                     
      20               0 :         return $status;                                             
      21                 :     }                                                               
      22                 :                                                                     
      23                 :     public function set($def, $config) {                            
      24               0 :         $status = parent::set($def, $config);                       
      25               0 :         if (!$status) parent::cleanup($config);                     
      26               0 :         return $status;                                             
      27                 :     }                                                               
      28                 :                                                                     
      29                 :     public function replace($def, $config) {                        
      30               0 :         $status = parent::replace($def, $config);                   
      31               0 :         if (!$status) parent::cleanup($config);                     
      32               0 :         return $status;                                             
      33                 :     }                                                               
      34                 :                                                                     
      35                 :     public function get($config) {                                  
      36               2 :         $ret = parent::get($config);                                
      37               2 :         if (!$ret) parent::cleanup($config);                        
      38               2 :         return $ret;                                                
      39                 :     }                                                               
      40                 :                                                                     
      41                 : }                                                                   
      42                 :                                                                     

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