| Total Complexity | 3 |
| Total Lines | 45 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | class Result implements ResultInterface |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * @var \Illuminate\Database\Connection |
||
| 20 | */ |
||
| 21 | protected $connection; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @var \Illuminate\Database\Eloquent\Model |
||
| 25 | */ |
||
| 26 | protected $model; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Executes an SQL statement with its bindings and types. |
||
| 30 | * |
||
| 31 | * @param string $sql |
||
| 32 | * @param array $bindings |
||
| 33 | * @param array $types |
||
| 34 | * @return mixed |
||
| 35 | */ |
||
| 36 | public function execute($sql, array $parameters, array $types) |
||
| 37 | { |
||
| 38 | $connection = $this->model->getConnection(); |
||
| 39 | |||
| 40 | $type = (string) strtolower(substr($sql, 0, 6)); |
||
| 41 | |||
| 42 | $result = $connection->$type($sql, $parameters); |
||
| 43 | |||
| 44 | if (is_array($result) === false) |
||
| 45 | { |
||
| 46 | return $result; |
||
| 47 | } |
||
| 48 | |||
| 49 | return $this->model->hydrate($result); |
||
| 50 | } |
||
| 51 | |||
| 52 | /** |
||
| 53 | * Sets the Eloquent model to be used. |
||
| 54 | * |
||
| 55 | * @param \Illuminate\Database\Eloquent\Model $model |
||
| 56 | * @return self |
||
| 57 | */ |
||
| 58 | public function model(Model $model) |
||
| 61 | } |
||
| 62 | } |
||
| 63 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths