GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 925464...488a51 )
by
unknown
07:39
created

NumberOfOrdersTypeSpec::let()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace spec\Odiseo\SyliusReportPlugin\Form\Type\DataFetcher;
4
5
use Odiseo\SyliusReportPlugin\Form\Builder\QueryFilterFormBuilder;
6
use Odiseo\SyliusReportPlugin\Form\Type\DataFetcher\NumberOfOrdersType;
7
use PhpSpec\ObjectBehavior;
8
use Prophecy\Argument;
9
use Symfony\Component\Form\AbstractType;
10
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
11
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
12
use Symfony\Component\Form\Extension\Core\Type\DateType;
13
use Symfony\Component\Form\FormBuilder;
14
15
class NumberOfOrdersTypeSpec extends ObjectBehavior
16
{
17
    function let(QueryFilterFormBuilder $queryFilterFormBuilder)
0 ignored issues
show
Best Practice introduced by
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...
18
    {
19
        $this->beConstructedWith($queryFilterFormBuilder);
20
    }
21
22
    function it_is_initializable()
0 ignored issues
show
Best Practice introduced by
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(NumberOfOrdersType::class);
25
    }
26
27
    function it_should_be_abstract_type_object()
28
    {
29
        $this->shouldHaveType(AbstractType::class);
30
    }
31
32
    function it_has_block_prefix()
33
    {
34
        $this->getBlockPrefix()->shouldReturn('odiseo_sylius_report_data_fetcher_number_of_orders');
0 ignored issues
show
Bug introduced by
The method getBlockPrefix() does not exist on spec\Odiseo\SyliusReport...\NumberOfOrdersTypeSpec. 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

34
        $this->/** @scrutinizer ignore-call */ 
35
               getBlockPrefix()->shouldReturn('odiseo_sylius_report_data_fetcher_number_of_orders');
Loading history...
35
    }
36
37
    function it_builds_the_form(FormBuilder $builder)
38
    {
39
        $builder->add('start', DateType::class, Argument::any())->willReturn($builder);
0 ignored issues
show
Bug introduced by
The method willReturn() does not exist on Symfony\Component\Form\FormBuilder. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

39
        $builder->add('start', DateType::class, Argument::any())->/** @scrutinizer ignore-call */ willReturn($builder);

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...
Bug introduced by
Prophecy\Argument::any() of type Prophecy\Argument\Token\AnyValueToken is incompatible with the type array expected by parameter $options of Symfony\Component\Form\FormBuilder::add(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

39
        $builder->add('start', DateType::class, /** @scrutinizer ignore-type */ Argument::any())->willReturn($builder);
Loading history...
40
        $builder->add('end', DateType::class, Argument::any())->willReturn($builder);
41
        $builder->add('period', ChoiceType::class, Argument::any())->willReturn($builder);
42
        $builder->add('empty_records', CheckboxType::class, Argument::any())->willReturn($builder);
43
44
        $this->buildForm($builder, []);
0 ignored issues
show
Bug introduced by
The method buildForm() does not exist on spec\Odiseo\SyliusReport...\NumberOfOrdersTypeSpec. 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

44
        $this->/** @scrutinizer ignore-call */ 
45
               buildForm($builder, []);
Loading history...
45
    }
46
}
47