mirror of
https://github.com/friendica/friendica
synced 2025-04-26 07:50:15 +00:00
Added more type-hints and documented a few methods
This commit is contained in:
parent
97e27cb523
commit
aa5f0d5ec1
5 changed files with 26 additions and 17 deletions
|
@ -55,14 +55,14 @@ abstract class BaseEntity extends BaseDataTransferObject
|
|||
}
|
||||
|
||||
/**
|
||||
* @param $name
|
||||
* @param mixed $name
|
||||
* @return bool
|
||||
* @throws HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public function __isset($name)
|
||||
public function __isset($name): bool
|
||||
{
|
||||
if (!property_exists($this, $name)) {
|
||||
throw new HTTPException\InternalServerErrorException('Unknown property ' . $name . ' in Entity ' . static::class);
|
||||
throw new HTTPException\InternalServerErrorException('Unknown property ' . $name . ' of type ' . gettype($name) . ' in Entity ' . static::class);
|
||||
}
|
||||
|
||||
return !empty($this->$name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue