fix phpcs findings

This commit is contained in:
Dennis Eichhorn 2019-09-12 19:48:00 +02:00
parent 8c7f28d057
commit 0c2bb4d9d7
33 changed files with 360 additions and 353 deletions

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Media\Admin\Install
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Media\Admin\Install
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\DataStorage\Database\DatabasePool;
/**
* Navigation class.
*
* @package Modules\Media\Admin\Install
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Media\Admin\Install
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class Navigation
{
@ -34,7 +34,7 @@ class Navigation
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
public static function install(string $path, DatabasePool $dbPool) : void
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Media\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Media\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -24,10 +24,10 @@ use phpOMS\System\File\PathException;
/**
* Installer class.
*
* @package Modules\Media\Admin
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Media\Admin
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class Installer extends InstallerAbstract
{
@ -42,7 +42,7 @@ class Installer extends InstallerAbstract
* @throws PathException This exception is thrown if the Navigation install file couldn't be found
* @throws \Exception This exception is thrown if the Navigation install file is invalid json
*
* @since 1.0.0
* @since 1.0.0
*/
public static function installExternal(DatabasePool $dbPool, array $data) : void
{
@ -77,7 +77,7 @@ class Installer extends InstallerAbstract
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
private static function installMedia($dbPool, $data) : void
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Media\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Media\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\Module\StatusAbstract;
/**
* Navigation class.
*
* @package Modules\Media\Admin
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Media\Admin
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class Status extends StatusAbstract
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Media\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Media\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\Module\UninstallerAbstract;
/**
* Uninstaller class.
*
* @package Modules\Media\Admin
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Media\Admin
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class Uninstaller extends UninstallerAbstract
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Media\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Media\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\Module\UpdaterAbstract;
/**
* Updater class.
*
* @package Modules\Media\Admin
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Media\Admin
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class Updater extends UpdaterAbstract
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Media
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Media
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -30,10 +30,10 @@ use phpOMS\System\MimeType;
/**
* Media class.
*
* @package Modules\Media
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Media
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class ApiController extends Controller
{
@ -49,7 +49,7 @@ final class ApiController extends Controller
*
* @api
*
* @since 1.0.0
* @since 1.0.0
*/
public function apiMediaFind(RequestAbstract $request, ResponseAbstract $response, $data = null) : void
{
@ -73,7 +73,7 @@ final class ApiController extends Controller
*
* @api
*
* @since 1.0.0
* @since 1.0.0
*/
public function apiMediaUpload(RequestAbstract $request, ResponseAbstract $response, $data = null) : void
{
@ -102,7 +102,7 @@ final class ApiController extends Controller
*
* @return array
*
* @since 1.0.0
* @since 1.0.0
*/
public function uploadFiles(
string $name,
@ -132,7 +132,7 @@ final class ApiController extends Controller
*
* @return string Random path to store media files
*
* @since 1.0.0
* @since 1.0.0
*/
public static function createMediaPath(string $basePath = 'Modules/Media/Files') : string
{
@ -146,7 +146,7 @@ final class ApiController extends Controller
*
* @return array
*
* @since 1.0.0
* @since 1.0.0
*/
public function createDbEntries(array $status, int $account, string $virtualPath = '/') : array
{
@ -221,7 +221,7 @@ final class ApiController extends Controller
*
* @api
*
* @since 1.0.0
* @since 1.0.0
*/
public function apiMediaUpdate(RequestAbstract $request, ResponseAbstract $response, $data = null) : void
{
@ -238,7 +238,7 @@ final class ApiController extends Controller
*
* @return Media
*
* @since 1.0.0
* @since 1.0.0
*/
private function updateMediaFromRequest(RequestAbstract $request) : Media
{

View File

@ -1,5 +1,4 @@
<?php
/**
* Orange Management
*
@ -8,7 +7,7 @@
* @package Modules\Media
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version GIT: <git_id>$Id$
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -29,10 +28,10 @@ use phpOMS\Views\View;
/**
* Media class.
*
* @package Modules\Media
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Media
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class BackendController extends Controller
{
@ -40,7 +39,7 @@ final class BackendController extends Controller
/**
* Module path.
*
* @var string
* @var string
* @since 1.0.0
*/
public const MODULE_PATH = __DIR__;
@ -48,7 +47,7 @@ final class BackendController extends Controller
/**
* Module version.
*
* @var string
* @var string
* @since 1.0.0
*/
public const MODULE_VERSION = '1.0.0';
@ -56,7 +55,7 @@ final class BackendController extends Controller
/**
* Module name.
*
* @var string
* @var string
* @since 1.0.0
*/
public const MODULE_NAME = 'Media';
@ -64,7 +63,7 @@ final class BackendController extends Controller
/**
* Module id.
*
* @var int
* @var int
* @since 1.0.0
*/
public const MODULE_ID = 1000400000;
@ -72,7 +71,7 @@ final class BackendController extends Controller
/**
* Providing.
*
* @var string[]
* @var string[]
* @since 1.0.0
*/
protected static array $providing = [];
@ -80,19 +79,21 @@ final class BackendController extends Controller
/**
* Dependencies.
*
* @var string[]
* @var string[]
* @since 1.0.0
*/
protected static array $dependencies = [];
/**
* Routing end-point for application behaviour.
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
* @codeCoverageIgnore
*/
public static function setUpFileUploader(RequestAbstract $request, ResponseAbstract $response, $data = null) : void
@ -103,13 +104,15 @@ final class BackendController extends Controller
}
/**
* Routing end-point for application behaviour.
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
*
* @return RenderableInterface
*
* @since 1.0.0
* @since 1.0.0
* @codeCoverageIgnore
*/
public function viewMediaList(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
@ -125,13 +128,15 @@ final class BackendController extends Controller
}
/**
* Routing end-point for application behaviour.
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
*
* @return RenderableInterface
*
* @since 1.0.0
* @since 1.0.0
* @codeCoverageIgnore
*/
public function viewMediaSingle(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
@ -160,13 +165,15 @@ final class BackendController extends Controller
}
/**
* Routing end-point for application behaviour.
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
*
* @return RenderableInterface
*
* @since 1.0.0
* @since 1.0.0
* @codeCoverageIgnore
*/
public function viewMediaCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Media
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Media
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -20,10 +20,10 @@ use phpOMS\Module\WebInterface;
/**
* Media class.
*
* @package Modules\Media
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Media
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class Controller extends ModuleAbstract implements WebInterface
{
@ -31,7 +31,7 @@ class Controller extends ModuleAbstract implements WebInterface
/**
* Module path.
*
* @var string
* @var string
* @since 1.0.0
*/
public const MODULE_PATH = __DIR__ . '/../';
@ -39,7 +39,7 @@ class Controller extends ModuleAbstract implements WebInterface
/**
* Module version.
*
* @var string
* @var string
* @since 1.0.0
*/
public const MODULE_VERSION = '1.0.0';
@ -47,7 +47,7 @@ class Controller extends ModuleAbstract implements WebInterface
/**
* Module name.
*
* @var string
* @var string
* @since 1.0.0
*/
public const MODULE_NAME = 'Media';
@ -55,7 +55,7 @@ class Controller extends ModuleAbstract implements WebInterface
/**
* Module id.
*
* @var int
* @var int
* @since 1.0.0
*/
public const MODULE_ID = 1000400000;
@ -63,7 +63,7 @@ class Controller extends ModuleAbstract implements WebInterface
/**
* Providing.
*
* @var string[]
* @var string[]
* @since 1.0.0
*/
protected static array $providing = [];
@ -71,7 +71,7 @@ class Controller extends ModuleAbstract implements WebInterface
/**
* Dependencies.
*
* @var string[]
* @var string[]
* @since 1.0.0
*/
protected static array $dependencies = [];

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Media\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Media\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -17,10 +17,10 @@ namespace Modules\Media\Models;
/**
* Media class.
*
* @package Modules\Media\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Media\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class Collection extends Media implements \Iterator
{
@ -28,7 +28,7 @@ class Collection extends Media implements \Iterator
/**
* Resource id.
*
* @var array<int|Media>
* @var array<int|Media>
* @since 1.0.0
*/
private $sources = [];
@ -36,7 +36,7 @@ class Collection extends Media implements \Iterator
/**
* Extension name.
*
* @var string
* @var string
* @since 1.0.0
*/
protected string $extension = 'collection';
@ -44,7 +44,7 @@ class Collection extends Media implements \Iterator
/**
* Versioned.
*
* @var bool
* @var bool
* @since 1.0.0
*/
protected bool $versioned = false;
@ -56,7 +56,7 @@ class Collection extends Media implements \Iterator
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
public function setSources(array $sources) : void
{
@ -70,7 +70,7 @@ class Collection extends Media implements \Iterator
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
public function addSource($source) : void
{
@ -82,7 +82,7 @@ class Collection extends Media implements \Iterator
*
* @return array
*
* @since 1.0.0
* @since 1.0.0
*/
public function getSources() : array
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Media
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Media
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -17,17 +17,17 @@ namespace Modules\Media\Models;
/**
* Mapper class.
*
* @package Modules\Media
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Media
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class CollectionMapper extends MediaMapper
{
/**
* Has many relation.
*
* @var array<string, array<string, null|string>>
* @var array<string, array<string, null|string>>
* @since 1.0.0
*/
protected static array $hasMany = [
@ -42,7 +42,7 @@ final class CollectionMapper extends MediaMapper
/**
* Primary table.
*
* @var string
* @var string
* @since 1.0.0
*/
protected static string $table = 'media';
@ -50,7 +50,7 @@ final class CollectionMapper extends MediaMapper
/**
* Created at.
*
* @var string
* @var string
* @since 1.0.0
*/
protected static string $createdAt = 'media_created_at';
@ -58,7 +58,7 @@ final class CollectionMapper extends MediaMapper
/**
* Primary field name.
*
* @var string
* @var string
* @since 1.0.0
*/
protected static string $primaryField = 'media_id';

View File

@ -4,9 +4,9 @@
*
* PHP Version 7.4
*
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/ // TODO: implement file storage interface

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Media\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Media\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -36,7 +36,7 @@ trait FileUploaderTrait
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
public function setUpFileUploader(RequestAbstract $request, ResponseAbstract $response, $data = null) : void
{

View File

@ -4,9 +4,9 @@
*
* PHP Version 7.4
*
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/ // TODO: implement filestorage on remote ftp server

View File

@ -4,9 +4,9 @@
*
* PHP Version 7.4
*
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/ // TODO: implement local file storage

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Media\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Media\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -17,10 +17,10 @@ namespace Modules\Media\Models;
/**
* Media class.
*
* @package Modules\Media\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Media\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class Media implements \JsonSerializable
{
@ -28,7 +28,7 @@ class Media implements \JsonSerializable
/**
* ID.
*
* @var int
* @var int
* @since 1.0.0
*/
protected int $id = 0;
@ -36,7 +36,7 @@ class Media implements \JsonSerializable
/**
* Name.
*
* @var string
* @var string
* @since 1.0.0
*/
protected string $name = '';
@ -44,7 +44,7 @@ class Media implements \JsonSerializable
/**
* Extension.
*
* @var string
* @var string
* @since 1.0.0
*/
protected string $extension = '';
@ -52,7 +52,7 @@ class Media implements \JsonSerializable
/**
* File size in bytes.
*
* @var int
* @var int
* @since 1.0.0
*/
protected int $size = 0;
@ -60,7 +60,7 @@ class Media implements \JsonSerializable
/**
* Author.
*
* @var int
* @var int
* @since 1.0.0
*/
protected $createdBy = 0;
@ -68,7 +68,7 @@ class Media implements \JsonSerializable
/**
* Uploaded.
*
* @var null|\DateTime
* @var null|\DateTime
* @since 1.0.0
*/
protected ?\DateTime $createdAt = null;
@ -76,7 +76,7 @@ class Media implements \JsonSerializable
/**
* Resource path.
*
* @var string
* @var string
* @since 1.0.0
*/
protected string $path = '';
@ -84,7 +84,7 @@ class Media implements \JsonSerializable
/**
* Virtual path.
*
* @var string
* @var string
* @since 1.0.0
*/
protected string $virtualPath = '/';
@ -92,7 +92,7 @@ class Media implements \JsonSerializable
/**
* Is path absolute?
*
* @var bool
* @var bool
* @since 1.0.0
*/
protected bool $isAbsolute = false;
@ -100,7 +100,7 @@ class Media implements \JsonSerializable
/**
* Is versioned.
*
* @var bool
* @var bool
* @since 1.0.0
*/
protected bool $versioned = false;
@ -108,7 +108,7 @@ class Media implements \JsonSerializable
/**
* Media Description.
*
* @var string
* @var string
* @since 1.0.0
*/
protected string $description = '';
@ -117,7 +117,7 @@ class Media implements \JsonSerializable
/**
* Constructor.
*
* @since 1.0.0
* @since 1.0.0
*/
public function __construct()
{
@ -127,7 +127,7 @@ class Media implements \JsonSerializable
/**
* @return int
*
* @since 1.0.0
* @since 1.0.0
*/
public function getId() : int
{
@ -137,7 +137,7 @@ class Media implements \JsonSerializable
/**
* @return bool
*
* @since 1.0.0
* @since 1.0.0
*/
public function isAbsolute() : bool
{
@ -147,7 +147,7 @@ class Media implements \JsonSerializable
/**
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
public function setAbsolute(bool $absolute) : void
{
@ -157,7 +157,7 @@ class Media implements \JsonSerializable
/**
* @return int|\phpOMS\Account\Account
*
* @since 1.0.0
* @since 1.0.0
*/
public function getCreatedBy()
{
@ -167,7 +167,7 @@ class Media implements \JsonSerializable
/**
* @return \DateTime
*
* @since 1.0.0
* @since 1.0.0
*/
public function getCreatedAt() : \DateTime
{
@ -177,7 +177,7 @@ class Media implements \JsonSerializable
/**
* @return string
*
* @since 1.0.0
* @since 1.0.0
*/
public function getExtension() : string
{
@ -187,7 +187,7 @@ class Media implements \JsonSerializable
/**
* @return string
*
* @since 1.0.0
* @since 1.0.0
*/
public function getPath() : string
{
@ -197,7 +197,7 @@ class Media implements \JsonSerializable
/**
* @return string
*
* @since 1.0.0
* @since 1.0.0
*/
public function getVirtualPath() : string
{
@ -207,7 +207,7 @@ class Media implements \JsonSerializable
/**
* @return string
*
* @since 1.0.0
* @since 1.0.0
*/
public function getName() : string
{
@ -217,7 +217,7 @@ class Media implements \JsonSerializable
/**
* @return string
*
* @since 1.0.0
* @since 1.0.0
*/
public function getDescription() : string
{
@ -227,7 +227,7 @@ class Media implements \JsonSerializable
/**
* @return string
*
* @since 1.0.0
* @since 1.0.0
*/
public function getDescriptionRaw() : string
{
@ -237,7 +237,7 @@ class Media implements \JsonSerializable
/**
* @return int
*
* @since 1.0.0
* @since 1.0.0
*/
public function getSize() : int
{
@ -247,7 +247,7 @@ class Media implements \JsonSerializable
/**
* @return bool
*
* @since 1.0.0
* @since 1.0.0
*/
public function isVersioned() : bool
{
@ -259,7 +259,7 @@ class Media implements \JsonSerializable
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
public function setCreatedBy($createdBy) : void
{
@ -271,7 +271,7 @@ class Media implements \JsonSerializable
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
public function setExtension(string $extension) : void
{
@ -283,7 +283,7 @@ class Media implements \JsonSerializable
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
public function setPath(string $path) : void
{
@ -295,7 +295,7 @@ class Media implements \JsonSerializable
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
public function setVirtualPath(string $path) : void
{
@ -307,7 +307,7 @@ class Media implements \JsonSerializable
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
public function setName(string $name) : void
{
@ -319,7 +319,7 @@ class Media implements \JsonSerializable
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
public function setDescription(string $description) : void
{
@ -331,7 +331,7 @@ class Media implements \JsonSerializable
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
public function setDescriptionRaw(string $description) : void
{
@ -343,7 +343,7 @@ class Media implements \JsonSerializable
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
public function setSize(int $size) : void
{
@ -355,7 +355,7 @@ class Media implements \JsonSerializable
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
public function setVersioned(bool $versioned) : void
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Media\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Media\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -20,10 +20,10 @@ use phpOMS\DataStorage\Database\DataMapperAbstract;
/**
* Media mapper class.
*
* @package Modules\Media\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Media\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class MediaMapper extends DataMapperAbstract
{
@ -31,7 +31,7 @@ class MediaMapper extends DataMapperAbstract
/**
* Columns.
*
* @var array<string, array<string, bool|string>>
* @var array<string, array<string, bool|string>>
* @since 1.0.0
* @todo: maybe add file name for searching by file name (path in media_file should not matter for search)
*/
@ -53,7 +53,7 @@ class MediaMapper extends DataMapperAbstract
/**
* Belongs to.
*
* @var array<string, array<string, string>>
* @var array<string, array<string, string>>
* @since 1.0.0
*/
protected static array $belongsTo = [
@ -66,7 +66,7 @@ class MediaMapper extends DataMapperAbstract
/**
* Primary table.
*
* @var string
* @var string
* @since 1.0.0
*/
protected static string $table = 'media';
@ -74,7 +74,7 @@ class MediaMapper extends DataMapperAbstract
/**
* Created at.
*
* @var string
* @var string
* @since 1.0.0
*/
protected static string $createdAt = 'media_created_at';
@ -82,7 +82,7 @@ class MediaMapper extends DataMapperAbstract
/**
* Primary field name.
*
* @var string
* @var string
* @since 1.0.0
*/
protected static string $primaryField = 'media_id';
@ -106,7 +106,7 @@ class MediaMapper extends DataMapperAbstract
*
* @return array
*
* @since 1.0.0
* @since 1.0.0
*/
public static function getByVirtualPath(string $virtualPath = '/') : array
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Media\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Media\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -17,10 +17,10 @@ namespace Modules\Media\Models;
/**
* Media class.
*
* @package Modules\Media\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Media\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class NullCollection extends Collection
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Media\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Media\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -17,10 +17,10 @@ namespace Modules\Media\Models;
/**
* Media class.
*
* @package Modules\Media\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Media\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class NullMedia extends Media
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Media
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Media
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\Stdlib\Base\Enum;
/**
* Permision state enum.
*
* @package Modules\Media
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Media
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
abstract class PermissionState extends Enum
{

View File

@ -37,7 +37,7 @@ export class Upload {
*
* @return {void}
*
* @since 1.0.0
* @since 1.0.0
*/
setMaxFileSize (size)
{
@ -49,7 +49,7 @@ export class Upload {
*
* @return {int} Max file size
*
* @since 1.0.0
* @since 1.0.0
*/
getMaxFileSize ()
{
@ -64,7 +64,7 @@ export class Upload {
*
* @return {void}
*
* @since 1.0.0
* @since 1.0.0
*/
setSuccess (id, callback)
{
@ -78,7 +78,7 @@ export class Upload {
*
* @return {void}
*
* @since 1.0.0
* @since 1.0.0
*/
setUri (uri)
{
@ -92,7 +92,7 @@ export class Upload {
*
* @return {void}
*
* @since 1.0.0
* @since 1.0.0
*/
setAllowedTypes (allowed)
{
@ -106,7 +106,7 @@ export class Upload {
*
* @return {void}
*
* @since 1.0.0
* @since 1.0.0
*/
addAllowedType (allowed)
{
@ -120,7 +120,7 @@ export class Upload {
*
* @return {void}
*
* @since 1.0.0
* @since 1.0.0
*/
addFile (file)
{
@ -132,7 +132,7 @@ export class Upload {
*
* @return {int}
*
* @since 1.0.0
* @since 1.0.0
*/
count ()
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Media\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Media\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -20,10 +20,10 @@ use phpOMS\System\File\Local\Directory;
/**
* Upload.
*
* @package Modules\Media\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Media\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @codeCoverageIgnore
*/
class UploadFile
@ -31,7 +31,7 @@ class UploadFile
/**
* Limit of iterations to find a possible random path for the file to upload to.
*
* @var int
* @var int
* @since 1.0.0
*/
private const PATH_GENERATION_LIMIT = 1000;
@ -39,7 +39,7 @@ class UploadFile
/**
* Image interlaced.
*
* @var bool
* @var bool
* @since 1.0.0
*/
private bool $isInterlaced = true;
@ -47,7 +47,7 @@ class UploadFile
/**
* Upload max size.
*
* @var int
* @var int
* @since 1.0.0
*/
private int $maxSize = 50000000;
@ -55,7 +55,7 @@ class UploadFile
/**
* Allowed mime types.
*
* @var string[]
* @var string[]
* @since 1.0.0
*/
private $allowedTypes = [];
@ -63,7 +63,7 @@ class UploadFile
/**
* Output directory.
*
* @var string
* @var string
* @since 1.0.0
*/
private string $outputDir = __DIR__ . '/../../Modules/Media/Files';
@ -71,7 +71,7 @@ class UploadFile
/**
* Output file name.
*
* @var string
* @var string
* @since 1.0.0
*/
private string $fileName = '';
@ -79,7 +79,7 @@ class UploadFile
/**
* Output file name.
*
* @var bool
* @var bool
* @since 1.0.0
*/
private bool $preserveFileName = true;
@ -95,7 +95,7 @@ class UploadFile
*
* @throws \Exception
*
* @since 1.0.0
* @since 1.0.0
*/
public function upload(array $files, string $name = '', string $encoding = 'UTF-8') : array
{
@ -206,7 +206,7 @@ class UploadFile
*
* @throws \Exception This exception is thrown if the file couldn't be created
*
* @since 1.0.0
* @since 1.0.0
*/
private function createFileName(string $path, string $tempName, string $extension) : string
{
@ -241,7 +241,7 @@ class UploadFile
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
private function interlace(string $extension, string $path) : void
{
@ -277,7 +277,7 @@ class UploadFile
*
* @return string
*
* @since 1.0.0
* @since 1.0.0
*/
private function findOutputDir(array $files) : string
{
@ -295,7 +295,7 @@ class UploadFile
*
* @return int
*
* @since 1.0.0
* @since 1.0.0
*/
private function getUploadError($error) : int
{
@ -314,7 +314,7 @@ class UploadFile
/**
* @return int
*
* @since 1.0.0
* @since 1.0.0
*/
public function getMaxSize() : int
{
@ -326,7 +326,7 @@ class UploadFile
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
public function setInterlaced(bool $isInterlaced) : void
{
@ -338,7 +338,7 @@ class UploadFile
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
public function setMaxSize(int $maxSize) : void
{
@ -348,7 +348,7 @@ class UploadFile
/**
* @return string[]
*
* @since 1.0.0
* @since 1.0.0
*/
public function getAllowedTypes() : array
{
@ -360,7 +360,7 @@ class UploadFile
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
public function setAllowedTypes(array $allowedTypes) : void
{
@ -372,7 +372,7 @@ class UploadFile
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
public function addAllowedTypes(string $allowedTypes) : void
{
@ -382,7 +382,7 @@ class UploadFile
/**
* @return string
*
* @since 1.0.0
* @since 1.0.0
*/
public function getOutputDir() : string
{
@ -396,7 +396,7 @@ class UploadFile
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
public function setOutputDir(string $outputDir) : void
{
@ -406,7 +406,7 @@ class UploadFile
/**
* @return string
*
* @since 1.0.0
* @since 1.0.0
*/
public function getFileName() : string
{
@ -420,7 +420,7 @@ class UploadFile
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
public function setFileName(string $fileName) : void
{
@ -434,7 +434,7 @@ class UploadFile
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
public function setPreserveFileName(bool $preserveFileName) : void
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Media\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Media\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\Stdlib\Base\Enum;
/**
* Upload status.
*
* @package Modules\Media\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Media\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
abstract class UploadStatus extends Enum
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -22,10 +22,10 @@ use phpOMS\Views\View;
/**
* Component view.
*
* @package TBD
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package TBD
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @codeCoverageIgnore
*/
class BaseView extends View

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -22,10 +22,10 @@ use phpOMS\Views\View;
/**
* Component view.
*
* @package TBD
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package TBD
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @codeCoverageIgnore
*/
class BaseView extends View

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -22,10 +22,10 @@ use phpOMS\Views\View;
/**
* Component view.
*
* @package TBD
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package TBD
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @codeCoverageIgnore
*/
class BaseView extends View

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
return ['Navigation' => [
'Create' => 'Create',

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
$MODLANG[1] = [
'i:ModuleInstalled' => 'Installation of the module {$1} was successful.',

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
return ['Media' => [
'Account' => 'Account',

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
/**
* @var \phpOMS\Views\View $this

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
include __DIR__ . '/template-functions.php';

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
use \phpOMS\System\File\FileUtils;

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Media\Views
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Media\Views
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\Views\View;
/**
* Media list view.
*
* @package Modules\Media\Views
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Media\Views
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class MediaCreateView extends View
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Media\Views
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Media\Views
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -25,10 +25,10 @@ use phpOMS\Views\View;
/**
* Media view.
*
* @package Modules\Media\Views
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Media\Views
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class MediaView extends View
{