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 ( 0d5307...84d5ff )
by Christian
01:25
created

src/DependencyInjection/Configuration.php (1 issue)

Labels
Severity

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

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\ShariffBundle\DependencyInjection;
13
14
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
15
use Symfony\Component\Config\Definition\ConfigurationInterface;
16
17
final class Configuration implements ConfigurationInterface
18
{
19
    /**
20
     * {@inheritdoc}
21
     */
22
    public function getConfigTreeBuilder()
23
    {
24
        $treeBuilder = new TreeBuilder('core23_shariff');
25
26
        // Keep compatibility with symfony/config < 4.2
27
        if (!\method_exists($treeBuilder, 'getRootNode')) {
28
            $rootNode = $treeBuilder->root('core23_shariff');
29
        } else {
30
            $rootNode = $treeBuilder->getRootNode();
31
        }
32
        \assert($rootNode instanceof ArrayNodeDefinition);
0 ignored issues
show
The class Core23\ShariffBundle\Dep...ion\ArrayNodeDefinition does not exist. Did you forget a USE statement, or did you not list all dependencies?

This error could be the result of:

1. Missing dependencies

PHP Analyzer uses your composer.json file (if available) to determine the dependencies of your project and to determine all the available classes and functions. It expects the composer.json to be in the root folder of your repository.

Are you sure this class is defined by one of your dependencies, or did you maybe not list a dependency in either the require or require-dev section?

2. Missing use statement

PHP does not complain about undefined classes in ìnstanceof checks. For example, the following PHP code will work perfectly fine:

if ($x instanceof DoesNotExist) {
    // Do something.
}

If you have not tested against this specific condition, such errors might go unnoticed.

Loading history...
33
34
        $rootNode
35
            ->children()
36
                ->arrayNode('options')
37
                    ->fixXmlConfig('domain')
38
                    ->fixXmlConfig('service')
39
                    ->addDefaultsIfNotSet()
40
                    ->children()
41
                        ->arrayNode('domains')
42
                            ->defaultValue([])
43
                            ->prototype('scalar')->end()
44
                        ->end()
45
                        ->arrayNode('services')
46
                            ->defaultValue(['GooglePlus', 'Facebook', 'LinkedIn', 'Reddit', 'StumbleUpon', 'Flattr', 'Pinterest', 'Xing', 'AddThis'])
47
                            ->prototype('scalar')->end()
48
                        ->end()
49
                    ->end()
50
                ->end()
51
                ->arrayNode('services')
52
                    ->children()
53
                        ->arrayNode('facebook')
54
                        ->children()
55
                            ->scalarNode('app_id')->end()
56
                            ->scalarNode('secret')->end()
57
                        ->end()
58
                    ->end()
59
                ->end()
60
            ->end()
61
        ;
62
63
        return $treeBuilder;
64
    }
65
}
66