Gets an inheritance finder for the Laravel Framework.

@return InheritanceFinder
487862
protected function getInheritanceFinder(){
        if(!file_exists(storage_path('class_cache'))){
            mkdir(storage_path('class_cache'));
        }

        $config = new \Synga\InheritanceFinder\File\FileConfig();

        $config->setApplicationRoot(base_path());
        $config->setCacheDirectory(storage_path('class_cache'));

        return (new InheritanceFinderFactory())->getInheritanceFinder($config);
    }
242825
public function getInspector()
	{
		if (!isset($this->inspector))
		{
			$this->inspector = new TemplateInspector($this->__toString());
		}

		return $this->inspector;
	}
528301
protected function getVersionedRedisSentinelManagerClass()
    {
        if ($this->config->isLumen) {
            $frameworkVersion = '5.4';
        } else {
            $frameworkVersion = '5.4.20';
        }

        if ($this->appVersionLessThan($frameworkVersion)) {
            return Laravel540RedisSentinelManager::class;
        }

        return Laravel5420RedisSentinelManager::class;
    }
278430
public function getServiceBroker()
    {
        if (!$this->serviceBroker) {
            $this->setServiceBroker($this->getServiceLocator()->get('ServiceBroker'));
        }
        
        return $this->serviceBroker;
    }
675348
public function getBaseClass()
    {
        if ($this->isAlias() && $this->baseClass === null) {
            return $this->alias;
        } elseif ($this->baseClass === null) {
            return $this->getDatabase()->getBaseClass();
        } else {
            return $this->baseClass;
        }
    }
398393
public function getInheritedElement()
    {
        /** @var ClassDescriptor|InterfaceDescriptor|null $associatedClass */
        $associatedClass = $this->getParent();

        if (($associatedClass instanceof ClassDescriptor || $associatedClass instanceof InterfaceDescriptor)
            && ($associatedClass->getParent() instanceof ClassDescriptor
                || $associatedClass->getParent() instanceof InterfaceDescriptor
            )
        ) {
            /** @var ClassDescriptor|InterfaceDescriptor $parentClass */
            $parentClass = $associatedClass->getParent();

            return $parentClass->getProperties()->get($this->getName());
        }

        return null;
    }
207964
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root('sidus_eav_model');
        /** @var NodeBuilder $attributeDefinition */
        $attributeDefinition = $rootNode
            ->children()
                ->scalarNode('data_class')->isRequired()->end()
                ->scalarNode('value_class')->isRequired()->end()
                ->booleanNode('serializer_enabled')->defaultFalse()->end()
                ->scalarNode('collection_type')->defaultValue(CollectionType::class)->end()
                ->scalarNode('context_form_type')->defaultNull()->end()
                ->variableNode('default_context')->defaultValue([])->end()
                ->arrayNode('global_context_mask')
                    ->prototype('scalar')->defaultValue([])->end()
                ->end()
                ->arrayNode('attributes')
                    ->useAttributeAsKey('code')
                    ->prototype('array')
                        ->performNoDeepMerging()
                        ->cannotBeOverwritten()
                        ->children();

        $this->appendAttributeDefinition($attributeDefinition);

        /** @var NodeBuilder $familyDefinition */
        $familyDefinition = $attributeDefinition
                        ->end()
                    ->end()
                ->end()
                ->arrayNode('families')
                    ->useAttributeAsKey('code')
                    ->prototype('array')
                        ->performNoDeepMerging()
                        ->cannotBeOverwritten()
                        ->children();

        $this->appendFamilyDefinition($familyDefinition);

        $familyDefinition
                        ->end()
                    ->end()
                ->end()
            ->end();

        return $treeBuilder;
    }
