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.
Completed
Push — master ( d09edd...49d6e8 )
by Cyril
11:59 queued 09:17
created

DefaultFormatter   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 92.31%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 4
c 2
b 0
f 0
lcom 0
cbo 1
dl 0
loc 32
ccs 12
cts 13
cp 0.9231
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A formatRow() 0 21 4
1
<?php
2
3
4
namespace CrossKnowledge\DataTableBundle\DataTable\Formatter;
5
6
7
use CrossKnowledge\DataTableBundle\DataTable\Table\AbstractTable;
8
9
class DefaultFormatter implements FormatterInterface
10
{
11
    /**
12
     * Contains common output behavior here based on columns definitions.
13
     *
14
     * @param $row
15
     * @param AbstractTable $table
16
     *
17
     * @return mixed
18
     */
19 3
    public function formatRow($row, AbstractTable $table, $context)
20
    {
21 3
        $cols = $table->getColumns();
22 3
        $newRow = [];
23
24 3
        foreach ($cols as $colIdentifier=>$column) {
0 ignored issues
show
Coding Style introduced by
Expected 1 space before "=>"; 0 found
Loading history...
Coding Style introduced by
Expected 1 space after "=>"; 0 found
Loading history...
Coding Style introduced by
Blank line found at start of control structure
Loading history...
25
26 3
            $rawValue = array_key_exists($colIdentifier, $row) ? $row[$colIdentifier] : "";
27
28 3
            if ($column->getOptions()['auto_escape']) {
29 3
                $value = htmlentities($rawValue, ENT_COMPAT | ENT_HTML401, 'UTF-8');
30 3
            } else {
31
                $value = $rawValue;
32
            }
33
34 3
            $colVal = $column->formatCell($value, $row, $context);//Column definition
35 3
            $newRow[$colIdentifier] = $colVal;
36 3
        }
37
38 3
        return $newRow;
39
    }
40
}
41