We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
疑问:这样就可以删除方法上面“多余的final”,还是仅仅某些方法打算继承,才这样写??????? `final class SplEnum { private $val = null; private $name = null;
public function __construct($val) { $list = self::getConstants(); //禁止重复值 if (count($list) != count(array_unique($list))) { $class = static::class; throw new \Exception("class : {$class} define duplicate value"); } $this->val = $val; $this->name = self::isValidValue($val); if($this->name === false){ throw new \Exception("invalid value"); } } public function getName():string { return $this->name; } public function getValue() { return $this->val; }
}`
The text was updated successfully, but these errors were encountered:
No branches or pull requests
疑问:这样就可以删除方法上面“多余的final”,还是仅仅某些方法打算继承,才这样写???????
`final class SplEnum
{
private $val = null;
private $name = null;
}`
The text was updated successfully, but these errors were encountered: