| Conditions | 4 |
| Paths | 6 |
| Total Lines | 17 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 4 |
| 1 | <?php |
||
| 23 | 1 | public function InlineGalleries() |
|
| 24 | { |
||
| 25 | 1 | $result = new ArrayList(); |
|
| 26 | |||
| 27 | // find child galleries |
||
| 28 | 1 | foreach ($this->owner->AllChildren() as $child) { |
|
| 29 | 1 | if ($child->ClassName == 'GalleryPage') { |
|
| 30 | 1 | $result->push($child); |
|
| 31 | 1 | } |
|
| 32 | 1 | } |
|
| 33 | |||
| 34 | 1 | if ($this->owner->AttachedGalleryID != 0) { |
|
| 35 | 1 | $result->push($this->owner->AttachedGallery()); |
|
| 36 | 1 | } |
|
| 37 | |||
| 38 | 1 | return $result; |
|
| 39 | } |
||
| 40 | } |
||
| 41 |
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.