public function getCommand($command, $aliases = true)
    {
        if (array_key_exists($command, $this->commands)) {
            return $this->commands[$command];
        }

        if (array_key_exists($command, $this->aliases) && $aliases) {
            return $this->commands[$this->aliases[$command]];
        }
    }
public function getCommand($command, $aliases = true)
    {
        if (array_key_exists($command, $this->commands)) {
            return $this->commands[$command];
        }

        if (array_key_exists($command, $this->aliases) && $aliases) {
            return $this->commands[$this->aliases[$command]];
        }
    }
public function getCommand ( $ command , $ aliases = true ) { if ( array_key_exists ( $ command , $ this -> commands ) ) { return $ this -> commands [ $ command ] ; } if ( array_key_exists ( $ command , $ this -> aliases ) && $ aliases ) { return $ this -> commands [ $ this -> aliases [ $ command ] ] ; } }
Attempts to get a command.

@param string $command The command to get.
@param bool   $aliases Whether to search aliases as well.

@return Command|null The command.
Attempts to get a command .