mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-02-18 10:18:41 +00:00
cs and phpstan fixes
This commit is contained in:
parent
e3414b1e3d
commit
abdc4704a6
|
|
@ -140,7 +140,7 @@ class Collection extends Media implements \Iterator
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function valid()
|
public function valid() : bool
|
||||||
{
|
{
|
||||||
return \current($this->sources) !== false;
|
return \current($this->sources) !== false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -257,7 +257,9 @@ class Media implements \JsonSerializable
|
||||||
*/
|
*/
|
||||||
public function setPassword(?string $password) : void
|
public function setPassword(?string $password) : void
|
||||||
{
|
{
|
||||||
$this->password = \password_hash($password, \PASSWORD_DEFAULT);
|
$temp = $password === null ? null : \password_hash($password, \PASSWORD_DEFAULT);
|
||||||
|
|
||||||
|
$this->password = $temp === false ? null : $temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ class MediaMapper extends DataMapperAbstract
|
||||||
/**
|
/**
|
||||||
* Belongs to.
|
* Belongs to.
|
||||||
*
|
*
|
||||||
* @var array<string, array{mapper:string, self:string}>
|
* @var array<string, array{mapper:string, external:string}>
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static array $belongsTo = [
|
protected static array $belongsTo = [
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user