Table   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Test Coverage

Coverage 80%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 26
ccs 8
cts 10
cp 0.8
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A load() 0 3 1
A select() 0 3 1
A getRows() 0 3 1
A __construct() 0 3 1
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace BasePatterns\RecordSet;
6
7
class Table
8
{
9
    private string $tableName;
10
11
    private array $rows = [];
12
13
    private array $columns = [];
0 ignored issues
show
introduced by
The private property $columns is not used, and could be removed.
Loading history...
14
15 4
    public function __construct(string $tableName)
16
    {
17 4
        $this->tableName = $tableName;
18 4
    }
19
20
    public function select(string $filter): array
0 ignored issues
show
Unused Code introduced by
The parameter $filter is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

20
    public function select(/** @scrutinizer ignore-unused */ string $filter): array

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
21
    {
22
        return [];
23
    }
24 4
25
    public function getRows(): array
26 4
    {
27
        return $this->rows;
28
    }
29 4
30
    public function load(array $rows)
31 4
    {
32 4
        $this->rows = $rows;
33
    }
34
}
35