public function check($data = null, &$failed = null) {
        // reset var if it is defined
        $failed = null;

        $valid = $this->checkType($data, $failed) && $this->checkValueSet($data, $failed);

        if (!$valid) Structure::$lastFail = $failed;
        return $valid;
    }
public function check($data = null, &$failed = null) {
        // reset var if it is defined
        $failed = null;

        $valid = $this->checkType($data, $failed) && $this->checkValueSet($data, $failed);

        if (!$valid) Structure::$lastFail = $failed;
        return $valid;
    }
public function check ( $ data = null , & $ failed = null ) { // reset var if it is defined $ failed = null ; $ valid = $ this -> checkType ( $ data , $ failed ) && $ this -> checkValueSet ( $ data , $ failed ) ; if ( ! $ valid ) Structure :: $ lastFail = $ failed ; return $ valid ; }
Runs type and value set tests

@api

@param mixed $data
@param $failed
@return boolean
Runs type and value set tests