Table::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
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