| Conditions | 3 | 
| Paths | 3 | 
| Total Lines | 12 | 
| Code Lines | 6 | 
| Lines | 7 | 
| Ratio | 58.33 % | 
| Tests | 9 | 
| CRAP Score | 3 | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php  | 
            ||
| 44 | 9 | public function __construct($path)  | 
            |
| 45 |     { | 
            ||
| 46 | 9 | $this->path = $path;  | 
            |
| 
                                                                                                    
                        
                         | 
                |||
| 47 | |||
| 48 | 9 | View Code Duplication |         for ($i = 0; $i < 100; ++$i) { | 
            
| 49 | 9 | $segment = $path.'/'.sprintf($this->segmentName, $i);  | 
            |
| 50 | |||
| 51 | 9 |             if (file_exists($segment)) { | 
            |
| 52 | 9 | $this->segments[] = (array) include $segment;  | 
            |
| 53 | 9 | }  | 
            |
| 54 | 9 | }  | 
            |
| 55 | 9 | }  | 
            |
| 56 | |||
| 87 | 
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: