protected function validateArgs(array $models) : array
    {
        $validModels = [];

        foreach ($models as $model) {
            if (!class_exists($model)) {
                $this->error('Class "' . $model . '"" does not exist');
                $this->line('');
            } elseif (!(new \ReflectionClass($model))->isInstantiable()) {
                $this->error('Class "' . $model . '" is not instantiable');
                $this->line('');
            } elseif (is_a($model, Model::class)) {
                $this->error('Class "' . $model . '" is not an instance of ' . Model::class);
                $this->line('');
            } else {
                $validModels[] = $model;
            }
        }

        return $validModels;
    }
protected function validateArgs(array $models) : array
    {
        $validModels = [];

        foreach ($models as $model) {
            if (!class_exists($model)) {
                $this->error('Class "' . $model . '"" does not exist');
                $this->line('');
            } elseif (!(new \ReflectionClass($model))->isInstantiable()) {
                $this->error('Class "' . $model . '" is not instantiable');
                $this->line('');
            } elseif (is_a($model, Model::class)) {
                $this->error('Class "' . $model . '" is not an instance of ' . Model::class);
                $this->line('');
            } else {
                $validModels[] = $model;
            }
        }

        return $validModels;
    }
protected function validateArgs ( array $ models ) : array { $ validModels = [ ] ; foreach ( $ models as $ model ) { if ( ! class_exists ( $ model ) ) { $ this -> error ( 'Class "' . $ model . '"" does not exist' ) ; $ this -> line ( '' ) ; } elseif ( ! ( new \ ReflectionClass ( $ model ) ) -> isInstantiable ( ) ) { $ this -> error ( 'Class "' . $ model . '" is not instantiable' ) ; $ this -> line ( '' ) ; } elseif ( is_a ( $ model , Model :: class ) ) { $ this -> error ( 'Class "' . $ model . '" is not an instance of ' . Model :: class ) ; $ this -> line ( '' ) ; } else { $ validModels [ ] = $ model ; } } return $ validModels ; }
Validate given arguments models

@param array $models
@return array
Validate given arguments models