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 ( bc1665...cec0e4 )
by Sebastian
28:57
created

OrderSerializerTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 5
dl 0
loc 17
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A it_can_serialize_an_order() 0 11 1
1
<?php
2
3
use App\Order;
4
use App\OrderLine;
5
use App\OrderSerializer;
6
use PHPUnit\Framework\TestCase;
7
use Spatie\Snapshots\MatchesSnapshots;
8
9
class OrderSerializerTest extends 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...
10
{
11
    use MatchesSnapshots;
12
13
    /** @test */
14
    public function it_can_serialize_an_order()
15
    {
16
        $orderSerializer = new OrderSerializer();
17
18
        $order = new Order(1, '[email protected]', true, [
19
            new OrderLine(1, 'Sublime Text License', 70, 3),
20
            new OrderLine(2, 'PHPStorm License', 199, 2),
21
        ]);
22
23
        $this->assertMatchesJsonSnapshot($orderSerializer->serialize($order));
24
    }
25
}
26