src/BinWrapper.php
private function binCheck($bin, $args = ['--help'])
    {
        $isExecutable = is_executable($bin);

        if (!$isExecutable) {
            throw new \Exception(
                'Couldn\'t execute the ' . $bin . ' binary. Make sure it has the right permissions.'
            );
        }

        exec($bin . ' ' . implode(' ', $args), $output, $returnVar);

        if ($returnVar !== 0) {
            return false;
        }

        return true;
    }
private function binCheck($bin, $args = ['--help'])
    {
        $isExecutable = is_executable($bin);

        if (!$isExecutable) {
            throw new \Exception(
                'Couldn\'t execute the ' . $bin . ' binary. Make sure it has the right permissions.'
            );
        }

        exec($bin . ' ' . implode(' ', $args), $output, $returnVar);

        if ($returnVar !== 0) {
            return false;
        }

        return true;
    }
private function binCheck ( $ bin , $ args = [ '--help' ] ) { $ isExecutable = is_executable ( $ bin ) ; if ( ! $ isExecutable ) { throw new \ Exception ( 'Couldn\'t execute the ' . $ bin . ' binary. Make sure it has the right permissions.' ) ; } exec ( $ bin . ' ' . implode ( ' ' , $ args ) , $ output , $ returnVar ) ; if ( $ returnVar !== 0 ) { return false ; } return true ; }
Todo move to separatly repository
Todo move to separatly repository