コード例 #1
0
ファイル: abstractcheck.php プロジェクト: kenwi/core
 /**
  * @param int $errorCode
  * @param string $errorObject
  * @return string
  */
 public function getDescription($errorCode, $errorObject)
 {
     switch ($errorCode) {
         case CodeChecker::STATIC_CALL_NOT_ALLOWED:
             $functions = $this->getLocalFunctions();
             $functions = array_change_key_case($functions, CASE_LOWER);
             if (isset($functions[$errorObject])) {
                 return $this->getLocalDescription();
             }
             // no break;
         // no break;
         case CodeChecker::CLASS_EXTENDS_NOT_ALLOWED:
         case CodeChecker::CLASS_IMPLEMENTS_NOT_ALLOWED:
         case CodeChecker::CLASS_NEW_NOT_ALLOWED:
         case CodeChecker::CLASS_USE_NOT_ALLOWED:
             $classes = $this->getLocalClasses();
             $classes = array_change_key_case($classes, CASE_LOWER);
             if (isset($classes[$errorObject])) {
                 return $this->getLocalDescription();
             }
             break;
         case CodeChecker::CLASS_CONST_FETCH_NOT_ALLOWED:
             $constants = $this->getLocalConstants();
             $constants = array_change_key_case($constants, CASE_LOWER);
             if (isset($constants[$errorObject])) {
                 return $this->getLocalDescription();
             }
             break;
         case CodeChecker::CLASS_METHOD_CALL_NOT_ALLOWED:
             $methods = $this->getLocalMethods();
             $methods = array_change_key_case($methods, CASE_LOWER);
             if (isset($methods[$errorObject])) {
                 return $this->getLocalDescription();
             }
             break;
     }
     return $this->check->getDescription($errorCode, $errorObject);
 }
コード例 #2
0
 /**
  * @param int $errorCode
  * @param string $errorObject
  * @return string
  */
 public function getDescription($errorCode, $errorObject)
 {
     return $this->check->getDescription($errorCode, $errorObject);
 }