Passed
Pull Request — master (#156)
by Wilmer
05:09 queued 02:34
created

DummyCollectorTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 10
dl 0
loc 21
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A collectTestData() 0 2 1
A getCollector() 0 15 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Yii\Debug\Tests\Collector;
6
7
use Yiisoft\Yii\Debug\Collector\CollectorInterface;
8
9
final class DummyCollectorTest extends CollectorTestCase
10
{
11
    protected function getCollector(): CollectorInterface
12
    {
13
        $collector = $this->createMock(CollectorInterface::class);
14
        $collector->method('getCollected')
15
            ->willReturn(
16
                [
17
                    'int' => 123,
18
                    'str' => 'asdas',
19
                    'object' => new \stdClass(),
20
                ]
21
            );
22
        $collector->method('getName')
23
            ->willReturn(get_class($collector));
24
25
        return $collector;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $collector returns the type PHPUnit\Framework\MockObject\MockObject which is incompatible with the type-hinted return Yiisoft\Yii\Debug\Collector\CollectorInterface.
Loading history...
26
    }
27
28
    protected function collectTestData(CollectorInterface $collector): void
29
    {
30
        // pass
31
    }
32
}
33