{@inheritdoc}

@throws \LogicException
493054
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $io = new SymfonyStyle($input, $output);

        $options = [];
        if ($event = $input->getArgument('event')) {
            if (!$this->dispatcher->hasListeners($event)) {
                $io->getErrorStyle()->warning(sprintf('The event "%s" does not have any registered listeners.', $event));

                return;
            }

            $options = ['event' => $event];
        }

        $helper = new DescriptorHelper();
        $options['format'] = $input->getOption('format');
        $options['raw_text'] = $input->getOption('raw');
        $options['output'] = $io;
        $helper->describe($io, $this->dispatcher, $options);
    }
518770
public function getAttribute($key)
    {
        if (! is_null($value = parent::getAttribute($key))) {
            return $value;
        }

        // If a custom relation with this key has been set up, then we will load
        // and return results from the query and hydrate the relationship's
        // value on the "relationships" array.
        if (! $this->relationLoaded($key) && ($relation = $this->getCustomRelation($key))) {
            if (! $relation instanceof Relation) {
                throw new LogicException(
                    'Relationship method must return an object of type '.Relation::class
                );
            }

            return $this->relations[$key] = $relation->getResults();
        }
    }
1162174
public function update()
    {
        if( !$this->tableName ) {
            throw new LogicException('No table name specified');
        }
        return $this->database->update()
                ->table($this->tableName);
    }
706469
public function toModel()
    {
        $nodeClass = $this->getElement()->NodeClass;
        if ($nodeClass === 'Node') {
            throw new LogicException('You must set a custom node in <node_class/> for element: ' . $this->getElement()->getSlug());
        } else {
            throw new LogicException('You must create a toModel method in: ' . $nodeClass);
        }
    }
1228344
public function process(ContainerBuilder $container)
    {
        if (!$container->has($this->helperCollectionId)) {
            throw new \LogicException(
                sprintf(
                    'Helper collection service "%s" is not defined',
                    $this->helperCollectionId
                )
            );
        }

        $helperCollection = $container->findDefinition($this->helperCollectionId);

        foreach ($container->findTaggedServiceIds($this->tagName) as $helperServiceId => $tags) {
            $helperCollection->addMethodCall('set', [new Reference($helperServiceId)]);
        }
    }
542888
public function setDefault($default = null)
    {
        if (self::REQUIRED === $this->mode && null !== $default) {
            throw new LogicException('Cannot set a default value except for InputArgument::OPTIONAL mode.');
        }

        if ($this->isArray()) {
            if (null === $default) {
                $default = [];
            } elseif (!\is_array($default)) {
                throw new LogicException('A default value for an array argument must be an array.');
            }
        }

        $this->default = $default;
    }
38869
public function yieldLists(): \Generator
    {
        if (!isset($this->dataObjectFactory)) {
            throw new \LogicException('setDataObjectFactory must be called before calling nextList.');
        }

        if (!isset($this->objectListQuery)) {
            throw new \LogicException('setByFields must be called before calling nextList.');
        }

        // We need to yield ourselves first.
        $thisList = new Promise();
        $thisList->resolve($this);
        yield $thisList;

        $ranges = Range::nextRanges($this);
        foreach ($ranges as $range) {
            $byFields = clone $this->objectListQuery;
            $byFields->setRange($range);
            yield $this->dataObjectFactory->selectRequest($byFields);
        }
    }
503820
public function offsetSet($offset, $value) {
		$thing = $this->get($offset);
		if (!$thing->isFile() && $thing->isDirectory()) {
			throw  new LogicException("Cannot write to directory.");
		}
		/**
		 * @var File $thing
		 */

		if ($thing->isFile()) {
			$thing->write($value);
		} else {
			$this->createFile($offset, $value);
		}
	}
1194525
protected function getRelationshipFromMethod($method)
    {
        $relation = $this->$method();

        if (! $relation instanceof Relation) {
            throw new LogicException(sprintf(
                '%s::%s must return a relationship instance.', static::class, $method
            ));
        }

        return tap($relation->getResults(), function ($results) use ($method) {
            $this->setRelation($method, $results);
        });
    }
742796
public function select()
    {
        if( !$this->tableName ) {
            throw new LogicException('No table name specified');
        }
        $q = $this->database->select();
        $q->table($this->tableName);
        if( $this->resultClass ) {
            $q->setResultClass($this->resultClass);
            $q->setResultParams($this->resultParams);
        }
        return $q;
    }
982015
function parseCommandArgs() {
        if($this->command === null) {
            throw new \LogicException('This message has no command');
        }
        
        switch($this->command->argsType) {
            case 'single':
                $args = $this->argString;
                return \preg_replace(($this->command->argsSingleQuotes ? '/^("|\')(.*)\1$/u' : '/^(")(.*)"$/u'), '$2', $args);
            case 'multiple':
                return self::parseArgs($this->argString, $this->command->argsCount, $this->command->argsSingleQuotes);
            default:
                throw new \RangeException('Unknown argsType "'.$this->command->argsType.'".');
        }
    }
