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 = 14-14 lines in 9 locations

tests/Unit/CrudPanel/CrudPanelFieldsTest.php 9 locations

@@ 282-295 (lines=14) @@
279
        $this->assertEmpty($this->crudPanel->create_fields);
280
    }
281
282
    public function testBeforeField()
283
    {
284
        $this->crudPanel->addFields($this->threeTextFieldsArray);
285
286
        $this->crudPanel->beforeField('field2');
287
288
        $createKeys = array_keys($this->crudPanel->create_fields);
289
        $this->assertEquals($this->expectedThreeTextFieldsArray['field3'], $this->crudPanel->create_fields[$createKeys[1]]);
290
        $this->assertEquals(['field1', 'field3', 'field2'], $createKeys);
291
292
        $updateKeys = array_keys($this->crudPanel->update_fields);
293
        $this->assertEquals($this->expectedThreeTextFieldsArray['field3'], $this->crudPanel->update_fields[$updateKeys[1]]);
294
        $this->assertEquals(['field1', 'field3', 'field2'], $updateKeys);
295
    }
296
297
    public function testBeforeFieldFirstField()
298
    {
@@ 297-310 (lines=14) @@
294
        $this->assertEquals(['field1', 'field3', 'field2'], $updateKeys);
295
    }
296
297
    public function testBeforeFieldFirstField()
298
    {
299
        $this->crudPanel->addFields($this->threeTextFieldsArray);
300
301
        $this->crudPanel->beforeField('field1');
302
303
        $createKeys = array_keys($this->crudPanel->create_fields);
304
        $this->assertEquals($this->expectedThreeTextFieldsArray['field3'], $this->crudPanel->create_fields[$createKeys[0]]);
305
        $this->assertEquals(['field3', 'field1', 'field2'], $createKeys);
306
307
        $updateKeys = array_keys($this->crudPanel->update_fields);
308
        $this->assertEquals($this->expectedThreeTextFieldsArray['field3'], $this->crudPanel->update_fields[$updateKeys[0]]);
309
        $this->assertEquals(['field3', 'field1', 'field2'], $updateKeys);
310
    }
311
312
    public function testBeforeFieldLastField()
313
    {
@@ 312-325 (lines=14) @@
309
        $this->assertEquals(['field3', 'field1', 'field2'], $updateKeys);
310
    }
311
312
    public function testBeforeFieldLastField()
313
    {
314
        $this->crudPanel->addFields($this->threeTextFieldsArray);
315
316
        $this->crudPanel->beforeField('field3');
317
318
        $createKeys = array_keys($this->crudPanel->create_fields);
319
        $this->assertEquals($this->expectedThreeTextFieldsArray['field3'], $this->crudPanel->create_fields[$createKeys[2]]);
320
        $this->assertEquals(['field1', 'field2', 'field3'], $createKeys);
321
322
        $updateKeys = array_keys($this->crudPanel->update_fields);
323
        $this->assertEquals($this->expectedThreeTextFieldsArray['field3'], $this->crudPanel->update_fields[$updateKeys[2]]);
324
        $this->assertEquals(['field1', 'field2', 'field3'], $updateKeys);
325
    }
326
327
    public function testBeforeFieldCreateForm()
328
    {
@@ 327-340 (lines=14) @@
324
        $this->assertEquals(['field1', 'field2', 'field3'], $updateKeys);
325
    }
326
327
    public function testBeforeFieldCreateForm()
328
    {
329
        $this->crudPanel->addFields($this->threeTextFieldsArray);
330
331
        $this->crudPanel->beforeField('field1', 'create');
332
333
        $createKeys = array_keys($this->crudPanel->create_fields);
334
        $this->assertEquals($this->expectedThreeTextFieldsArray['field3'], $this->crudPanel->create_fields[$createKeys[0]]);
335
        $this->assertEquals(['field3', 'field1', 'field2'], $createKeys);
336
337
        $updateKeys = array_keys($this->crudPanel->update_fields);
338
        $this->assertEquals($this->expectedThreeTextFieldsArray['field3'], $this->crudPanel->update_fields[$updateKeys[2]]);
339
        $this->assertEquals(['field1', 'field2', 'field3'], $updateKeys);
340
    }
341
342
    public function testBeforeFieldUpdateForm()
343
    {
@@ 342-355 (lines=14) @@
339
        $this->assertEquals(['field1', 'field2', 'field3'], $updateKeys);
340
    }
341
342
    public function testBeforeFieldUpdateForm()
