src/Console/Application.php
protected function isUpdateNeeded(InputInterface $input, OutputInterface $output)
    {
        if ('@warning_time@' !== Tenside::WARNING_TIME) {
            $commandName = '';
            if ($name = $this->getCommandName($input)) {
                try {
                    $commandName = $this->find($name)->getName();
                } catch (\InvalidArgumentException $e) {
                    // Swallow the exception.
                }
            }
            if ($commandName !== 'self-update' && $commandName !== 'selfupdate') {
                if (time() > Tenside::WARNING_TIME) {
                    $output->writeln(
                        sprintf(
                            '<warning>Warning: This development build is over 30 days old. ' .
                            'It is recommended to update it by running "%s self-update" to get the latest version.' .
                            '</warning>',
                            $_SERVER['PHP_SELF']
                        )
                    );

                    return true;
                }
            }
        }

        return false;
    }
protected function isUpdateNeeded(InputInterface $input, OutputInterface $output)
    {
        if ('@warning_time@' !== Tenside::WARNING_TIME) {
            $commandName = '';
            if ($name = $this->getCommandName($input)) {
                try {
                    $commandName = $this->find($name)->getName();
                } catch (\InvalidArgumentException $e) {
                    // Swallow the exception.
                }
            }
            if ($commandName !== 'self-update' && $commandName !== 'selfupdate') {
                if (time() > Tenside::WARNING_TIME) {
                    $output->writeln(
                        sprintf(
                            '<warning>Warning: This development build is over 30 days old. ' .
                            'It is recommended to update it by running "%s self-update" to get the latest version.' .
                            '</warning>',
                            $_SERVER['PHP_SELF']
                        )
                    );

                    return true;
                }
            }
        }

        return false;
    }
protected function isUpdateNeeded ( InputInterface $ input , OutputInterface $ output ) { if ( '@warning_time@' !== Tenside :: WARNING_TIME ) { $ commandName = '' ; if ( $ name = $ this -> getCommandName ( $ input ) ) { try { $ commandName = $ this -> find ( $ name ) -> getName ( ) ; } catch ( \ InvalidArgumentException $ e ) { // Swallow the exception. } } if ( $ commandName !== 'self-update' && $ commandName !== 'selfupdate' ) { if ( time ( ) > Tenside :: WARNING_TIME ) { $ output -> writeln ( sprintf ( '<warning>Warning: This development build is over 30 days old. ' . 'It is recommended to update it by running "%s self-update" to get the latest version.' . '</warning>' , $ _SERVER [ 'PHP_SELF' ] ) ) ; return true ; } } } return false ; }
Check if updating is needed.

@param InputInterface  $input  The input interface.
@param OutputInterface $output The output interface.

@return bool

@SuppressWarnings(PHPMD.Superglobals)
@SuppressWarnings(PHPMD.CamelCaseVariableName)
Check if updating is needed .