| Total Complexity | 5 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Coverage | 91.67% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | class DataSetHolder |
||
| 12 | { |
||
| 13 | public RecordSet $data; |
||
| 14 | |||
| 15 | private array $dataAdapters = []; |
||
| 16 | |||
| 17 | private Connection $connection; |
||
| 18 | |||
| 19 | public function __construct(Connection $connection) |
||
| 20 | { |
||
| 21 | $this->connection = $connection; |
||
| 22 | 3 | $this->data = new RecordSet(); |
|
| 23 | } |
||
| 24 | 3 | ||
| 25 | 3 | public function fillData( |
|
| 26 | 3 | string $query, |
|
| 27 | string $tableName, |
||
| 28 | 3 | array $params = [] |
|
|
|
|||
| 29 | ): void { |
||
| 30 | if (array_key_exists($tableName, $this->dataAdapters)) { |
||
| 31 | throw new MultipleLoadException(); |
||
| 32 | } |
||
| 33 | 3 | $da = new DbDataAdapter($query, $this->connection); |
|
| 34 | $da->fill($this->data, $tableName); |
||
| 35 | $this->dataAdapters[$tableName] = $da; |
||
| 36 | 3 | } |
|
| 37 | 3 | ||
| 38 | 3 | public function update(): void |
|
| 42 | } |
||
| 43 | 1 | } |
|
| 44 | } |
||
| 45 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.