120924
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder('tactician');

        if (\method_exists($treeBuilder, 'getRootNode')) {
            $rootNode = $treeBuilder->getRootNode();
        } else {
            // BC layer for symfony/config 4.1 and older
            $rootNode = $treeBuilder->root('tactician');
        }

        $rootNode
            ->children()
                ->arrayNode('commandbus')
                    ->defaultValue(['default' => ['middleware' => ['tactician.middleware.command_handler']]])
                    ->requiresAtLeastOneElement()
                    ->useAttributeAsKey('name')
                    ->prototype('array')
                        ->children()
                            ->arrayNode('middleware')
                                ->requiresAtLeastOneElement()
                                ->useAttributeAsKey('name')
                                ->prototype('scalar')->end()
                                ->validate()
                                    ->ifTrue(function ($config) {
                                        $isPresent = in_array('tactician.middleware.command_handler', $config);
                                        $isLast = end($config) == 'tactician.middleware.command_handler';

                                        return $isPresent && !$isLast;
                                    })
                                    ->thenInvalid(
                                        '"tactician.middleware.command_handler" should be the last middleware loaded '.
                                        'when it is used.'
                                    )
                                ->end()
                            ->end()
                            ->scalarNode('method_inflector')->end()
                        ->end()
                    ->end()
                ->end()
                ->scalarNode('default_bus')
                    ->defaultValue(BusBuildersFromConfig::DEFAULT_BUS_ID)
                    ->cannotBeEmpty()
                ->end()
                ->scalarNode('method_inflector')
                    ->defaultValue(BusBuildersFromConfig::DEFAULT_METHOD_INFLECTOR)
                    ->cannotBeEmpty()
                ->end()
                ->arrayNode('security')
                    ->defaultValue([])
                    ->useAttributeAsKey('name')
                    ->prototype('array')
                        ->prototype('scalar')->end()
                    ->end()
                ->end()
                ->scalarNode('logger_formatter')
                    ->defaultValue('tactician.logger.class_properties_formatter')
                    ->cannotBeEmpty()
                ->end()
            ->end()
            ->validate()
                ->ifTrue(function ($config) {
                    return is_array($config) &&
                        array_key_exists('default_bus', $config) &&
                        array_key_exists('commandbus', $config)
                    ;
                })
                    ->then(function ($config) {
                        $busNames = [];
                        foreach ($config['commandbus'] as $busName => $busConfig) {
                            $busNames[] = $busName;
                        }

                        if (!in_array($config['default_bus'], $busNames)) {
                            throw new InvalidConfigurationException(
                                sprintf(
                                    'The default_bus "%s" was not defined as a command bus. Valid option(s): %s',
                                    $config['default_bus'],
                                    implode(', ', $busNames)
                                )
                            );
                        }

                        return $config;
                    })
            ->end()
        ;

        return $treeBuilder;
    }
721476
protected function applyAncestor()
    {

        if ($this->skipAncestor === true) {
            return $this;
        }

        $ancestor = $this->getAncestor();

        if ($ancestor) {
            foreach ($ancestor as $a) {
                if ($a instanceof AncestorCriteriaInterface) {
                    $this->model = $a->apply($this->model, $this);
                }
            }
        }

        return $this;
    }
638216
public function getBaseTypeClass()
    {
        // If we have a base type which is different than the current class then extend that.
        // It is actually possible to have different classes with the same name as PHP SoapClient has a poor
        // understanding of namespaces. Two types with the same name but in different namespaces will have the same
        // identifier.
        if ($this->baseType !== null && $this->baseType !== $this) {
            return $this->baseType->getPhpIdentifier();
        }

        return null;
    }
1089873
public function getConfigTreeBuilder()
    {
        $builder = new TreeBuilder();
        $finder = new ExecutableFinder();
        $rootNode = $builder->root('assetic');

        $rootNode
            ->children()
                ->booleanNode('debug')->defaultValue('%kernel.debug%')->end()
                ->arrayNode('use_controller')
                    ->addDefaultsIfNotSet()
                    ->treatTrueLike(array('enabled' => true))
                    ->treatFalseLike(array('enabled' => false))
                    ->children()
                        ->booleanNode('enabled')->defaultValue('%kernel.debug%')->end()
                        ->booleanNode('profiler')->defaultFalse()->end()
                    ->end()
                ->end()
                ->scalarNode('read_from')->defaultValue('%kernel.root_dir%/../web')->end()
                ->scalarNode('write_to')->defaultValue('%assetic.read_from%')->end()
                ->scalarNode('java')->defaultValue(function () use ($finder) { return $finder->find('java', '/usr/bin/java'); })->end()
                ->scalarNode('node')->defaultValue(function () use ($finder) { return $finder->find('node', '/usr/bin/node'); })->end()
                ->arrayNode('node_paths')
                    ->prototype('scalar')->end()
                ->end()
                ->scalarNode('ruby')->defaultValue(function () use ($finder) { return $finder->find('ruby', '/usr/bin/ruby'); })->end()
                ->scalarNode('sass')->defaultValue(function () use ($finder) { return $finder->find('sass', '/usr/bin/sass'); })->end()
                ->scalarNode('reactjsx')->defaultValue(function () use ($finder) { return $finder->find('reactjsx', '/usr/bin/jsx'); })->end()
            ->end()
        ;

        $this->addVariablesSection($rootNode);
        $this->addBundlesSection($rootNode);
        $this->addAssetsSection($rootNode);
        $this->addFiltersSection($rootNode, $finder);
        $this->addWorkersSection($rootNode);
        $this->addTwigSection($rootNode);

        return $builder;
    }
