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.

Code Duplication    Length = 23-25 lines in 3 locations

application/models/PropertyGroup.php 1 location

@@ 124-147 (lines=24) @@
121
     * @param int $id
122
     * @return null|PropertyGroup
123
     */
124
    public static function findById($id)
125
    {
126
        if (!isset(static::$identity_map[$id])) {
127
            $cacheKey = "PropertyGroup:$id";
128
            if (false === $group = Yii::$app->cache->get($cacheKey)) {
129
                if (null !== $group = static::findOne($id)) {
130
                    Yii::$app->cache->set(
131
                        $cacheKey,
132
                        $group,
133
                        0,
134
                        new TagDependency(
135
                            [
136
                                'tags' => [
137
                                    ActiveRecordHelper::getObjectTag(static::className(), $id),
138
                                ],
139
                            ]
140
                        )
141
                    );
142
                }
143
            }
144
            static::$identity_map[$id] = $group;
145
        }
146
        return static::$identity_map[$id];
147
    }
148
149
    /**
150
     * Relation to properties

application/models/SliderHandler.php 1 location

@@ 65-89 (lines=25) @@
62
    * @param string $id
63
    * @return SliderHandler|null
64
    */
65
    public static function findBySliderId($id)
66
    {
67
        if (!isset(SliderHandler::$identity_map[$id])) {
68
            $cacheKey = SliderHandler::tableName().":$id";
69
            if (false === $model = Yii::$app->cache->get($cacheKey)) {
70
                $model = SliderHandler::findById($id);
71
72
                if (null !== $model) {
73
                    Yii::$app->cache->set(
74
                        $cacheKey,
75
                        $model,
76
                        86400,
77
                        new \yii\caching\TagDependency([
78
                            'tags' => [
79
                                ActiveRecordHelper::getObjectTag($model, $model->id)
80
                            ]
81
                        ])
82
                    );
83
                }
84
            }
85
            static::$identity_map[$id] = $model;
86
        }
87
88
        return static::$identity_map[$id];
89
    }
90
91
}
92

application/models/Property.php 1 location

@@ 211-233 (lines=23) @@
208
     * @param int $id
209
     * @return null|Property
210
     */
211
    public static function findById($id)
212
    {
213
        if (!isset(static::$identity_map[$id])) {
214
            $cacheKey = "Property:$id";
215
            if (false === $prop = Yii::$app->cache->get($cacheKey)) {
216
                if (null === $prop = static::findOne($id)) {
217
                    return null;
218
                }
219
                Yii::$app->cache->set(
220
                    $cacheKey,
221
                    $prop,
222
                    0,
223
                    new TagDependency([
224
                        'tags' => [
225
                            ActiveRecordHelper::getObjectTag($prop, $id)
226
                        ],
227
                    ])
228
                );
229
            }
230
            static::$identity_map[$id] = $prop;
231
        }
232
        return static::$identity_map[$id];
233
    }
234
235
    /**
236
     * @param $group_id