623363
public function process(
        ObjectInterface $object,
        ResolvedFixtureSet $fixtureSet,
        GenerationContext $context,
        MethodCallInterface $methodCall
    ): ResolvedFixtureSet {
        /** @var StaticReference $reference */
        $reference = $methodCall->getCaller();

        if (false === ($reference instanceof StaticReference)) {
            throw new \LogicException('TODO');
        }

        $result = $reference->getId()::{$methodCall->getMethod()}(...$methodCall->getArguments());

        if ($context->needsCallResult()) {
            $object = $object->withInstance($result);
        }

        return $fixtureSet->withObjects(
            $fixtureSet->getObjects()->with($object)
        );
    }
756151
public function merge($output)
    {
        if (empty($this->files)) {
            throw new \LogicException("You need to add some files to merge by calling one of addFile, addFiles, setFiles methods");
        }

        /**
         * @var string $outputFiles
         */
        $outputFiles = array();
        foreach ($this->files as $file) {
            if (!$this->supports($file)) {
                if (!$this->omitUnsupported) {
                    throw new UnsupportedException(sprintf("Transformer for file '%s' not found, mime: %s", $file->getPath(), $file->getMimeType()));
                }
                continue;
            }
            if (!$this->driver->supports($file)) {
                $outputFile = $this->getTransformer($file)->transform($file);
                if (!$outputFile) {
                    throw new \LogicException(sprintf("Transformer should return NeuroSys\\FileMerger\\File in '%s' format", $this->driver->getFormat()));
                }
                $outputFiles[] = $outputFile->getPath();
            } else {
                $outputFiles[] = $file->getPath();
            }
        }

        if (count($outputFiles) == 1) {
            copy(end($outputFiles), $output);
        } elseif ($outputFiles) {
            $this->driver->merge($outputFiles, $output);
        }

        // reset files array
        $this->files = array();
    }
45978
public function load()
    {
        if ($this->loading) {
            return;
        }

        if ($diff = array_diff(array_keys($this->resources), array_keys($this->loaders))) {
            throw new \LogicException('The following loader(s) are not registered: '.implode(', ', $diff));
        }

        $this->loading = true;

        foreach ($this->resources as $loader => $resources) {
            foreach ($resources as $resource) {
                $this->formulae = array_replace($this->formulae, $this->loaders[$loader]->load($resource));
            }
        }

        $this->loaded = true;
        $this->loading = false;
    }
113948
public function getValue($offset = null)
    {
        if (null === $offset) {
            $offset = $this->offset;
        }

        $token = $this->getToken($offset);

        if (!isset(self::$hasValue[$token[0]])) {
            throw LogicException::create(
                'Token #%d (%d) is not expected to have a value.',
                $offset,
                $token[0]
            );
        }

        switch ($token[0]) {
            case DocLexer::T_FALSE:
                return false;
            case DocLexer::T_FLOAT:
                return (float) $token[1];
            case DocLexer::T_INTEGER:
                return (int) $token[1];
            case DocLexer::T_IDENTIFIER:
            case DocLexer::T_STRING:
                return $token[1];
            case DocLexer::T_TRUE:
                return true;
        }

        return null;
    }
495751
public function process(ContainerBuilder $container)
    {
        if (!$container->has($this->stylesCollectionId)) {
            throw new \LogicException(
                sprintf(
                    'Style collection service "%s" is not defined',
                    $this->stylesCollectionId
                )
            );
        }

        $stylesCollection = $container->findDefinition($this->stylesCollectionId);

        foreach ($container->findTaggedServiceIds($this->tagName) as $serviceStyleId => $tags) {
            foreach ($tags as $tagAttributes) {
                if (!isset($tagAttributes[$this->styleNameAttribute])) {
                    throw new \LogicException(
                        sprintf(
                            'Tag "%s" of service "%s" should have an attribute "%s"',
                            $this->tagName,
                            $serviceStyleId,
                            $this->styleNameAttribute
                        )
                    );
                }
                $name = $tagAttributes['style'];
                $stylesCollection->addMethodCall('set', [$name, new Reference($serviceStyleId)]);
            }
        }
    }
57924
public function defineMethods()
    {
        if ($this->failover && !is_object($this->failover)) {
            throw new LogicException("ViewableData::\$failover set to a non-object");
        }
        if ($this->failover) {
            $this->addMethodsFrom('failover');

            if (isset($_REQUEST['debugfailover'])) {
                $class = static::class;
                $failoverClass = get_class($this->failover);
                Debug::message("$class created with a failover class of {$failoverClass}");
            }
        }
        $this->extensibleDefineMethods();
    }