| Conditions | 3 |
| Paths | 4 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 50 | 10 | public function __construct(\PDO $pdo, LoggerInterface $logger = null, $table = null) |
|
| 51 | { |
||
| 52 | // Setup |
||
| 53 | 10 | $this->table = $table ?: $this->table; |
|
| 54 | 10 | $this->logger = $logger ?: new NullLogger; |
|
| 55 | |||
| 56 | // Prepare business |
||
| 57 | 10 | $sql = "INSERT INTO {$this->table} |
|
| 58 | (client_id, role_id) |
||
| 59 | 2 | VALUES (:client_id, :role_id)"; |
|
| 60 | |||
| 61 | 10 | $this->stmt = $pdo->prepare( $sql ); |
|
|
|
|||
| 62 | 10 | } |
|
| 63 | |||
| 95 |
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..