use !== to check field visibility
use class constants
This commit is contained in:
parent
69f0d70a98
commit
72d5d0281a
1 changed files with 1 additions and 1 deletions
|
@ -316,7 +316,7 @@ public function <methodName>()
|
||||||
*/
|
*/
|
||||||
public function setFieldVisibility($visibility)
|
public function setFieldVisibility($visibility)
|
||||||
{
|
{
|
||||||
if ($visibility != 'private' && $visibility != 'protected') {
|
if ($visibility !== EntityGenerator::FIELD_VISIBLE_PRIVATE && $visibility !== EntityGenerator::FIELD_VISIBLE_PROTECTED) {
|
||||||
throw new \InvalidArgumentException('Invalid provided visibilty (only private and protected are allowed): ' . $visibility);
|
throw new \InvalidArgumentException('Invalid provided visibilty (only private and protected are allowed): ' . $visibility);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue