public function parseCommand($originCommand)
    {
        $mappings = [
            'create' => ['create'],
            'drop'   => ['drop', 'dropIfExists'],
        ];

        foreach ($mappings as $key => $mapping) {
            if (in_array($originCommand, $mapping)) {
                return $key;
            }
        }

        return null;
    }
public function parseCommand($originCommand)
    {
        $mappings = [
            'create' => ['create'],
            'drop'   => ['drop', 'dropIfExists'],
        ];

        foreach ($mappings as $key => $mapping) {
            if (in_array($originCommand, $mapping)) {
                return $key;
            }
        }

        return null;
    }
public function parseCommand ( $ originCommand ) { $ mappings = [ 'create' => [ 'create' ] , 'drop' => [ 'drop' , 'dropIfExists' ] , ] ; foreach ( $ mappings as $ key => $ mapping ) { if ( in_array ( $ originCommand , $ mapping ) ) { return $ key ; } } return null ; }
Parse origin command to human command

@param $originCommand

@return int|null|string
Parse origin command to human command