style fixes

This commit is contained in:
Dennis Eichhorn 2023-09-21 00:17:39 +00:00
parent 1346dc247e
commit 867d671126
4 changed files with 50 additions and 54 deletions

View File

@ -80,7 +80,7 @@ echo 'Hello' , 'World';
## If ## If
#### Elseif ### Elseif
Use `elseif` where possible instead of `else if`. Use `elseif` where possible instead of `else if`.
@ -114,11 +114,7 @@ Instead of using `\file_exists()` the functions `\is_dir()` or `\is_file()` shou
Don't use the internal enum implementations of PHP (neither `SplEnum` nor `enum`) Don't use the internal enum implementations of PHP (neither `SplEnum` nor `enum`)
#### Model IDs ### Pseudo enums
Model IDs must always be private. They must not have a setter. Therfore most models need/should have a getter function which returns the model ID.
#### Pseudo enums
Whenever a scalar coming from the internal enum data type (`\phpOMS\Stdlib\Base\Enum`) is used the variable should be private and a getter and setter should exist for additional type checks. Whenever a scalar coming from the internal enum data type (`\phpOMS\Stdlib\Base\Enum`) is used the variable should be private and a getter and setter should exist for additional type checks.