Fixing PUBLIC usage, Fixing DB-View, Creating tests

This commit is contained in:
Philipp 2021-10-17 23:10:10 +02:00
parent a07acac463
commit b5d994394e
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
14 changed files with 304 additions and 45 deletions

View file

@ -53,4 +53,18 @@ abstract class BaseEntity extends BaseDataTransferObject
return $this->$name;
}
/**
* @param $name
* @return bool
* @throws HTTPException\InternalServerErrorException
*/
public function __isset($name)
{
if (!property_exists($this, $name)) {
throw new HTTPException\InternalServerErrorException('Unknown property ' . $name . ' in Entity ' . static::class);
}
return !empty($this->$name);
}
}