Add type hints and quiet a few other PHPStan complaints

This commit is contained in:
Alex Cabal 2022-02-09 12:56:09 -06:00
parent c9ebd71587
commit 9f3104025d
5 changed files with 35 additions and 12 deletions

View file

@ -2,6 +2,10 @@
use function Safe\substr;
abstract class PropertiesBase extends OrmBase{
/**
* @param mixed $var
* @return mixed
*/
public function __get($var){
$function = 'Get' . $var;
@ -22,7 +26,11 @@ abstract class PropertiesBase extends OrmBase{
}
}
public function __set($var, $val){
/**
* @param mixed $val
* @return mixed
*/
public function __set(string $var, $val){
$function = 'Set' . $var;
if(method_exists($this, $function)){
$this->$function($val);