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 ( 4d01c1...9839d7 )
by Denis
10:50
created

XLSXTest::testConstruct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 17
Code Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 17
rs 9.4285
cc 1
eloc 12
nc 1
nop 0
1
<?php
0 ignored issues
show
Coding Style Compatibility introduced by
For compatibility and reusability of your code, PSR1 recommends that a file should introduce either new symbols (like classes, functions, etc.) or have side-effects (like outputting something, or including other files), but not both at the same time. The first symbol is defined on line 6 and the first side effect is on line 2.

The PSR-1: Basic Coding Standard recommends that a file should either introduce new symbols, that is classes, functions, constants or similar, or have side effects. Side effects are anything that executes logic, like for example printing output, changing ini settings or writing to a file.

The idea behind this recommendation is that merely auto-loading a class should not change the state of an application. It also promotes a cleaner style of programming and makes your code less prone to errors, because the logic is not spread out all over the place.

To learn more about the PSR-1, please see the PHP-FIG site on the PSR-1.

Loading history...
2
require_once __DIR__ . '/../vendor/autoload.php';
3
4
use Ellumilel\ExcelWriter;
5
6
class XLSXTest extends PHPUnit_Framework_TestCase
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
7
{
8
    public function testConstruct()
9
    {
10
        $header = [
11
            'test1' => 'integer',
12
            'test2' => 'integer',
13
            'test3' => 'integer',
14
            'test4' => 'integer',
15
        ];
16
        $writer = new Ellumilel\ExcelWriter();
17
        $writer->setAuthor('Tester');
18
        $writer->writeSheetHeader('Sheet1', $header);
19
        $writer->writeSheetRow('Sheet1', [1, 2, 3, 4]);
20
        $writer->writeToFile("unit_test_output_one.xlsx");
21
22
23
        $this->assertEquals(true, file_exists(__DIR__ . "/../unit_test_output_one.xlsx"));
24
    }
25
}
26