Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
23 | 20 | public function __construct( \PDO $pdo, $table = null ) |
|
24 | { |
||
25 | 20 | $this->table = $table ?: $this->table; |
|
26 | |||
27 | // ID is listed twice here in order to use it with FETCH_UNIQUE as array key |
||
28 | $sql = "SELECT |
||
29 | role_id |
||
30 | 20 | FROM {$this->table} |
|
31 | 4 | WHERE client_id = :user_id"; |
|
32 | |||
33 | // Store for later use |
||
34 | 20 | $this->stmt = $pdo->prepare( $sql ); |
|
|
|||
35 | 20 | } |
|
36 | |||
56 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..