Completed
Pull Request — master (#52)
by Wilmer
01:35
created

TestWidgetB   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 2
c 1
b 0
f 0
dl 0
loc 9
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A init() 0 2 1
A run() 0 3 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace Yiisoft\Widget\Tests\Stubs;
5
6
use Yiisoft\Widget\Widget;
7
8
/**
9
 * TestWidgetB
10
 */
11
class TestWidgetB extends Widget
12
{
13
    public function init(): void
14
    {
15
    }
16
17
    public function run(): string
18
    {
19
        return '<run-' . $this->getId() . '>';
0 ignored issues
show
Bug introduced by
The method getId() does not exist on Yiisoft\Widget\Tests\Stubs\TestWidgetB. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

19
        return '<run-' . $this->/** @scrutinizer ignore-call */ getId() . '>';

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
20
    }
21
}
22