Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
36 | public static function missPrimaryKeyRecord(string $tableName, array $primaryKeys, string $className, Exception $previous) : self |
||
37 | { |
||
38 | $primaryKeysStringified = implode(' and ', array_map(function ($key, $value) { |
||
39 | return "'".$key."' = ".$value; |
||
40 | }, array_keys($primaryKeys), $primaryKeys)); |
||
41 | $exception = new self("No result found for query on table '".$tableName."' for ".$primaryKeysStringified, 0, $previous); |
||
42 | $exception->tableName = $tableName; |
||
43 | $exception->primaryKeys = $primaryKeys; |
||
44 | $exception->className = $className; |
||
45 | |||
46 | return $exception; |
||
47 | } |
||
78 |