| Conditions | 5 |
| Paths | 7 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 5 |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | 4 | private function constructEntityPages( array $entityPagesData ) { |
|
| 35 | 4 | $entityPages = []; |
|
| 36 | |||
| 37 | 4 | foreach ( $entityPagesData as $key => $entityPageData ) { |
|
| 38 | 4 | $isActualEntity = array_key_exists( 'id', $entityPageData ) |
|
| 39 | 4 | && $entityPageData['id'] === $key |
|
| 40 | 4 | && !array_key_exists( 'missing', $entityPageData ); |
|
| 41 | |||
| 42 | 4 | if ( $isActualEntity ) { |
|
| 43 | 4 | $entityPages[] = $this->constructEntityPage( $entityPageData ); |
|
| 44 | } |
||
| 45 | } |
||
| 46 | |||
| 47 | 4 | return $entityPages; |
|
| 48 | } |
||
| 49 | |||
| 61 |