| Total Complexity | 4 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | final class SimpleSpec extends ObjectBehavior |
||
| 11 | { |
||
| 12 | use DictionaryBehavior; |
||
| 13 | |||
| 14 | function let() |
||
|
|
|||
| 15 | { |
||
| 16 | $this->beConstructedWith('foo', [ |
||
| 17 | 'foo' => 0, |
||
| 18 | 'bar' => 1, |
||
| 19 | 'baz' => 2, |
||
| 20 | ]); |
||
| 21 | } |
||
| 22 | |||
| 23 | function it_is_initializable() |
||
| 24 | { |
||
| 25 | $this->shouldHaveType(Simple::class); |
||
| 26 | } |
||
| 27 | |||
| 28 | protected function getExpectedResult(): array |
||
| 29 | { |
||
| 30 | return [ |
||
| 31 | 'foo' => 0, |
||
| 32 | 'bar' => 1, |
||
| 33 | 'baz' => 2, |
||
| 34 | ]; |
||
| 35 | } |
||
| 36 | |||
| 37 | protected function getExpectedName(): string |
||
| 40 | } |
||
| 41 | } |
||
| 42 |
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.