src/MalScraper/Model/MainModel.php
public static function errorCheck($model)
    {
        $className = self::getCleanClassName($model);

        if (strpos($className, 'Search') !== false) {
            if (strlen($model->_query) < 3) {
                $model->_error = 400;
            }
        }

        if (!$model->_error) {
            $header = self::getHeader($model->_url);
            if ($header == 200) {
                if ($className != 'UserListModel') {
                    $additionalSetting = ($className == 'CharacterPeoplePictureModel');
                    $model->_parser = self::getParser($model->_url, $model->_parserArea, $additionalSetting);
                }
            } else {
                $model->_error = $header;
            }
        }
    }
public static function errorCheck($model)
    {
        $className = self::getCleanClassName($model);

        if (strpos($className, 'Search') !== false) {
            if (strlen($model->_query) < 3) {
                $model->_error = 400;
            }
        }

        if (!$model->_error) {
            $header = self::getHeader($model->_url);
            if ($header == 200) {
                if ($className != 'UserListModel') {
                    $additionalSetting = ($className == 'CharacterPeoplePictureModel');
                    $model->_parser = self::getParser($model->_url, $model->_parserArea, $additionalSetting);
                }
            } else {
                $model->_error = $header;
            }
        }
    }
public static function errorCheck ( $ model ) { $ className = self :: getCleanClassName ( $ model ) ; if ( strpos ( $ className , 'Search' ) !== false ) { if ( strlen ( $ model -> _query ) < 3 ) { $ model -> _error = 400 ; } } if ( ! $ model -> _error ) { $ header = self :: getHeader ( $ model -> _url ) ; if ( $ header == 200 ) { if ( $ className != 'UserListModel' ) { $ additionalSetting = ( $ className == 'CharacterPeoplePictureModel' ) ; $ model -> _parser = self :: getParser ( $ model -> _url , $ model -> _parserArea , $ additionalSetting ) ; } } else { $ model -> _error = $ header ; } } }
Header error check.

@param MainModel $model Any model

@return void
Header error check .