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

Passed
Push — crud-uploads ( 044930 )
by Pedro
11:38
created

UploadStore::getUploadFor()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
c 1
b 0
f 1
nc 1
nop 1
dl 0
loc 2
rs 10
1
<?php
2
3
namespace Backpack\CRUD\app\Library\CrudPanel\Uploads;
4
5
final class UploadStore
6
{
7
    private array $uploaders;
8
9
    private array $handledUploaders = [];
10
11
    public function __construct()
12
    {
13
        $this->uploaders = config('backpack.base.uploaders');
14
    }
15
16
    public function markAsHandled(string $objectName)
17
    {
18
        $this->handledUploaders[] = $objectName;
19
    }
20
21
    public function isUploadHandled(string $objectName)
22
    {
23
        return in_array($objectName, $this->handledUploaders);
24
    }
25
26
    public function hasUploadFor(string $objectType) {
27
        return array_key_exists($objectType, $this->uploaders);
28
    }
29
30
    public function getUploadFor(string $objectType) {
31
        return $this->uploaders[$objectType];
32
    }
33
34
    public function addUploaders(array $uploaders)
35
    {
36
        $this->uploaders = array_merge($this->uploaders, $uploaders);
37
    }
38
}
39