src/Utils/DatabaseManager.php
private function exec($command)
    {
        // Adding credentials after "mysql" and "mysqldump" commands.
        $command = preg_replace(
            '/(mysql(?:dump)?)/',
            "\\1 $this->credentials",
            vsprintf($command, array_slice(func_get_args(), 1))
        );

        if (method_exists($this->callee, 'debug')) {
            call_user_func([$this->callee, 'debug'], [$command]);
        }

        return trim(shell_exec($command));
    }
private function exec($command)
    {
        // Adding credentials after "mysql" and "mysqldump" commands.
        $command = preg_replace(
            '/(mysql(?:dump)?)/',
            "\\1 $this->credentials",
            vsprintf($command, array_slice(func_get_args(), 1))
        );

        if (method_exists($this->callee, 'debug')) {
            call_user_func([$this->callee, 'debug'], [$command]);
        }

        return trim(shell_exec($command));
    }
Executes a shell command.

@param string $command
Command to execute.

@return string
Result of a shell command.