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 ( 3c3078...53e22d )
by Cees-Jan
07:37
created

AbstractResourceTest   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 1
dl 0
loc 29
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
getClass() 0 1 ?
A provideProperties() 0 6 2
A testProperties() 0 4 1
A testInterface() 0 9 1
1
<?php
2
declare(strict_types=1);
3
4
namespace ApiClients\Foundation\Tests;
5
6
use ApiClients\Foundation\Resource\ResourceInterface;
7
8
abstract class AbstractResourceTest extends \PHPUnit_Framework_TestCase
9
{
10
    abstract function getClass(): string;
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
11
12
    public function provideProperties()
13
    {
14
        foreach ((new \ReflectionClass($this->getClass()))->getProperties() as $property) {
0 ignored issues
show
Unused Code introduced by
This foreach statement is empty and can be removed.

This check looks for foreach loops that have no statements or where all statements have been commented out. This may be the result of changes for debugging or the code may simply be obsolete.

Consider removing the loop.

Loading history...
15
            //
16
        }
17
    }
18
19
    /**
20
     * @dataProvider provideProperties
21
     */
22
    public function testProperties()
23
    {
24
        $this->assertTrue(true);
25
    }
26
27
    public function testInterface()
28
    {
29
        $this->assertTrue(
30
            is_subclass_of(
0 ignored issues
show
Bug introduced by
Due to PHP Bug #53727, is_subclass_of might return inconsistent results on some PHP versions if \ApiClients\Foundation\R...esourceInterface::class can be an interface. If so, you could instead use ReflectionClass::implementsInterface.
Loading history...
31
                $this->getClass(),
32
                ResourceInterface::class
33
            )
34
        );
35
    }
36
}
37