Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
1 | <?php |
||
11 | public function getImagesForSeo() { |
||
12 | $result = new ArrayList(); |
||
13 | $pwis = $this->owner->AllChildren()->where("ClassName in ( |
||
14 | 'PageWithImage','PageWithImagesFolder')"); |
||
15 | foreach ($pwis->getIterator() as $pwi) { |
||
16 | if ($pwi->MainImageID > 0) { |
||
17 | $result->push($pwi->MainImage()); |
||
18 | } |
||
19 | } |
||
20 | return $result; |
||
21 | } |
||
22 | |||
33 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.