GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

DecimalColumn::getPrecision()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 1 Features 1
Metric Value
c 2
b 1
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Rentgen\Database\Column;
4
5
use Rentgen\Database\Column;
6
7
class DecimalColumn extends Column
8
{
9
    private $precision;
10
    private $scale = 0;
11
12
    /**
13
     * {@inheritdoc}
14
     */
15
    public function __construct($name, array $options = array())
16
    {
17
        parent::__construct($name, $options);
18
19
        if (array_key_exists('precision', $options)) {
20
            $this->precision = $options['precision'];
21
            if (array_key_exists('scale', $options)) {
22
                $this->scale = $options['scale'];
23
            }
24
        }
25
    }
26
27
    /**
28
     * Gets a number precision.
29
     *
30
     * @return integer
31
     */
32
    public function getPrecision()
33
    {
34
        return $this->precision;
35
    }
36
37
    /**
38
     * Gets a number scale.
39
     *
40
     * @return integer
41
     */
42
    public function getScale()
43
    {
44
        return $this->scale;
45
    }
46
47
    /**
48
     * {@inheritdoc}
49
     */
50
    public function getType()
51
    {
52
        return 'decimal';
53
    }
54
}
55