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.
Passed
Push — master ( 18e39d...348781 )
by Toby
36:48 queued 23:00
created

SaveCsvHandler   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 5
c 1
b 0
f 0
dl 0
loc 13
ccs 4
cts 4
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A save() 0 6 1
1
<?php
2
0 ignored issues
show
Coding Style introduced by
Missing file doc comment
Loading history...
3
namespace BristolSU\ControlDB\Export\Handler;
4
5
use Illuminate\Support\Facades\Storage;
6
7
class SaveCsvHandler extends Handler
0 ignored issues
show
Coding Style introduced by
Missing doc comment for class SaveCsvHandler
Loading history...
8
{
9
    use UsesCsv;
10
    
11
    /**
0 ignored issues
show
Coding Style introduced by
Missing short description in doc comment
Loading history...
Coding Style introduced by
Parameter $items should have a doc-comment as per coding-style.
Loading history...
12
     * @inheritDoc
13
     */
0 ignored issues
show
Coding Style introduced by
Missing @return tag in function comment
Loading history...
14 3
    protected function save(array $items)
15
    {
16 3
        $csv = $this->generateCsv($items, $this->config('defaultIfNull', 'N/A'));
17
        
18 3
        Storage::disk($this->config('disk', null))
19 3
            ->put($this->config('filename', 'export.csv'), $csv);
0 ignored issues
show
Bug introduced by
It seems like $csv can also be of type false; however, parameter $contents of Illuminate\Filesystem\FilesystemAdapter::put() does only seem to accept resource|string, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

19
            ->put($this->config('filename', 'export.csv'), /** @scrutinizer ignore-type */ $csv);
Loading history...
20
    }
21
}