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

AddRoleHoldersAsNewItems::handles()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
cc 1
nc 1
nop 0
crap 2
1
<?php
2
0 ignored issues
show
Coding Style introduced by
Missing file doc comment
Loading history...
3
namespace BristolSU\ControlDB\Export\Formatter\Role;
4
5
use BristolSU\ControlDB\Export\FormattedItem;
6
use BristolSU\ControlDB\Export\Formatter\Formatter;
7
8
class AddRoleHoldersAsNewItems extends Formatter
0 ignored issues
show
Coding Style introduced by
Missing doc comment for class AddRoleHoldersAsNewItems
Loading history...
9
{
10
11 1
    public function format($items)
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function format()
Loading history...
12
    {
13 1
        $newItems = [];
14 1
        foreach($items as $item) {
0 ignored issues
show
Coding Style introduced by
Expected "foreach (...) {\n"; found "foreach(...) {\n"
Loading history...
15 1
            foreach($item->original()->users() as $user) {
0 ignored issues
show
Coding Style introduced by
Expected "foreach (...) {\n"; found "foreach(...) {\n"
Loading history...
16 1
                $newItem = clone $item;
17 1
                $dataUser = $user->data();
18 1
                $newItem->addRow('User ID', $user->id());
19 1
                $newItem->addRow('User First Name', $dataUser->firstName());
20 1
                $newItem->addRow('User Last Name', $dataUser->lastName());
21 1
                $newItem->addRow('User Preferred Name', $dataUser->preferredName());
22 1
                $newItem->addRow('User Email', $dataUser->email());
23 1
                $newItems[] = $newItem;
24
            }
25
        }
26 1
        return $newItems;
27
    }
28
29
    public function formatItem(FormattedItem $formattedItem): FormattedItem
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function formatItem()
Loading history...
30
    {
31
        return $formattedItem;
32
    }
33
34
    public function handles(): string
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function handles()
Loading history...
35
    {
36
        return static::ROLES;
37
    }
38
}