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 = 12-12 lines in 2 locations

src/Form/Element/SelectAjax.php 1 location

@@ 22-33 (lines=12) @@
19
     * @param string|null $label
20
     * @param array|Model $options
21
     */
22
    public function __construct($path, $label = null, $options = [])
23
    {
24
        parent::__construct($path, $label);
25
26
        $this->setLoadOptionsQueryPreparer(function ($item, $query) {
27
            $repository = app(RepositoryInterface::class);
28
            $repository->setModel($this->getModelForOptions());
29
            $key = $repository->getModel()->getKeyName();
30
31
            return $query->where([$key => $this->getValueFromModel()]);
32
        });
33
    }
34
35
    /**
36
     * @param Router $router

src/Form/Element/MultiSelectAjax.php 1 location

@@ 29-40 (lines=12) @@
26
     * @param null $label
27
     * @param array $options
28
     */
29
    public function __construct($path, $label = null, $options = [])
30
    {
31
        parent::__construct($path, $label, $options);
32
33
        $this->setLoadOptionsQueryPreparer(function ($item, $query) {
34
            $repository = app(RepositoryInterface::class);
35
            $repository->setModel($this->getModelForOptions());
36
            $key = $repository->getModel()->getKeyName();
37
38
            return $query->whereIn($key, $this->getValueFromModel() ? $this->getValueFromModel() : []);
39
        });
40
    }
41
42
    /**
43
     * Get Field name for search url.