protected function checkProperty(OutputInterface $output, CheckInterface $property)
    {
        $result = $property->check();

        if ($result === false) {
            $outputLevel = 'error';
            $sign = self::EMOJI_FAILURE;

            if ($property->isOptional() === true) {
                $outputLevel = 'comment';
                $sign = self::EMOJI_OPTIONAL;
            }

            $message = $property->getFailureMessage();

            // The default value from overallResult is true.
            // So it is enough to set it to false once.
            $this->overallResult = false;

        } elseif ($result === true) {
            $outputLevel = 'info';
            $sign = self::EMOJI_OK;
            $message = $property->getSuccessMessage();
        }

        $outputMessage = "  <info>%s</info>   <%s>%s</%s>";
        $outputMessage = sprintf($outputMessage, $sign, $outputLevel, $message, $outputLevel);
        $output->writeln($outputMessage);

        return $result;
    }
protected function checkProperty(OutputInterface $output, CheckInterface $property)
    {
        $result = $property->check();

        if ($result === false) {
            $outputLevel = 'error';
            $sign = self::EMOJI_FAILURE;

            if ($property->isOptional() === true) {
                $outputLevel = 'comment';
                $sign = self::EMOJI_OPTIONAL;
            }

            $message = $property->getFailureMessage();

            // The default value from overallResult is true.
            // So it is enough to set it to false once.
            $this->overallResult = false;

        } elseif ($result === true) {
            $outputLevel = 'info';
            $sign = self::EMOJI_OK;
            $message = $property->getSuccessMessage();
        }

        $outputMessage = "  <info>%s</info>   <%s>%s</%s>";
        $outputMessage = sprintf($outputMessage, $sign, $outputLevel, $message, $outputLevel);
        $output->writeln($outputMessage);

        return $result;
    }
protected function checkProperty ( OutputInterface $ output , CheckInterface $ property ) { $ result = $ property -> check ( ) ; if ( $ result === false ) { $ outputLevel = 'error' ; $ sign = self :: EMOJI_FAILURE ; if ( $ property -> isOptional ( ) === true ) { $ outputLevel = 'comment' ; $ sign = self :: EMOJI_OPTIONAL ; } $ message = $ property -> getFailureMessage ( ) ; // The default value from overallResult is true. // So it is enough to set it to false once. $ this -> overallResult = false ; } elseif ( $ result === true ) { $ outputLevel = 'info' ; $ sign = self :: EMOJI_OK ; $ message = $ property -> getSuccessMessage ( ) ; } $ outputMessage = "  <info>%s</info>   <%s>%s</%s>" ; $ outputMessage = sprintf ( $ outputMessage , $ sign , $ outputLevel , $ message , $ outputLevel ) ; $ output -> writeln ( $ outputMessage ) ; return $ result ; }
Checks a single property

@param OutputInterface $output
@param CheckInterface $property
@return bool
Checks a single property