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
Pull Request — master (#56)
by Issei
02:22
created

CallableFunctionNamesTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 18
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 2
1
<?php
2
3
namespace DusanKasan\Knapsack\Tests\Scenarios;
4
5
use DusanKasan\Knapsack\Collection;
6
use PHPUnit_Framework_TestCase;
7
8
class CallableFunctionNamesTest extends PHPUnit_Framework_TestCase
9
{
10
    /**
11
     * Example that it's possible to use callable function names as arguments.
12
     */
13
    public function testIt()
14
    {
15
        $result = Collection::from([2, 1])
16
            ->concat([3, 4])
17
            ->sort('\DusanKasan\Knapsack\compare')
18
            ->values()
19
            ->toArray();
20
21
        $expected = [1, 2, 3, 4];
22
23
        $this->assertEquals($expected, $result);
24
    }
25
}
26