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