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

TestWidgetB::init()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 0
c 1
b 0
f 0
dl 0
loc 2
rs 10
cc 1
nc 1
nop 0
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