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.
Loading history...
23
{
24
$this->shouldHaveType(Simple::class);
25
}
26
27
function it_is_a_dictionary()
28
{
29
$this->shouldImplement(Dictionary::class);
30
}
31
32
function it_access_to_value_like_an_array()
33
{
34
$this['foo']->shouldReturn(0);
35
$this['bar']->shouldReturn(1);
36
$this['baz']->shouldReturn(2);
37
}
38
39
function its_getvalues_should_return_dictionary_values()
The method getValues() does not exist on spec\Knp\DictionaryBundle\Dictionary\SimpleSpec. 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
41
$this->/** @scrutinizer ignore-call */
42
getValues()->shouldReturn([
Loading history...
42
'foo' => 0,
43
'bar' => 1,
44
'baz' => 2,
45
]);
46
}
47
48
function its_getname_should_return_dictionary_name()
The method getName() does not exist on spec\Knp\DictionaryBundle\Dictionary\SimpleSpec. 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 count() does not exist on spec\Knp\DictionaryBundle\Dictionary\SimpleSpec. 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
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.