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.

Issues (14)

src/Type/DACHCountryType.php (2 issues)

Severity
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * (c) Christian Gripp <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Core23\Form\Type;
13
14
use Symfony\Component\Form\AbstractType;
15
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
16
use Symfony\Component\OptionsResolver\OptionsResolver;
17
18
final class DACHCountryType extends AbstractType
19
{
20
    public function configureOptions(OptionsResolver $resolver): void
21
    {
22
        $countries = $this->getCountries();
23
24
        $resolver->setDefaults([
25
            'choices'      => array_combine($countries, $countries),
26
            'choice_label' => static function ($value, $key, $index) {
0 ignored issues
show
The parameter $key is not used and could be removed. ( Ignorable by Annotation )

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

26
            'choice_label' => static function ($value, /** @scrutinizer ignore-unused */ $key, $index) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
The parameter $index is not used and could be removed. ( Ignorable by Annotation )

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

26
            'choice_label' => static function ($value, $key, /** @scrutinizer ignore-unused */ $index) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
27
                return 'form.choice_'.strtolower($value);
28
            },
29
            'choice_translation_domain' => 'Core23FormBundle',
30
        ]);
31
    }
32
33
    public function getParent()
34
    {
35
        return ChoiceType::class;
36
    }
37
38
    public function getBlockPrefix()
39
    {
40
        return 'core23_country';
41
    }
42
43
    /**
44
     * @return string[]
45
     */
46
    protected function getCountries(): array
47
    {
48
        return ['DE', 'AT', 'CH'];
49
    }
50
}
51