code: 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))
          );
  
          self::debug(['%s'], [$command]);
  
          return trim(shell_exec($command));
      }
docs: Executes a shell command.
  
  @param string $command
  Command to execute.
  
  @return string
  Result of a shell command.