1276746
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder('sonata_doctrine_mongo_db_admin');

        // Keep compatibility with symfony/config < 4.2
        if (!method_exists($treeBuilder, 'getRootNode')) {
            $rootNode = $treeBuilder->root('sonata_doctrine_mongo_db_admin');
        } else {
            $rootNode = $treeBuilder->getRootNode();
        }

        $rootNode
            ->children()
                ->arrayNode('templates')
                    ->addDefaultsIfNotSet()
                    ->children()
                        ->arrayNode('form')
                            ->prototype('scalar')->end()
                            ->defaultValue(['@SonataDoctrineMongoDBAdmin/Form/form_admin_fields.html.twig'])
                        ->end()
                        ->arrayNode('filter')
                            ->prototype('scalar')->end()
                            ->defaultValue(['@SonataDoctrineMongoDBAdmin/Form/filter_admin_fields.html.twig'])
                        ->end()
                        ->arrayNode('types')
                            ->children()
                                ->arrayNode('list')
                                    ->useAttributeAsKey('name')
                                    ->prototype('scalar')->end()
                                ->end()
                                ->arrayNode('show')
                                    ->useAttributeAsKey('name')
                                    ->prototype('scalar')->end()
                                ->end()
                            ->end()
                        ->end()
                    ->end()
                ->end()
            ->end()
        ;

        return $treeBuilder;
    }
1016028
protected function getConfigHandler()
    {
        if (null !== $typeInfo = ServiceManager::getServiceType($this->type)) {
            // lookup related service type config model
            return $typeInfo->getConfigHandler();
        }

        return null;
    }
246424
protected function setupFinder()
    {
        $finder = new Finder();
        $finder
            ->in($this->config->getIncludedPaths())
            ->notPath('/vendor/')
            ->files();
        foreach ($this->config->getExcludedPaths() as $excluded) {
            $finder->notPath($excluded);
        }

        return $finder;
    }
288707
protected function getParentClassName()
    {
        if (is_null($this->getChild()->getAncestor())) {
            return $this->getNewStubQueryBuilder($this->getTable())->getUnqualifiedClassName();
        }

        $ancestorClassName = ClassTools::classname($this->getChild()->getAncestor());
        if ($this->getDatabase()->hasTableByPhpName($ancestorClassName)) {
            return $this->getNewStubQueryBuilder($this->getDatabase()->getTableByPhpName($ancestorClassName))->getUnqualifiedClassName();
        }

        // find the inheritance for the parent class
        foreach ($this->getTable()->getChildrenColumn()->getChildren() as $child) {
            if ($child->getClassName() == $ancestorClassName) {
                return $this->getNewStubQueryInheritanceBuilder($child)->getUnqualifiedClassName();
            }
        }
    }
1077024
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root($this->alias);
        $rootNode
            ->validate()
                ->ifTrue(function($v) {
                    return !empty($v['enabled']) && empty($v['pools']);
                })
                ->thenInvalid('The child node "pools" at path "'.$this->alias.'" must be configured.')
            ->end()
            ->children()
                ->scalarNode('enabled')
                    ->defaultTrue()
                ->end()
                ->arrayNode('listeners')
                    ->addDefaultsIfNotSet()
                    ->children()
                        ->booleanNode('clear_entity_managers')->defaultTrue()->end()
                        ->booleanNode('clear_logs')->defaultTrue()->end()
                    ->end()
                ->end()
                ->arrayNode('pools')
                    ->requiresAtLeastOneElement()
                    ->validate()
                    ->ifTrue(function (array $value) {
                            return !array_key_exists('default', $value);
                    })
                        ->thenInvalid('Default service not present')
                    ->end()
                    ->prototype('array')
                        ->children()
                            ->scalarNode('send_driver')
                                ->isRequired()
                                ->validate()
                                ->ifTrue(function ($value) {
                                        return !preg_match('/^@[a-zA-Z\.\-0-9\_]+$/', $value);
                                })
                                    ->thenInvalid('Malformed service ID "%s"')
                                ->end()
                            ->end()
                        ->end()
                    ->end()
                ->end()
                ->arrayNode('routes')
                    ->normalizeKeys(false)
                    ->prototype('scalar')
                        ->isRequired()
                    ->end()
                ->end()
            ->end()
            ;

        return $treeBuilder;
    }
479826
protected function getFinder(): PathFinderInterface
    {
        $result = ClassFactory::createFinder($this->configType, $this->options);

        return $result;
    }