343
    {
344
        $this->crudPanel->addFields($this->threeTextFieldsArray);
345
346
        $this->crudPanel->beforeField('field1', 'update');
347
348
        $createKeys = array_keys($this->crudPanel->create_fields);
349
        $this->assertEquals($this->expectedThreeTextFieldsArray['field3'], $this->crudPanel->create_fields[$createKeys[2]]);
350
        $this->assertEquals(['field1', 'field2', 'field3'], $createKeys);
351
352
        $updateKeys = array_keys($this->crudPanel->update_fields);
353
        $this->assertEquals($this->expectedThreeTextFieldsArray['field3'], $this->crudPanel->update_fields[$updateKeys[0]]);
354
        $this->assertEquals(['field3', 'field1', 'field2'], $updateKeys);
355
    }
356
357
    public function testBeforeFieldForDifferentFieldsInCreateAndUpdate()
358
    {
@@ 385-398 (lines=14) @@
382
        $this->assertEquals(array_keys($this->expectedThreeTextFieldsArray), array_keys($this->crudPanel->update_fields));
383
    }
384
385
    public function testAfterField()
386
    {
387
        $this->crudPanel->addFields($this->threeTextFieldsArray);
388
389
        $this->crudPanel->afterField('field1');
390
391
        $createKeys = array_keys($this->crudPanel->create_fields);
392
        $this->assertEquals($this->expectedThreeTextFieldsArray['field3'], $this->crudPanel->create_fields[$createKeys[1]]);
393
        $this->assertEquals(['field1', 'field3', 'field2'], $createKeys);
394
395
        $updateKeys = array_keys($this->crudPanel->update_fields);
396
        $this->assertEquals($this->expectedThreeTextFieldsArray['field3'], $this->crudPanel->update_fields[$updateKeys[1]]);
397
        $this->assertEquals(['field1', 'field3', 'field2'], $updateKeys);
398
    }
399
400
    public function testAfterFieldLastField()
401
    {
@@ 400-413 (lines=14) @@
397
        $this->assertEquals(['field1', 'field3', 'field2'], $updateKeys);
398
    }
399
400
    public function testAfterFieldLastField()
401
    {
402
        $this->crudPanel->addFields($this->threeTextFieldsArray);
403
404
        $this->crudPanel->afterField('field3');
405
406
        $createKeys = array_keys($this->crudPanel->create_fields);
407
        $this->assertEquals($this->expectedThreeTextFieldsArray['field3'], $this->crudPanel->create_fields[$createKeys[2]]);
408
        $this->assertEquals(['field1', 'field2', 'field3'], $createKeys);
409
410
        $updateKeys = array_keys($this->crudPanel->update_fields);
411
        $this->assertEquals($this->expectedThreeTextFieldsArray['field3'], $this->crudPanel->update_fields[$updateKeys[2]]);
412
        $this->assertEquals(['field1', 'field2', 'field3'], $updateKeys);
413
    }
414
415
    public function testAfterFieldCreateForm()
416
    {
@@ 415-428 (lines=14) @@
412
        $this->assertEquals(['field1', 'field2', 'field3'], $updateKeys);
413
    }
414
415
    public function testAfterFieldCreateForm()
416
    {
417
        $this->crudPanel->addFields($this->threeTextFieldsArray);
418
419
        $this->crudPanel->afterField('field1', 'create');
420
421
        $createKeys = array_keys($this->crudPanel->create_fields);
422
        $this->assertEquals($this->expectedThreeTextFieldsArray['field3'], $this->crudPanel->create_fields[$createKeys[1]]);
423
        $this->assertEquals(['field1', 'field3', 'field2'], $createKeys);
424
425
        $updateKeys = array_keys($this->crudPanel->update_fields);
426
        $this->assertEquals($this->expectedThreeTextFieldsArray['field3'], $this->crudPanel->update_fields[$updateKeys[2]]);
427
        $this->assertEquals(['field1', 'field2', 'field3'], $updateKeys);
428
    }
429
430
    public function testAfterFieldUpdateForm()
431
    {
@@ 430-443 (lines=14) @@
427
        $this->assertEquals(['field1', 'field2', 'field3'], $updateKeys);
428
    }
429
430
    public function testAfterFieldUpdateForm()
431
    {
432
        $this->crudPanel->addFields($this->threeTextFieldsArray);
433
434
        $this->crudPanel->afterField('field1', 'update');
435
436
        $createKeys = array_keys($this->crudPanel->create_fields);
437
        $this->assertEquals($this->expectedThreeTextFieldsArray['field3'], $this->crudPanel->create_fields[$createKeys[2]]);
438
        $this->assertEquals(['field1', 'field2', 'field3'], $createKeys);
439
440
        $updateKeys = array_keys($this->crudPanel->update_fields);
441
        $this->assertEquals($this->expectedThreeTextFieldsArray['field3'], $this->crudPanel->update_fields[$updateKeys[1]]);
442
        $this->assertEquals(['field1', 'field3', 'field2'], $updateKeys);
443
    }
444
445
    public function testAfterFieldForDifferentFieldsInCreateAndUpdate()
446
    {