Code Duplication    Length = 8-8 lines in 2 locations

controllers/Reservations.php 2 locations

@@ 122-129 (lines=8) @@
119
     *
120
     * @return string|null
121
     */
122
    private function getStateColor($ident)
123
    {
124
        if ($this->stateColors === null) {
125
            $this->stateColors = Status::lists('color', 'ident');
126
        }
127
128
        return isset($this->stateColors[$ident]) ? $this->stateColors[$ident] : null;
129
    }
130
131
    /**
132
     * Get name by state ident.
@@ 138-145 (lines=8) @@
135
     *
136
     * @return string|null
137
     */
138
    private function getStateName($ident)
139
    {
140
        if ($this->stateNames === null) {
141
            $this->stateNames = Status::lists('name', 'ident');
142
        }
143
144
        return isset($this->stateNames[$ident]) ? $this->stateNames[$ident] : null;
145
    }
146
}
147