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.
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.
The method supports() does not exist on spec\Knp\DictionaryBundl...ry\Factory\IteratorSpec. Since you implemented __call, consider adding a @method annotation.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
The method willReturn() does not exist on Traversable. It seems like you code against a sub-type of Traversable such as RectorPrefix202506\Nette\Utils\Finder or RectorPrefix202506\Nette\Utils\Html or RectorPrefix202506\Nette\Utils\ArrayList or RectorPrefix202506\Nette\Iterators\CachingIterator.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
The method create() does not exist on spec\Knp\DictionaryBundl...ry\Factory\IteratorSpec. Since you implemented __call, consider adding a @method annotation.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
47
/** @scrutinizer ignore-call */
48
$dictionary = $this->create('yolo', $config);
Loading history...
48
49
$dictionary->getName()->shouldBe('yolo');
50
$dictionary->getValues()->shouldBe([
51
'foo1' => 'bar1',
52
'foo2' => 'bar2',
53
'foo3' => 'bar3',
54
]);
55
}
56
}
57
58
abstract class MockIterator implements \IteratorAggregate
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.