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.

Column::getMapping()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Sofa\Eloquence\Searchable;
4
5
use Illuminate\Database\Grammar;
6
7
class Column
8
{
9
    /** @var Grammar */
10
    protected $grammar;
11
12
    /** @var string */
13
    protected $table;
14
15
    /** @var string */
16
    protected $name;
17
18
    /** @var string */
19
    protected $mapping;
20
21
    /** @var int */
22
    protected $weight;
23
24
    /**
25
     * Create new searchable column instance.
26
     *
27
     * @param string  $table
28
     * @param string  $name
29
     * @param string  $mapping
30
     * @param int $weight
31
     */
32
    public function __construct(Grammar $grammar, $table, $name, $mapping, $weight = 1)
33
    {
34
        $this->grammar = $grammar;
35
        $this->table = $table;
36
        $this->name = $name;
37
        $this->mapping = $mapping;
38
        $this->weight = $weight;
39
    }
40
41
    /**
42
     * Get qualified name wrapped by the grammar.
43
     *
44
     * @return string
45
     */
46
    public function getWrapped()
47
    {
48
        return $this->grammar->wrap($this->getQualifiedName());
49
    }
50
51
    /**
52
     * Get column name with table prefix.
53
     *
54
     * @return string
55
     */
56
    public function getQualifiedName()
57
    {
58
        return $this->getTable() . '.' . $this->getName();
59
    }
60
61
    /**
62
     * @return string
63
     */
64
    public function getTable()
65
    {
66
        return $this->table;
67
    }
68
69
    /**
70
     * @return string
71
     */
72
    public function getName()
73
    {
74
        return $this->name;
75
    }
76
77
    /**
78
     * @return string
79
     */
80
    public function getMapping()
81
    {
82
        return $this->mapping;
83
    }
84
85
    /**
86
     * @return int
87
     */
88
    public function getWeight()
89
    {
90
        return $this->weight;
91
    }
92
}
93