Total Complexity | 4 |
Total Lines | 57 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | final class CastsToStringTest extends TestCase |
||
22 | { |
||
23 | /** |
||
24 | * @static |
||
25 | * @var ReflectionClass |
||
26 | */ |
||
27 | protected static $interface; |
||
28 | |||
29 | /** |
||
30 | * Set up ReflectionClass instance |
||
31 | * |
||
32 | * @static |
||
33 | * @return void |
||
34 | */ |
||
35 | final public static function setUpBeforeClass(): void |
||
36 | { |
||
37 | self::$interface = new ReflectionClass(CastsToString::class); |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * CastsToString should be an interface |
||
42 | * |
||
43 | * @test |
||
44 | * @final |
||
45 | * @return void |
||
46 | */ |
||
47 | final public function shouldBeInterface(): void |
||
50 | } |
||
51 | |||
52 | /** |
||
53 | * Interface should have one method named '__toString' |
||
54 | * |
||
55 | * @test |
||
56 | * @final |
||
57 | * @return void |
||
58 | */ |
||
59 | final public function interfaceShouldHaveOneMethod(): void |
||
60 | { |
||
61 | $this->assertTrue(self::$interface->hasMethod('__toString')); |
||
62 | $this->assertCount(1, self::$interface->getMethods()); |
||
63 | } |
||
64 | |||
65 | /** |
||
66 | * Describe method signatue of '__toString' |
||
67 | * |
||
68 | * @test |
||
69 | * @final |
||
70 | * @return void |
||
71 | */ |
||
72 | final public function describeMethodSignatureOfToString(): void |
||
78 | } |
||
79 | } |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths