php cs and stan fixes

This commit is contained in:
Dennis Eichhorn 2020-03-02 22:49:01 +01:00
parent 248bc53fe8
commit 8682dca742
4 changed files with 50 additions and 8 deletions

View File

@ -196,7 +196,7 @@ class Media implements \JsonSerializable
*
* @since 1.0.0
*/
public function decrypt(string $password, string $outputPath) : string
public function decrypt(string $password, string $outputPath = null) : string
{
/**
* @todo Orange-Management/Modules#185
@ -273,7 +273,7 @@ class Media implements \JsonSerializable
*/
public function compareNonce(string $nonce) : bool
{
return \hash_equals($this->nonce, $nonce);
return $this->nonce === null ? false : \hash_equals($this->nonce, $nonce);
}
/**

View File

@ -30,11 +30,29 @@ use phpOMS\Views\View;
*/
class BaseView extends View
{
protected $form = '';
/**
* Form id
*
* @var string
* @since 1.0.0
*/
protected string $form = '';
protected $virtualPath = '';
/**
* Virtual path of the media file
*
* @var string
* @since 1.0.0
*/
protected string $virtualPath = '';
protected $name = '';
/**
* Name of the image preview
*
* @var string
* @since 1.0.0
*/
protected string $name = '';
/**
* {@inheritdoc}

View File

@ -30,6 +30,12 @@ use phpOMS\Views\View;
*/
class BaseView extends View
{
/**
* Media files
*
* @var \Modules\Media\Models\Media[]
* @since 1.0.0
*/
protected $media = [];
/**

View File

@ -30,11 +30,29 @@ use phpOMS\Views\View;
*/
class BaseView extends View
{
protected $form = '';
/**
* Form id
*
* @var string
* @since 1.0.0
*/
protected string $form = '';
protected $virtualPath = '';
/**
* Virtual path of the media file
*
* @var string
* @since 1.0.0
*/
protected string $virtualPath = '';
protected $name = '';
/**
* Name of the image preview
*
* @var string
* @since 1.0.0
*/
protected string $name = '';
/**
* {@inheritdoc}