LazyRecord\Command\SchemaCommand\StatusCommand::execute PHP Method

execute() public method

public execute ( )
    public function execute()
    {
        $logger = $this->getLogger();
        $config = $this->getConfigLoader();
        $this->logger->debug('Finding schemas...');
        $actionLogger = new ActionLogger(STDERR);
        $schemas = SchemaUtils::findSchemasByArguments($this->getConfigLoader(), func_get_args(), $this->logger);
        foreach ($schemas as $schema) {
            if ($this->logger->isVerbose()) {
                $actionLog = $actionLogger->newAction(get_class($schema), get_class($schema));
                $actionLog->setActionColumnWidth(50);
            } elseif ($this->logger->isDebug()) {
                $filepath = str_replace(getcwd() . '/', '', $schema->getClassFileName());
                $actionLog = $actionLogger->newAction($filepath, get_class($schema));
                $actionLog->setActionColumnWidth(50);
            } else {
                $actionLog = $actionLogger->newAction($schema->getShortClassName(), get_class($schema));
            }
            $actionLog->setStatus('checking');
            if ($schema->requireProxyFileUpdate()) {
                $actionLog->setStatus('modified', 'yellow');
            } else {
                $actionLog->setStatus('up-to-date');
            }
            $actionLog->finalize();
        }
    }