odiseoteam /
SyliusReportPlugin
| 1 | <?php |
||||||
| 2 | |||||||
| 3 | namespace spec\Odiseo\SyliusReportPlugin\DataFetcher; |
||||||
| 4 | |||||||
| 5 | use Odiseo\SyliusReportPlugin\DataFetcher\Data; |
||||||
| 6 | use PhpSpec\ObjectBehavior; |
||||||
| 7 | |||||||
| 8 | /** |
||||||
| 9 | * @author Diego D'amico <[email protected]> |
||||||
| 10 | */ |
||||||
| 11 | class DataSpec extends ObjectBehavior |
||||||
| 12 | { |
||||||
| 13 | function it_is_initializable() |
||||||
|
0 ignored issues
–
show
|
|||||||
| 14 | { |
||||||
| 15 | $this->shouldHaveType(Data::class); |
||||||
| 16 | } |
||||||
| 17 | |||||||
| 18 | function its_labels_is_mutable(): void |
||||||
| 19 | { |
||||||
| 20 | $this->getLabels()->shouldReturn([]); |
||||||
|
0 ignored issues
–
show
The method
getLabels() does not exist on spec\Odiseo\SyliusReport...in\DataFetcher\DataSpec. 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
Loading history...
|
|||||||
| 21 | |||||||
| 22 | $this->setLabels(['labelA', 'labelB']); |
||||||
|
0 ignored issues
–
show
The method
setLabels() does not exist on spec\Odiseo\SyliusReport...in\DataFetcher\DataSpec. 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
Loading history...
|
|||||||
| 23 | $this->getLabels()->shouldReturn(['labelA', 'labelB']); |
||||||
| 24 | } |
||||||
| 25 | |||||||
| 26 | function its_data_is_mutable(): void |
||||||
| 27 | { |
||||||
| 28 | $this->getData()->shouldReturn([]); |
||||||
|
0 ignored issues
–
show
The method
getData() does not exist on spec\Odiseo\SyliusReport...in\DataFetcher\DataSpec. 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
Loading history...
|
|||||||
| 29 | |||||||
| 30 | $this->setData(['14', '10']); |
||||||
|
0 ignored issues
–
show
The method
setData() does not exist on spec\Odiseo\SyliusReport...in\DataFetcher\DataSpec. 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
Loading history...
|
|||||||
| 31 | $this->getData()->shouldReturn(['14', '10']); |
||||||
| 32 | } |
||||||
| 33 | } |
||||||
| 34 |
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.