Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Code Duplication    Length = 9-9 lines in 2 locations

src/ToneCrud.php 1 location

@@ 41-49 (lines=9) @@
38
        $this->initState();
39
    }
40
41
    public function setModel($model)
42
    {
43
        if (!class_exists($model)) throw new \Exception('This model does not exist.', 404);
44
45
        $this->model = new $model();
46
        $this->query = $this->model->select('*');
47
48
        $this->initEntities();
49
    }
50
51
    public function getModel()
52
    {

src/Crud.php 1 location

@@ 483-491 (lines=9) @@
480
     *
481
     * @param [string] Full model namespace. Ex: App\Models\Article
482
     */
483
    public function setModel($model_namespace)
484
    {
485
        if (!class_exists($model_namespace)) throw new \Exception('This model does not exist.', 404);
486
487
        $this->model = new $model_namespace();
488
        $this->query = $this->model->select('*');
489
490
        // $this->setFromDb(); // i think that, by default, the auto-fields functionality should be disabled; otherwise, the workflow changes from "set the fields i need" to "update this crud with whatever i need"; which i personally don't like, because it's more hacky and it assumes you should see what the default offers you, then adapt; I propose we set wether the auto-fields functionality is run for panels with a config variable; the config file should be backpack/crud.php and the variable name should be "autoSetFromDb".
491
    }
492
493
    /**
494
     * Get the corresponding Eloquent Model for the CrudController, as defined with the setModel() function;