| Total Complexity | 4 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | trait AssertDatabase |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Assert that an array of records exists in the database. |
||
| 11 | * |
||
| 12 | * @param Model|string $table |
||
| 13 | * @param array[] $records |
||
| 14 | */ |
||
| 15 | protected function assertDatabaseHasMany($table, array $records) |
||
| 16 | { |
||
| 17 | foreach ($records as $data) { |
||
| 18 | $this->assertDatabaseHas($table, $data); |
||
|
|
|||
| 19 | } |
||
| 20 | } |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Assert that an array of records is missing in the database. |
||
| 24 | * |
||
| 25 | * @param Model|string $table |
||
| 26 | * @param array[] $records |
||
| 27 | */ |
||
| 28 | protected function assertDatabaseMissingMany($table, array $records) |
||
| 32 | } |
||
| 33 | } |
||
| 35 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.