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-13 lines in 5 locations

tests/Unit/CrudPanel/CrudPanelCreateTest.php 5 locations

@@ 159-171 (lines=13) @@
156
        $this->assertEntryEquals($inputData, $entry);
157
    }
158
159
    public function testGetRelationFields()
160
    {
161
        $this->markTestIncomplete('Not correctly implemented');
162
163
        $this->crudPanel->setModel(User::class);
164
        $this->crudPanel->addFields($this->userInputFieldsManyToMany, 'create');
165
166
        // TODO: fix method and documentation. when 'both' is passed as the $form value, the getRelationFields searches
167
        //       for relationship fields in the update fields.
168
        $relationFields = $this->crudPanel->getRelationFields('both');
169
170
        $this->assertEquals($this->crudPanel->create_fields['roles'], array_last($relationFields));
171
    }
172
173
    public function testGetRelationFieldsCreateForm()
174
    {
@@ 173-181 (lines=9) @@
170
        $this->assertEquals($this->crudPanel->create_fields['roles'], array_last($relationFields));
171
    }
172
173
    public function testGetRelationFieldsCreateForm()
174
    {
175
        $this->crudPanel->setModel(User::class);
176
        $this->crudPanel->addFields($this->userInputFieldsManyToMany, 'create');
177
178
        $relationFields = $this->crudPanel->getRelationFields('create');
179
180
        $this->assertEquals($this->crudPanel->create_fields['roles'], array_last($relationFields));
181
    }
182
183
    public function testGetRelationFieldsUpdateForm()
184
    {
@@ 183-191 (lines=9) @@
180
        $this->assertEquals($this->crudPanel->create_fields['roles'], array_last($relationFields));
181
    }
182
183
    public function testGetRelationFieldsUpdateForm()
184
    {
185
        $this->crudPanel->setModel(User::class);
186
        $this->crudPanel->addFields($this->userInputFieldsManyToMany, 'update');
187
188
        $relationFields = $this->crudPanel->getRelationFields('update');
189
190
        $this->assertEquals($this->crudPanel->update_fields['roles'], array_last($relationFields));
191
    }
192
193
    public function testGetRelationFieldsUnknownForm()
194
    {
@@ 207-215 (lines=9) @@
204
        $this->crudPanel->getRelationFields('unknownForm');
205
    }
206
207
    public function testGetRelationFieldsDotNotation()
208
    {
209
        $this->crudPanel->setModel(User::class);
210
        $this->crudPanel->addFields($this->userInputFieldsDotNotation, 'create');
211
212
        $relationFields = $this->crudPanel->getRelationFields('create');
213
214
        $this->assertEquals($this->crudPanel->create_fields['street'], array_last($relationFields));
215
    }
216
217
    public function testGetRelationFieldsNoRelations()
218
    {
@@ 233-241 (lines=9) @@
230
        $this->assertEmpty($relationFields);
231
    }
232
233
    public function testGetRelationFieldsWithPivot()
234
    {
235
        $this->crudPanel->setModel(User::class);
236
        $this->crudPanel->addFields($this->userInputFieldsDotNotation, 'create');
237
238
        $relationFields = $this->crudPanel->getRelationFieldsWithPivot('create');
239
240
        $this->assertEquals($this->crudPanel->create_fields['roles'], array_last($relationFields));
241
    }
242
243
    public function testGetRelationFieldsWithPivotNoRelations()
244
    {