private function checkComposer()
    {
        $composerJsonDetected = false;
        $composerLockDetected = false;
        foreach (GitUtils::extractCommitedFiles() as $file) {
            if ($file === 'composer.json') {
                $composerJsonDetected = true;
            }
            if ($file === 'composer.lock') {
                $composerLockDetected = true;
            }
        }
        if ($composerJsonDetected && !$composerLockDetected) {
            $this->output->writeln(
                '<bg=yellow;fg=black>
                 composer.lock must be commited if composer.json is modified!
                 </bg=yellow;fg=black>'
            );
        }
    }
private function checkComposer()
    {
        $composerJsonDetected = false;
        $composerLockDetected = false;
        foreach (GitUtils::extractCommitedFiles() as $file) {
            if ($file === 'composer.json') {
                $composerJsonDetected = true;
            }
            if ($file === 'composer.lock') {
                $composerLockDetected = true;
            }
        }
        if ($composerJsonDetected && !$composerLockDetected) {
            $this->output->writeln(
                '<bg=yellow;fg=black>
                 composer.lock must be commited if composer.json is modified!
                 </bg=yellow;fg=black>'
            );
        }
    }
private function checkComposer ( ) { $ composerJsonDetected = false ; $ composerLockDetected = false ; foreach ( GitUtils :: extractCommitedFiles ( ) as $ file ) { if ( $ file === 'composer.json' ) { $ composerJsonDetected = true ; } if ( $ file === 'composer.lock' ) { $ composerLockDetected = true ; } } if ( $ composerJsonDetected && ! $ composerLockDetected ) { $ this -> output -> writeln ( '<bg=yellow;fg=black>
                 composer.lock must be commited if composer.json is modified!
                 </bg=yellow;fg=black>' ) ; } }
Check composer.json and composer.lock files
Check composer . json and composer . lock files