| Conditions | 6 | 
| Paths | 5 | 
| Total Lines | 17 | 
| Code Lines | 9 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 25 | public function enterBlock(Block $block)  | 
            ||
| 26 |     { | 
            ||
| 27 | $childrens = $block->getChildrens();  | 
            ||
| 28 |         if ($childrens) { | 
            ||
| 
                                                                                                    
                        
                         | 
                |||
| 29 | $childrensCount = count($childrens);  | 
            ||
| 30 |             if ($childrensCount <= 1) { | 
            ||
| 31 | return;  | 
            ||
| 32 | }  | 
            ||
| 33 | |||
| 34 |             foreach ($childrens as $index => $children) { | 
            ||
| 35 | // Check that exit node is not the latest  | 
            ||
| 36 |                 if ($children->willExit() && ($index + 1) != $childrensCount) { | 
            ||
| 37 | echo 'Unreacheable block ' . $block->getId() . PHP_EOL;  | 
            ||
| 38 | }  | 
            ||
| 39 | }  | 
            ||
| 40 | }  | 
            ||
| 41 | }  | 
            ||
| 42 | |||
| 57 | 
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using
empty(..)or! empty(...)instead.