| Conditions | 4 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 4.0466 |
| Changes | 0 | ||
| 1 | <?php |
||
| 43 | 9 | private function isAtLeastOneSnippetHasNeededTable($tableName, array $snippets): bool |
|
| 44 | { |
||
| 45 | 9 | foreach($snippets as $snippet) |
|
| 46 | { |
||
| 47 | 9 | if(! $snippet instanceof NeedTableAware) |
|
| 48 | { |
||
| 49 | throw new \LogicException('Snippet has not expected NeedTableAware type'); |
||
| 50 | } |
||
| 51 | |||
| 52 | 9 | if($snippet->hasNeededTable($tableName)) |
|
| 53 | { |
||
| 54 | 6 | return true; |
|
| 55 | } |
||
| 56 | } |
||
| 57 | |||
| 58 | 3 | return false; |
|
| 59 | } |
||
| 60 | } |
||
| 61 |