TableConverter::setTable()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
namespace Pumpkin\Database\TableConverter;
3
4
use Pumpkin\Database\ITableConverter;
5
use Pumpkin\Database\Table;
6
7
/**
8
 * Class BaseConverter
9
 * @package Pumpkin\Database\Converter
10
 * @author Raphaël Lefebvre <[email protected]>
11
 */
12
abstract class TableConverter implements ITableConverter
0 ignored issues
show
Coding Style introduced by
TableConverter does not seem to conform to the naming convention (^Abstract|Factory$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
13
{
14
15
    /**
16
     * @var Table
17
     */
18
    private $table;
19
20
    /**
21
     * Constructor.
22
     *
23
     * @param Table $table
24
     */
25 5
    public function __construct(Table $table)
26
    {
27 5
        $this->setTable($table);
28 5
    }
29
30
    /**
31
     * Getter of $table
32
     *
33
     * @return Table
34
     */
35 4
    public function getTable()
36
    {
37 4
        return $this->table;
38
    }
39
40
    /**
41
     * Setter of $table
42
     *
43
     * @param Table $table
44
     */
45 5
    private function setTable(Table $table)
46
    {
47 5
        $this->table = $table;
48 5
    }
49
}
50