src/Composer/ModuleFinder.php
private function validateRoutesSectionInExtra(array $extra)
    {
        if (!isset($extra['phplist/core'])) {
            return;
        }
        $this->validatePhpListSectionInExtra($extra);

        if (!isset($extra['phplist/core']['routes'])) {
            return;
        }
        if (!is_array($extra['phplist/core']['routes'])) {
            throw new \InvalidArgumentException(
                'The extras.phplist/core.routes section in the composer.json must be an array.',
                1506429004
            );
        }

        /** @var array $bundleExtras */
        $bundleExtras = $extra['phplist/core']['routes'];
        foreach ($bundleExtras as $routeName => $routeConfiguration) {
            if (!is_array($routeConfiguration)) {
                throw new \InvalidArgumentException(
                    'The extras.phplist/core.routes. ' . $routeName .
                    '" section in the composer.json must be an array.',
                    1506429860
                );
            }
        }
    }
private function validateRoutesSectionInExtra(array $extra)
    {
        if (!isset($extra['phplist/core'])) {
            return;
        }
        $this->validatePhpListSectionInExtra($extra);

        if (!isset($extra['phplist/core']['routes'])) {
            return;
        }
        if (!is_array($extra['phplist/core']['routes'])) {
            throw new \InvalidArgumentException(
                'The extras.phplist/core.routes section in the composer.json must be an array.',
                1506429004
            );
        }

        /** @var array $bundleExtras */
        $bundleExtras = $extra['phplist/core']['routes'];
        foreach ($bundleExtras as $routeName => $routeConfiguration) {
            if (!is_array($routeConfiguration)) {
                throw new \InvalidArgumentException(
                    'The extras.phplist/core.routes. ' . $routeName .
                    '" section in the composer.json must be an array.',
                    1506429860
                );
            }
        }
    }
private function validateRoutesSectionInExtra ( array $ extra ) { if ( ! isset ( $ extra [ 'phplist/core' ] ) ) { return ; } $ this -> validatePhpListSectionInExtra ( $ extra ) ; if ( ! isset ( $ extra [ 'phplist/core' ] [ 'routes' ] ) ) { return ; } if ( ! is_array ( $ extra [ 'phplist/core' ] [ 'routes' ] ) ) { throw new \ InvalidArgumentException ( 'The extras.phplist/core.routes section in the composer.json must be an array.' , 1506429004 ) ; } /** @var array $bundleExtras */ $ bundleExtras = $ extra [ 'phplist/core' ] [ 'routes' ] ; foreach ( $ bundleExtras as $ routeName => $ routeConfiguration ) { if ( ! is_array ( $ routeConfiguration ) ) { throw new \ InvalidArgumentException ( 'The extras.phplist/core.routes. ' . $ routeName . '" section in the composer.json must be an array.' , 1506429860 ) ; } } }
Validates the routes section in the "extra" section of the composer.json of a module.

@param array $extra

@return void

@throws \InvalidArgumentException if $extra has an invalid routes configuration
Validates the routes section in the extra section of the composer . json of a module .