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.

UndefinedOperatingSystemTest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 3
dl 0
loc 30
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 6 1
A match_AlwaysRreturnsFalse() 0 4 1
A getName_returnsUndefined() 0 4 1
1
<?php
2
namespace Fam\Util\UserAgentParser;
3
4
use PHPUnit\Framework\TestCase;
5
6
class UndefinedOperatingSystemTest extends TestCase
7
{
8
    /**
9
     * @var Windows
10
     */
11
    private $subject;
12
13
    protected function setUp()
14
    {
15
        parent::setUp();
16
17
        $this->subject = new \Fam\Util\UserAgentParser\UndefinedOperatingSystem();
0 ignored issues
show
Documentation Bug introduced by
It seems like new \Fam\Util\UserAgentP...efinedOperatingSystem() of type object<Fam\Util\UserAgen...definedOperatingSystem> is incompatible with the declared type object<Fam\Util\UserAgentParser\Windows> of property $subject.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
18
    }
19
20
    /**
21
     * @test
22
     */
23
    public function match_AlwaysRreturnsFalse()
24
    {
25
        $this->assertFalse($this->subject->match("Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"));
26
    }
27
28
    /**
29
     * @test
30
     */
31
    public function getName_returnsUndefined()
32
    {
33
        $this->assertEquals("undefined", $this->subject->getName());
34
    }
35
}
36