Commit dde23a1b by 王召彬

优化代码

parent df0861b9
...@@ -22,7 +22,7 @@ class StoreError ...@@ -22,7 +22,7 @@ class StoreError
const E5209 = ['code'=>400, 'errCode'=>5209, 'msg'=>'xxxx']; const E5209 = ['code'=>400, 'errCode'=>5209, 'msg'=>'xxxx'];
const E5210 = ['code'=>400, 'errCode'=>5210, 'msg'=>'xxxx']; const E5210 = ['code'=>400, 'errCode'=>5210, 'msg'=>'xxxx'];
public function getError($code) { public static function getError($code) {
$reflect = new \ReflectionClass(StoreEnum::class); $reflect = new \ReflectionClass(StoreEnum::class);
return $reflect->getConstant('E'.$code); return $reflect->getConstant('E'.$code);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment