Automated formatting changes

This commit is contained in:
Formatter Bot 2021-01-31 16:16:50 +00:00
parent acedec0db1
commit b61ffa7235
65 changed files with 280 additions and 281 deletions

View File

@ -90,7 +90,6 @@ final class BasicOcr
throw new PathException($path); // @codeCoverageIgnore
}
if (($read = \fread($fp, 4)) === false || ($unpack = \unpack('N', $read)) === false) {
return []; // @codeCoverageIgnore
}
@ -105,7 +104,6 @@ final class BasicOcr
$numberOfImages = \min($numberOfImages, $limit);
}
if (($read = \fread($fp, 4)) === false || ($unpack = \unpack('N', $read)) === false) {
return []; // @codeCoverageIgnore
}
@ -118,7 +116,6 @@ final class BasicOcr
$images = [];
for ($i = 0; $i < $numberOfImages; ++$i) {
if (($read = \fread($fp, $numberOfRows * $numberOfColumns)) === false
|| ($unpack = \unpack('C*', $read)) === false
) {
@ -153,7 +150,6 @@ final class BasicOcr
throw new PathException($path); // @codeCoverageIgnore
}
if (($read = \fread($fp, 4)) === false || ($unpack = \unpack('N', $read)) === false) {
return []; // @codeCoverageIgnore
}
@ -170,7 +166,6 @@ final class BasicOcr
$labels = [];
for ($i = 0; $i < $numberOfLabels; ++$i) {
if (($read = \fread($fp, 1)) === false || ($unpack = \unpack('C', $read)) === false) {
return []; // @codeCoverageIgnore
}

View File

@ -73,7 +73,7 @@ class Point implements PointInterface
/**
* {@inheritdoc}
*/
public function getCoordinate(int $index) : int|float
public function getCoordinate(int $index) : int | float
{
return $this->coordinates[$index];
}
@ -81,7 +81,7 @@ class Point implements PointInterface
/**
* {@inheritdoc}
*/
public function setCoordinate(int $index, int|float $value) : void
public function setCoordinate(int $index, int | float $value) : void
{
$this->coordinates[$index] = $value;
}

View File

@ -46,7 +46,7 @@ interface PointInterface
*
* @since 1.0.0
*/
public function getCoordinate(int $index) : int|float;
public function getCoordinate(int $index) : int | float;
/**
* Set the coordinate of the point
@ -58,5 +58,5 @@ interface PointInterface
*
* @since 1.0.0
*/
public function setCoordinate(int $index, int|float $value) : void;
public function setCoordinate(int $index, int | float $value) : void;
}

View File

@ -54,7 +54,7 @@ final class DependencyResolver
*
* @since 1.0.0
*/
private static function dependencyResolve(int|string $item, array $items, array &$resolved, array &$unresolved) : void
private static function dependencyResolve(int | string $item, array $items, array &$resolved, array &$unresolved) : void
{
$unresolved[] = $item;

View File

@ -104,7 +104,7 @@ class Backpack implements BackpackInterface
/**
* {@inheritdoc}
*/
public function addItem(ItemInterface $item, int|float $quantity = 1) : void
public function addItem(ItemInterface $item, int | float $quantity = 1) : void
{
$this->items[] = ['item' => $item, 'quantity' => $quantity];
$this->value += $item->getValue() * $quantity;

View File

@ -71,5 +71,5 @@ interface BackpackInterface
*
* @since 1.0.0
*/
public function addItem(ItemInterface $item, int|float $quantity = 1) : void;
public function addItem(ItemInterface $item, int | float $quantity = 1) : void;
}

View File

@ -33,7 +33,7 @@ interface OptionsInterface
*
* @since 1.0.0
*/
public function exists(int|string $key) : bool;
public function exists(int | string $key) : bool;
/**
* Updating or adding settings.
@ -46,7 +46,7 @@ interface OptionsInterface
*
* @since 1.0.0
*/
public function setOption(int|string $key, mixed $value, bool $overwrite = true) : bool;
public function setOption(int | string $key, mixed $value, bool $overwrite = true) : bool;
/**
* Updating or adding settings.
@ -69,5 +69,5 @@ interface OptionsInterface
*
* @since 1.0.0
*/
public function getOption(int|string $key) : mixed;
public function getOption(int | string $key) : mixed;
}

View File

@ -43,7 +43,7 @@ trait OptionsTrait
*
* @since 1.0.0
*/
public function exists(int|string $key) : bool
public function exists(int | string $key) : bool
{
return isset($this->options[$key]);
}
@ -57,7 +57,7 @@ trait OptionsTrait
*
* @since 1.0.0
*/
public function getOption(int|string $key) : mixed
public function getOption(int | string $key) : mixed
{
return $this->options[$key] ?? null;
}
@ -95,7 +95,7 @@ trait OptionsTrait
*
* @since 1.0.0
*/
public function setOption(int|string $key, mixed $value, bool $overwrite = true) : bool
public function setOption(int | string $key, mixed $value, bool $overwrite = true) : bool
{
if ($overwrite || !isset($this->options[$key])) {
$this->options[$key] = $value;

View File

@ -43,7 +43,7 @@ interface SettingsInterface extends OptionsInterface
*/
public function get(
mixed $ids = null,
string|array $names = null,
string | array $names = null,
string $module = null,
int $group = null,
int $account = null

View File

@ -37,7 +37,7 @@ interface ConnectionInterface extends DataStorageConnectionInterface
*
* @since 1.0.0
*/
public function set(int|string $key, mixed $value, int $expire = -1) : void;
public function set(int | string $key, mixed $value, int $expire = -1) : void;
/**
* Increment value.
@ -49,7 +49,7 @@ interface ConnectionInterface extends DataStorageConnectionInterface
*
* @since 1.0.0
*/
public function increment(int|string $key, int $value = 1) : void;
public function increment(int | string $key, int $value = 1) : void;
/**
* Decrement value.
@ -61,7 +61,7 @@ interface ConnectionInterface extends DataStorageConnectionInterface
*
* @since 1.0.0
*/
public function decrement(int|string $key, int $value = 1) : void;
public function decrement(int | string $key, int $value = 1) : void;
/**
* Rename cache key.
@ -74,7 +74,7 @@ interface ConnectionInterface extends DataStorageConnectionInterface
*
* @since 1.0.0
*/
public function rename(int|string $old, int|string $new, int $expire = -1) : void;
public function rename(int | string $old, int | string $new, int $expire = -1) : void;
/**
* Adding new data if it doesn't exist.
@ -87,7 +87,7 @@ interface ConnectionInterface extends DataStorageConnectionInterface
*
* @since 1.0.0
*/
public function add(int|string $key, mixed $value, int $expire = -1) : bool;
public function add(int | string $key, mixed $value, int $expire = -1) : bool;
/**
* Get cache by key.
@ -99,7 +99,7 @@ interface ConnectionInterface extends DataStorageConnectionInterface
*
* @since 1.0.0
*/
public function get(int|string $key, int $expire = -1) : mixed;
public function get(int | string $key, int $expire = -1) : mixed;
/**
* Get cache by pattern.
@ -123,7 +123,7 @@ interface ConnectionInterface extends DataStorageConnectionInterface
*
* @since 1.0.0
*/
public function exists(int|string $key, int $expire = -1) : bool;
public function exists(int | string $key, int $expire = -1) : bool;
/**
* Remove value by key.
@ -135,7 +135,7 @@ interface ConnectionInterface extends DataStorageConnectionInterface
*
* @since 1.0.0
*/
public function delete(int|string $key, int $expire = -1) : bool;
public function delete(int | string $key, int $expire = -1) : bool;
/**
* Remove value by pattern.
@ -180,7 +180,7 @@ interface ConnectionInterface extends DataStorageConnectionInterface
*
* @since 1.0.0
*/
public function replace(int|string $key, mixed $value, int $expire = -1) : bool;
public function replace(int | string $key, mixed $value, int $expire = -1) : bool;
/**
* Updating expire.
@ -192,7 +192,7 @@ interface ConnectionInterface extends DataStorageConnectionInterface
*
* @since 1.0.0
*/
public function updateExpire(int|string $key, int $expire = -1) : bool;
public function updateExpire(int | string $key, int $expire = -1) : bool;
/**
* Requesting cache stats.

View File

@ -147,7 +147,7 @@ final class FileCache extends ConnectionAbstract
/**
* {@inheritdoc}
*/
public function set(int|string $key, mixed $value, int $expire = -1) : void
public function set(int | string $key, mixed $value, int $expire = -1) : void
{
if ($this->status !== CacheStatus::OK) {
return;
@ -168,7 +168,7 @@ final class FileCache extends ConnectionAbstract
/**
* {@inheritdoc}
*/
public function add(int|string $key, mixed $value, int $expire = -1) : bool
public function add(int | string $key, mixed $value, int $expire = -1) : bool
{
if ($this->status !== CacheStatus::OK) {
return false;
@ -261,7 +261,7 @@ final class FileCache extends ConnectionAbstract
/**
* {@inheritdoc}
*/
public function get(int|string $key, int $expire = -1) : mixed
public function get(int | string $key, int $expire = -1) : mixed
{
if ($this->status !== CacheStatus::OK) {
return null;
@ -362,7 +362,7 @@ final class FileCache extends ConnectionAbstract
/**
* {@inheritdoc}
*/
public function delete(int|string $key, int $expire = -1) : bool
public function delete(int | string $key, int $expire = -1) : bool
{
if ($this->status !== CacheStatus::OK) {
return false;
@ -406,7 +406,7 @@ final class FileCache extends ConnectionAbstract
/**
* {@inheritdoc}
*/
public function exists(int|string $key, int $expire = -1) : bool
public function exists(int | string $key, int $expire = -1) : bool
{
if ($this->status !== CacheStatus::OK) {
return false;
@ -452,7 +452,7 @@ final class FileCache extends ConnectionAbstract
/**
* {@inheritdoc}
*/
public function increment(int|string $key, int $value = 1) : void
public function increment(int | string $key, int $value = 1) : void
{
$path = $this->getPath($key);
if (!File::exists($path)) {
@ -485,7 +485,7 @@ final class FileCache extends ConnectionAbstract
/**
* {@inheritdoc}
*/
public function decrement(int|string $key, int $value = 1) : void
public function decrement(int | string $key, int $value = 1) : void
{
$path = $this->getPath($key);
if (!File::exists($path)) {
@ -518,7 +518,7 @@ final class FileCache extends ConnectionAbstract
/**
* {@inheritdoc}
*/
public function rename(int|string $old, int|string $new, int $expire = -1) : void
public function rename(int | string $old, int | string $new, int $expire = -1) : void
{
$value = $this->get($old);
$this->set($new, $value, $expire);
@ -622,7 +622,7 @@ final class FileCache extends ConnectionAbstract
/**
* {@inheritdoc}
*/
public function updateExpire(int|string $key, int $expire = -1) : bool
public function updateExpire(int | string $key, int $expire = -1) : bool
{
$value = $this->get($key, $expire);
$this->delete($key);
@ -660,7 +660,7 @@ final class FileCache extends ConnectionAbstract
/**
* {@inheritdoc}
*/
public function replace(int|string $key, mixed $value, int $expire = -1) : bool
public function replace(int | string $key, mixed $value, int $expire = -1) : bool
{
if ($this->status !== CacheStatus::OK) {
return false;
@ -693,7 +693,7 @@ final class FileCache extends ConnectionAbstract
*
* @since 1.0.0
*/
private function getPath(int|string $key) : string
private function getPath(int | string $key) : string
{
$path = Directory::sanitize((string) $key, self::SANITIZE);
return $this->con . '/' . \trim($path, '/') . '.cache';

View File

@ -80,7 +80,7 @@ final class MemCached extends ConnectionAbstract
/**
* {@inheritdoc}
*/
public function set(int|string $key, mixed $value, int $expire = -1) : void
public function set(int | string $key, mixed $value, int $expire = -1) : void
{
if ($this->status !== CacheStatus::OK) {
return;
@ -96,7 +96,7 @@ final class MemCached extends ConnectionAbstract
/**
* {@inheritdoc}
*/
public function add(int|string $key, mixed $value, int $expire = -1) : bool
public function add(int | string $key, mixed $value, int $expire = -1) : bool
{
if ($this->status !== CacheStatus::OK) {
return false;
@ -112,7 +112,7 @@ final class MemCached extends ConnectionAbstract
/**
* {@inheritdoc}
*/
public function get(int|string $key, int $expire = -1) : mixed
public function get(int | string $key, int $expire = -1) : mixed
{
if ($this->status !== CacheStatus::OK) {
return null;
@ -130,7 +130,7 @@ final class MemCached extends ConnectionAbstract
/**
* {@inheritdoc}
*/
public function delete(int|string $key, int $expire = -1) : bool
public function delete(int | string $key, int $expire = -1) : bool
{
if ($this->status !== CacheStatus::OK) {
return false;
@ -142,7 +142,7 @@ final class MemCached extends ConnectionAbstract
/**
* {@inheritdoc}
*/
public function exists(int|string $key, int $expire = -1) : bool
public function exists(int | string $key, int $expire = -1) : bool
{
if ($this->status !== CacheStatus::OK) {
return false;
@ -154,7 +154,7 @@ final class MemCached extends ConnectionAbstract
/**
* {@inheritdoc}
*/
public function increment(int|string $key, int $value = 1) : void
public function increment(int | string $key, int $value = 1) : void
{
$this->con->increment($key, $value);
}
@ -162,7 +162,7 @@ final class MemCached extends ConnectionAbstract
/**
* {@inheritdoc}
*/
public function decrement(int|string $key, int $value = 1) : void
public function decrement(int | string $key, int $value = 1) : void
{
$this->con->decrement($key, $value);
}
@ -170,7 +170,7 @@ final class MemCached extends ConnectionAbstract
/**
* {@inheritdoc}
*/
public function rename(int|string $old, int|string $new, int $expire = -1) : void
public function rename(int | string $old, int | string $new, int $expire = -1) : void
{
$value = $this->get($old);
$this->set($new, $value, $expire);
@ -227,7 +227,7 @@ final class MemCached extends ConnectionAbstract
/**
* {@inheritdoc}
*/
public function updateExpire(int|string $key, int $expire = -1) : bool
public function updateExpire(int | string $key, int $expire = -1) : bool
{
if ($expire > 0) {
$this->con->touch($key, $expire);
@ -261,7 +261,7 @@ final class MemCached extends ConnectionAbstract
/**
* {@inheritdoc}
*/
public function replace(int|string $key, mixed $value, int $expire = -1) : bool
public function replace(int | string $key, mixed $value, int $expire = -1) : bool
{
if ($this->status !== CacheStatus::OK) {
return false;

View File

@ -34,28 +34,28 @@ final class NullCache extends ConnectionAbstract
/**
* {@inheritdoc}
*/
public function set(int|string $key, mixed $value, int $expire = -1) : void
public function set(int | string $key, mixed $value, int $expire = -1) : void
{
}
/**
* {@inheritdoc}
*/
public function increment(int|string $key, int $value = 1) : void
public function increment(int | string $key, int $value = 1) : void
{
}
/**
* {@inheritdoc}
*/
public function decrement(int|string $key, int $value = 1) : void
public function decrement(int | string $key, int $value = 1) : void
{
}
/**
* {@inheritdoc}
*/
public function add(int|string $key, mixed $value, int $expire = -1) : bool
public function add(int | string $key, mixed $value, int $expire = -1) : bool
{
return true;
}
@ -63,7 +63,7 @@ final class NullCache extends ConnectionAbstract
/**
* {@inheritdoc}
*/
public function get(int|string $key, int $expire = -1) : mixed
public function get(int | string $key, int $expire = -1) : mixed
{
return null;
}
@ -71,7 +71,7 @@ final class NullCache extends ConnectionAbstract
/**
* {@inheritdoc}
*/
public function delete(int|string $key, int $expire = -1) : bool
public function delete(int | string $key, int $expire = -1) : bool
{
return true;
}
@ -95,7 +95,7 @@ final class NullCache extends ConnectionAbstract
/**
* {@inheritdoc}
*/
public function replace(int|string $key, mixed $value, int $expire = -1) : bool
public function replace(int | string $key, mixed $value, int $expire = -1) : bool
{
return true;
}
@ -119,7 +119,7 @@ final class NullCache extends ConnectionAbstract
/**
* {@inheritdoc}
*/
public function exists(int|string $key, int $expire = -1) : bool
public function exists(int | string $key, int $expire = -1) : bool
{
return false;
}
@ -127,7 +127,7 @@ final class NullCache extends ConnectionAbstract
/**
* {@inheritdoc}
*/
public function rename(int|string $old, int|string $new, int $expire = -1) : void
public function rename(int | string $old, int | string $new, int $expire = -1) : void
{
}
@ -150,7 +150,7 @@ final class NullCache extends ConnectionAbstract
/**
* {@inheritdoc}
*/
public function updateExpire(int|string $key, int $expire = -1) : bool
public function updateExpire(int | string $key, int $expire = -1) : bool
{
return true;
}

View File

@ -104,7 +104,7 @@ final class RedisCache extends ConnectionAbstract
/**
* {@inheritdoc}
*/
public function set(int|string $key, mixed $value, int $expire = -1) : void
public function set(int | string $key, mixed $value, int $expire = -1) : void
{
if ($this->status !== CacheStatus::OK) {
return;
@ -122,7 +122,7 @@ final class RedisCache extends ConnectionAbstract
/**
* {@inheritdoc}
*/
public function add(int|string $key, mixed $value, int $expire = -1) : bool
public function add(int | string $key, mixed $value, int $expire = -1) : bool
{
if ($this->status !== CacheStatus::OK) {
return false;
@ -138,7 +138,7 @@ final class RedisCache extends ConnectionAbstract
/**
* {@inheritdoc}
*/
public function get(int|string $key, int $expire = -1) : mixed
public function get(int | string $key, int $expire = -1) : mixed
{
if ($this->status !== CacheStatus::OK || $this->con->exists($key) < 1) {
return null;
@ -158,7 +158,7 @@ final class RedisCache extends ConnectionAbstract
/**
* {@inheritdoc}
*/
public function delete(int|string $key, int $expire = -1) : bool
public function delete(int | string $key, int $expire = -1) : bool
{
if ($this->status !== CacheStatus::OK) {
return false;
@ -170,7 +170,7 @@ final class RedisCache extends ConnectionAbstract
/**
* {@inheritdoc}
*/
public function exists(int|string $key, int $expire = -1) : bool
public function exists(int | string $key, int $expire = -1) : bool
{
if ($this->status !== CacheStatus::OK) {
return false;
@ -182,7 +182,7 @@ final class RedisCache extends ConnectionAbstract
/**
* {@inheritdoc}
*/
public function increment(int|string $key, int $value = 1) : void
public function increment(int | string $key, int $value = 1) : void
{
$this->con->incrBy($key, $value);
}
@ -190,7 +190,7 @@ final class RedisCache extends ConnectionAbstract
/**
* {@inheritdoc}
*/
public function decrement(int|string $key, int $value = 1) : void
public function decrement(int | string $key, int $value = 1) : void
{
$this->con->decrBy($key, $value);
}
@ -198,7 +198,7 @@ final class RedisCache extends ConnectionAbstract
/**
* {@inheritdoc}
*/
public function rename(int|string $old, int|string $new, int $expire = -1) : void
public function rename(int | string $old, int | string $new, int $expire = -1) : void
{
$this->con->rename($old, $new);
@ -257,7 +257,7 @@ final class RedisCache extends ConnectionAbstract
/**
* {@inheritdoc}
*/
public function updateExpire(int|string $key, int $expire = -1) : bool
public function updateExpire(int | string $key, int $expire = -1) : bool
{
if ($expire > 0) {
$this->con->expire($key, $expire);
@ -291,7 +291,7 @@ final class RedisCache extends ConnectionAbstract
/**
* {@inheritdoc}
*/
public function replace(int|string $key, mixed $value, int $expire = -1) : bool
public function replace(int | string $key, mixed $value, int $expire = -1) : bool
{
if ($this->status !== CacheStatus::OK) {
return false;

View File

@ -333,7 +333,7 @@ class Builder extends BuilderAbstract
*
* @since 1.0.0
*/
public function bind(string|array $binds) : self
public function bind(string | array $binds) : self
{
if (\is_array($binds)) {
$this->binds += $binds;
@ -541,7 +541,7 @@ class Builder extends BuilderAbstract
*
* @since 1.0.0
*/
public function where(string|array|Where $columns, string|array $operator = null, mixed $values = null, string|array $boolean = 'and') : self
public function where(string | array | Where $columns, string | array $operator = null, mixed $values = null, string | array $boolean = 'and') : self
{
if (!\is_array($columns)) {
$columns = [$columns];
@ -580,7 +580,7 @@ class Builder extends BuilderAbstract
*
* @since 1.0.0
*/
public function andWhere(string|array|Where $where, string|array $operator = null, mixed $values = null) : self
public function andWhere(string | array | Where $where, string | array $operator = null, mixed $values = null) : self
{
return $this->where($where, $operator, $values, 'and');
}
@ -596,7 +596,7 @@ class Builder extends BuilderAbstract
*
* @since 1.0.0
*/
public function orWhere(string|array|Where $where, string|array $operator = null, mixed $values = null) : self
public function orWhere(string | array | Where $where, string | array $operator = null, mixed $values = null) : self
{
return $this->where($where, $operator, $values, 'or');
}
@ -612,7 +612,7 @@ class Builder extends BuilderAbstract
*
* @since 1.0.0
*/
public function whereIn(string|array|Where $column, mixed $values = null, string $boolean = 'and') : self
public function whereIn(string | array | Where $column, mixed $values = null, string $boolean = 'and') : self
{
$this->where($column, 'in', $values, $boolean);
@ -629,7 +629,7 @@ class Builder extends BuilderAbstract
*
* @since 1.0.0
*/
public function whereNull(string|array|Where $column, string $boolean = 'and') : self
public function whereNull(string | array | Where $column, string $boolean = 'and') : self
{
$this->where($column, '=', null, $boolean);
@ -646,7 +646,7 @@ class Builder extends BuilderAbstract
*
* @since 1.0.0
*/
public function whereNotNull(string|array|Where $column, string $boolean = 'and') : self
public function whereNotNull(string | array | Where $column, string $boolean = 'and') : self
{
$this->where($column, '!=', null, $boolean);
@ -719,7 +719,7 @@ class Builder extends BuilderAbstract
*
* @since 1.0.0
*/
public function orderBy(string|array $columns, string|array $order = 'DESC') : self
public function orderBy(string | array $columns, string | array $order = 'DESC') : self
{
if (\is_string($columns)) {
if (!\is_string($order)) {
@ -1112,7 +1112,7 @@ class Builder extends BuilderAbstract
*
* @since 1.0.0
*/
public function join(string|self $table, string $type = JoinType::JOIN, string $alias = null) : self
public function join(string | self $table, string $type = JoinType::JOIN, string $alias = null) : self
{
$this->joins[$alias ?? $table] = ['type' => $type, 'table' => $table, 'alias' => $alias];
@ -1129,7 +1129,7 @@ class Builder extends BuilderAbstract
*
* @since 1.0.0
*/
public function leftJoin(string|self $column, string $alias = null) : self
public function leftJoin(string | self $column, string $alias = null) : self
{
return $this->join($column, JoinType::LEFT_JOIN, $alias);
}
@ -1144,7 +1144,7 @@ class Builder extends BuilderAbstract
*
* @since 1.0.0
*/
public function leftOuterJoin(string|self $column, string $alias = null) : self
public function leftOuterJoin(string | self $column, string $alias = null) : self
{
return $this->join($column, JoinType::LEFT_OUTER_JOIN, $alias);
}
@ -1159,7 +1159,7 @@ class Builder extends BuilderAbstract
*
* @since 1.0.0
*/
public function leftInnerJoin(string|self $column, string $alias = null) : self
public function leftInnerJoin(string | self $column, string $alias = null) : self
{
return $this->join($column, JoinType::LEFT_INNER_JOIN, $alias);
}
@ -1174,7 +1174,7 @@ class Builder extends BuilderAbstract
*
* @since 1.0.0
*/
public function rightJoin(string|self $column, string $alias = null) : self
public function rightJoin(string | self $column, string $alias = null) : self
{
return $this->join($column, JoinType::RIGHT_JOIN, $alias);
}
@ -1189,7 +1189,7 @@ class Builder extends BuilderAbstract
*
* @since 1.0.0
*/
public function rightOuterJoin(string|self $column, string $alias = null) : self
public function rightOuterJoin(string | self $column, string $alias = null) : self
{
return $this->join($column, JoinType::RIGHT_OUTER_JOIN, $alias);
}
@ -1204,7 +1204,7 @@ class Builder extends BuilderAbstract
*
* @since 1.0.0
*/
public function rightInnerJoin(string|self $column, string $alias = null) : self
public function rightInnerJoin(string | self $column, string $alias = null) : self
{
return $this->join($column, JoinType::RIGHT_INNER_JOIN, $alias);
}
@ -1219,7 +1219,7 @@ class Builder extends BuilderAbstract
*
* @since 1.0.0
*/
public function outerJoin(string|self $column, string $alias = null) : self
public function outerJoin(string | self $column, string $alias = null) : self
{
return $this->join($column, JoinType::OUTER_JOIN, $alias);
}
@ -1234,7 +1234,7 @@ class Builder extends BuilderAbstract
*
* @since 1.0.0
*/
public function innerJoin(string|self $column, string $alias = null) : self
public function innerJoin(string | self $column, string $alias = null) : self
{
return $this->join($column, JoinType::INNER_JOIN, $alias);
}
@ -1249,7 +1249,7 @@ class Builder extends BuilderAbstract
*
* @since 1.0.0
*/
public function crossJoin(string|self $column, string $alias = null) : self
public function crossJoin(string | self $column, string $alias = null) : self
{
return $this->join($column, JoinType::CROSS_JOIN, $alias);
}
@ -1264,7 +1264,7 @@ class Builder extends BuilderAbstract
*
* @since 1.0.0
*/
public function fullJoin(string|self $column, string $alias = null) : self
public function fullJoin(string | self $column, string $alias = null) : self
{
return $this->join($column, JoinType::FULL_JOIN, $alias);
}
@ -1279,7 +1279,7 @@ class Builder extends BuilderAbstract
*
* @since 1.0.0
*/
public function fullOuterJoin(string|self $column, string $alias = null) : self
public function fullOuterJoin(string | self $column, string $alias = null) : self
{
return $this->join($column, JoinType::FULL_OUTER_JOIN, $alias);
}
@ -1309,7 +1309,7 @@ class Builder extends BuilderAbstract
*
* @since 1.0.0
*/
public function on(string|array $columns, string|array $operator = null, string|array $values = null, string|array $boolean = 'and', string $table = null) : self
public function on(string | array $columns, string | array $operator = null, string | array $values = null, string | array $boolean = 'and', string $table = null) : self
{
if ($operator !== null && !\is_array($operator) && !\in_array(\strtolower($operator), self::OPERATORS)) {
throw new \InvalidArgumentException('Unknown operator.');
@ -1355,7 +1355,7 @@ class Builder extends BuilderAbstract
*
* @since 1.0.0
*/
public function orOn(string|array $columns, string|array $operator = null, string|array $values = null) : self
public function orOn(string | array $columns, string | array $operator = null, string | array $values = null) : self
{
return $this->on($columns, $operator, $values, 'or');
}
@ -1371,7 +1371,7 @@ class Builder extends BuilderAbstract
*
* @since 1.0.0
*/
public function andOn(string|array $columns, string|array $operator = null, string|array $values = null) : self
public function andOn(string | array $columns, string | array $operator = null, string | array $values = null) : self
{
return $this->on($columns, $operator, $values, 'and');
}
@ -1412,7 +1412,7 @@ class Builder extends BuilderAbstract
$sth->execute();
} catch (\Throwable $t) {
var_dump($this->toSql());
\var_dump($this->toSql());
}
return $sth;

View File

@ -62,7 +62,7 @@ final class Dispatcher implements DispatcherInterface
/**
* {@inheritdoc}
*/
public function dispatch(array|string|\Closure $controller, ...$data) : array
public function dispatch(array | string | \Closure $controller, ...$data) : array
{
$views = [];

View File

@ -36,5 +36,5 @@ interface DispatcherInterface
*
* @since 1.0.0
*/
public function dispatch(array|string|\Closure $controller, ...$data) : array;
public function dispatch(array | string | \Closure $controller, ...$data) : array;
}

View File

@ -70,7 +70,7 @@ final class EventManager implements \Countable
/**
* {@inheritdoc}
*/
public function dispatch(array|string|\Closure $func, ...$data) : array
public function dispatch(array | string | \Closure $func, ...$data) : array
{
if (!($func instanceof \Closure)) {
return [];
@ -132,7 +132,7 @@ final class EventManager implements \Countable
*
* @since 1.0.0
*/
public function attach(string $group, string|\Closure $callback, bool $remove = false, bool $reset = false) : bool
public function attach(string $group, string | \Closure $callback, bool $remove = false, bool $reset = false) : bool
{
if (!isset($this->callbacks[$group])) {
$this->callbacks[$group] = ['remove' => $remove, 'reset' => $reset, 'callbacks' => []];

View File

@ -211,7 +211,7 @@ final class L11nManager
*
* @since 1.0.0
*/
public function getNumeric(Localization $l11n, int|float $numeric, string $format = null) : string
public function getNumeric(Localization $l11n, int | float $numeric, string $format = null) : string
{
return \number_format(
$numeric,
@ -254,7 +254,7 @@ final class L11nManager
*
* @since 1.0.0
*/
public function getCurrency(Localization $l11n, int|float $currency, string $format = null, string $symbol = null, int $divide = 1) : string
public function getCurrency(Localization $l11n, int | float $currency, string $format = null, string $symbol = null, int $divide = 1) : string
{
$language = $l11n->getLanguage() ?? 'en';
$symbol ??= $l11n->getCurrency();

View File

@ -83,7 +83,7 @@ final class Money implements \Serializable
*
* @since 1.0.0
*/
public function __construct(int|float|string $value = 0, string $thousands = ',', string $decimal = '.', string $symbol = '', int $position = 0)
public function __construct(int | float | string $value = 0, string $thousands = ',', string $decimal = '.', string $symbol = '', int $position = 0)
{
$this->value = \is_int($value) ? $value : self::toInt((string) $value);
$this->thousands = $thousands;
@ -222,7 +222,7 @@ final class Money implements \Serializable
*
* @since 1.0.0
*/
public function add(int|float|string|self $value) : self
public function add(int | float | string | self $value) : self
{
if (\is_string($value) || \is_float($value)) {
$this->value += self::toInt((string) $value, $this->thousands, $this->decimal);
@ -256,7 +256,7 @@ final class Money implements \Serializable
*
* @since 1.0.0
*/
public function sub(int|float|string|self $value) : self
public function sub(int | float | string | self $value) : self
{
if (\is_string($value) || \is_float($value)) {
$this->value -= self::toInt((string) $value, $this->thousands, $this->decimal);
@ -278,7 +278,7 @@ final class Money implements \Serializable
*
* @since 1.0.0
*/
public function mult(int|float $value) : self
public function mult(int | float $value) : self
{
$this->value = (int) ($this->value * $value);
@ -294,7 +294,7 @@ final class Money implements \Serializable
*
* @since 1.0.0
*/
public function div(int|float $value) : self
public function div(int | float $value) : self
{
$this->value = (int) ($this->value / $value);
@ -324,7 +324,7 @@ final class Money implements \Serializable
*
* @since 1.0.0
*/
public function pow(int|float $value) : self
public function pow(int | float $value) : self
{
$this->value = (int) ($this->value ** $value);

View File

@ -43,7 +43,7 @@ final class Gamma
*
* @since 1.0.0
*/
public static function gamma(int|float $z) : float
public static function gamma(int | float $z) : float
{
return \exp(self::logGamma($z));
}
@ -68,7 +68,7 @@ final class Gamma
*
* @since 1.0.0
*/
public static function lanczosApproximationReal(int|float $z) : float
public static function lanczosApproximationReal(int | float $z) : float
{
if ($z < 0.5) {
return \M_PI / (\sin(\M_PI * $z) * self::lanczosApproximationReal(1 - $z));
@ -94,7 +94,7 @@ final class Gamma
*
* @since 1.0.0
*/
public static function stirlingApproximation(int|float $x) : float
public static function stirlingApproximation(int | float $x) : float
{
return \sqrt(2.0 * \M_PI / $x) * \pow($x / \M_E, $x);
}
@ -108,7 +108,7 @@ final class Gamma
*
* @since 1.0.0
*/
public static function spougeApproximation(int|float $z) : float
public static function spougeApproximation(int | float $z) : float
{
$k1_fact = 1.0;
$c = [\sqrt(2.0 * \M_PI)];
@ -139,7 +139,7 @@ final class Gamma
*
* @since 1.0.0
*/
public static function logGamma(int|float $z) : float
public static function logGamma(int | float $z) : float
{
static $approx = [
76.18009172947146,-86.50532032941677,

View File

@ -109,7 +109,7 @@ class Matrix implements \ArrayAccess, \Iterator
*
* @since 1.0.0
*/
public function set(int $m, int $n, int|float $value) : void
public function set(int $m, int $n, int | float $value) : void
{
if (!isset($this->matrix[$m], $this->matrix[$m][$n])) {
throw new InvalidDimensionException($m . 'x' . $n);
@ -130,7 +130,7 @@ class Matrix implements \ArrayAccess, \Iterator
*
* @since 1.0.0
*/
public function get(int $m, int $n = 0) : int|float
public function get(int $m, int $n = 0) : int | float
{
if (!isset($this->matrix[$m], $this->matrix[$m][$n])) {
throw new InvalidDimensionException($m . 'x' . $n);
@ -382,7 +382,7 @@ class Matrix implements \ArrayAccess, \Iterator
*
* @since 1.0.0
*/
public function sub(int|float|self $value) : self
public function sub(int | float | self $value) : self
{
if (\is_numeric($value)) {
return $this->addScalar(-$value);
@ -400,7 +400,7 @@ class Matrix implements \ArrayAccess, \Iterator
*
* @since 1.0.0
*/
public function add(int|float|self $value) : self
public function add(int | float | self $value) : self
{
if (\is_numeric($value)) {
return $this->addScalar($value);
@ -472,7 +472,7 @@ class Matrix implements \ArrayAccess, \Iterator
*
* @since 1.0.0
*/
private function addScalar(int|float $scalar) : self
private function addScalar(int | float $scalar) : self
{
$newMatrixArr = $this->matrix;
@ -497,7 +497,7 @@ class Matrix implements \ArrayAccess, \Iterator
*
* @since 1.0.0
*/
public function mult(int|float|self $value) : self
public function mult(int | float | self $value) : self
{
if (\is_numeric($value)) {
return $this->multScalar($value);
@ -554,7 +554,7 @@ class Matrix implements \ArrayAccess, \Iterator
*
* @since 1.0.0
*/
private function multScalar(int|float $scalar) : self
private function multScalar(int | float $scalar) : self
{
$newMatrixArr = $this->matrix;

View File

@ -51,7 +51,7 @@ final class Vector extends Matrix
*
* @since 1.0.0
*/
public function setV(int $m, int|float $value) : void
public function setV(int $m, int | float $value) : void
{
parent::set($m , 0, $value);
}
@ -65,7 +65,7 @@ final class Vector extends Matrix
*
* @since 1.0.0
*/
public function getV(int $m) : int|float
public function getV(int $m) : int | float
{
return parent::get($m, 0);
}

View File

@ -48,7 +48,7 @@ final class Complex
*
* @since 1.0.0
*/
public function __construct(int|float $re = 0, int|float $im = 0)
public function __construct(int | float $re = 0, int | float $im = 0)
{
$this->re = $re;
$this->im = $im;
@ -61,7 +61,7 @@ final class Complex
*
* @since 1.0.0
*/
public function re() : int|float
public function re() : int | float
{
return $this->re;
}
@ -73,7 +73,7 @@ final class Complex
*
* @since 1.0.0
*/
public function im() : int|float
public function im() : int | float
{
return $this->im;
}
@ -129,7 +129,7 @@ final class Complex
*
* @since 1.0.0
*/
public function abs() : int|float
public function abs() : int | float
{
return \sqrt($this->re ** 2 + $this->im ** 2);
}
@ -155,7 +155,7 @@ final class Complex
*
* @since 1.0.0
*/
public function pow(int|float|self $value) : self
public function pow(int | float | self $value) : self
{
if (\is_int($value)) {
return $this->powInteger($value);
@ -209,7 +209,7 @@ final class Complex
*
* @since 1.0.0
*/
public function powScalar(int|float $value) : self
public function powScalar(int | float $value) : self
{
return $this;
}
@ -223,7 +223,7 @@ final class Complex
*
* @since 1.0.0
*/
public function add(int|float|self $value) : self
public function add(int | float | self $value) : self
{
if (\is_numeric($value)) {
return $this->addScalar($value);
@ -255,7 +255,7 @@ final class Complex
*
* @since 1.0.0
*/
private function addScalar(int|float $val) : self
private function addScalar(int | float $val) : self
{
return new self($this->re + $val, $this->im);
}
@ -269,7 +269,7 @@ final class Complex
*
* @since 1.0.0
*/
public function sub(int|float|self $value) : self
public function sub(int | float | self $value) : self
{
if (\is_numeric($value)) {
return $this->subScalar($value);
@ -301,7 +301,7 @@ final class Complex
*
* @since 1.0.0
*/
private function subScalar(int|float $val) : self
private function subScalar(int | float $val) : self
{
return new self($this->re - $val, $this->im);
}
@ -315,7 +315,7 @@ final class Complex
*
* @since 1.0.0
*/
public function mult(int|float|self $value) : self
public function mult(int | float | self $value) : self
{
if (\is_numeric($value)) {
return $this->multScalar($value);
@ -350,7 +350,7 @@ final class Complex
*
* @since 1.0.0
*/
private function multScalar(int|float $val) : self
private function multScalar(int | float $val) : self
{
return new self($this->re * $val, $this->im * $val);
}
@ -366,7 +366,7 @@ final class Complex
*
* @since 1.0.0
*/
public function div(int|float|self $value) : self
public function div(int | float | self $value) : self
{
if (\is_numeric($value)) {
return $this->divScalar($value);
@ -401,7 +401,7 @@ final class Complex
*
* @since 1.0.0
*/
private function divScalar(int|float $val) : self
private function divScalar(int | float $val) : self
{
return new self($this->re / $val, $this->im / $val);
}

View File

@ -144,7 +144,7 @@ final class CubicSplineInterpolation implements InterpolationInterface
/**
* {@inheritdoc}
*/
public function interpolate(int|float $x) : float
public function interpolate(int | float $x) : float
{
$n = \count($this->points);
$xPos = $n - 1;

View File

@ -33,5 +33,5 @@ interface InterpolationInterface
*
* @since 1.0.0
*/
public function interpolate(int|float $x) : float;
public function interpolate(int | float $x) : float;
}

View File

@ -46,7 +46,7 @@ final class LagrangeInterpolation implements InterpolationInterface
/**
* {@inheritdoc}
*/
public function interpolate(int|float $x) : float
public function interpolate(int | float $x) : float
{
$n = \count($this->points);
$result = 0.0;

View File

@ -96,7 +96,7 @@ final class LinearInterpolation implements InterpolationInterface
/**
* {@inheritdoc}
*/
public function interpolate(int|float $x) : float
public function interpolate(int | float $x) : float
{
$n = \count($this->points);
$xPos = $n - 1;

View File

@ -81,7 +81,7 @@ final class Evaluator
*
* @since 1.0.0
*/
private static function parseValue(int|float|string $value) : int|float
private static function parseValue(int | float | string $value) : int | float
{
return !\is_string($value)
? $value

View File

@ -20,11 +20,11 @@ declare(strict_types=1);
namespace phpOMS\Message\Mail;
use phpOMS\System\CharsetType;
use phpOMS\System\MimeType;
use phpOMS\Validation\Network\Email as EmailValidator;
use phpOMS\System\File\FileUtils;
use phpOMS\Utils\MbStringUtils;
use phpOMS\System\MimeType;
use phpOMS\System\SystemUtils;
use phpOMS\Utils\MbStringUtils;
use phpOMS\Validation\Network\Email as EmailValidator;
/**
* Mail class.
@ -563,8 +563,8 @@ class Email implements MessageInterface
* Parse and validate a string containing one or more RFC822-style comma-separated email addresses
* of the form "display name <address>" into an array of name/address pairs.
*
* @param string $addrstr Address line
* @param bool $useImap Use imap for parsing
* @param string $addrstr Address line
* @param bool $useImap Use imap for parsing
*
* @return array
*
@ -580,7 +580,7 @@ class Email implements MessageInterface
&& EmailValidator::isValid($address->mailbox . '@' . $address->host)
) {
$addresses[] = [
'name' => (\property_exists($address, 'personal') ? $address->personal : ''),
'name' => (\property_exists($address, 'personal') ? $address->personal : ''),
'address' => $address->mailbox . '@' . $address->host,
];
}
@ -591,11 +591,11 @@ class Email implements MessageInterface
$list = \explode(',', $addrstr);
foreach ($list as $address) {
$address = trim($address);
$address = \trim($address);
if (\strpos($address, '<') === false) {
if (EmailValidator::isValid($address)) {
$addresses[] = [
'name' => '',
'name' => '',
'address' => $address,
];
}
@ -605,7 +605,7 @@ class Email implements MessageInterface
if (EmailValidator::isValid($email)) {
$addresses[] = [
'name' => \trim(\str_replace(['"', "'"], '', $name)),
'name' => \trim(\str_replace(['"', "'"], '', $name)),
'address' => $email,
];
}
@ -670,7 +670,7 @@ class Email implements MessageInterface
$this->bodyMime
);
$this->headerMime = rtrim($this->headerMime, " \r\n\t") . self::$LE .
$this->headerMime = \rtrim($this->headerMime, " \r\n\t") . self::$LE .
self::normalizeBreaks($headerDkim, self::$LE) . self::$LE;
}
@ -876,7 +876,7 @@ class Email implements MessageInterface
$domain = \mb_convert_encoding($domain, 'UTF-8', $charset);
$errorcode = 0;
if (defined('INTL_IDNA_VARIANT_UTS46')) {
if (\defined('INTL_IDNA_VARIANT_UTS46')) {
$punycode = \idn_to_ascii($domain, $errorcode, \INTL_IDNA_VARIANT_UTS46);
} else {
$punycode = \idn_to_ascii($domain, $errorcode);
@ -999,7 +999,7 @@ class Email implements MessageInterface
$body .= $mimePre;
$body .= $this->getBoundary($this->boundary[1], $altBodyCharSet, MimeType::M_TEXT, $altBodyEncoding);
$body .= $this->encodeString($this->bodyAlt, $altBodyEncoding) . self::$LE;
$body .= $this->getBoundary( $this->boundary[1], $bodyCharSet, MimeType::M_HTML, $bodyEncoding);
$body .= $this->getBoundary($this->boundary[1], $bodyCharSet, MimeType::M_HTML, $bodyEncoding);
$body .= $this->encodeString($this->body, $bodyEncoding) . self::$LE;
if (!empty($this->ical)) {
@ -1085,7 +1085,7 @@ class Email implements MessageInterface
}
if (!empty($this->signKeyFile)) {
if (!defined('PKCS7_TEXT')) {
if (!\defined('PKCS7_TEXT')) {
return '';
}
@ -1104,7 +1104,7 @@ class Email implements MessageInterface
'file://' . \realpath($this->signCertFile),
['file://' . \realpath($this->signKeyFile), $this->signKeyPass],
[],
PKCS7_DETACHED,
\PKCS7_DETACHED,
$this->signExtracertFiles
);
@ -1235,7 +1235,7 @@ class Email implements MessageInterface
// Allow for bypassing the Content-Disposition header
if (!empty($disposition)) {
$encodedName = $this->encodeHeader(\trim(\str_replace(["\r", "\n"], '', $name)));
$mime[] = !empty($encodedName)
$mime[] = !empty($encodedName)
? \sprintf('Content-Disposition: %s; filename=%s%s',
$disposition,
self::quotedString($encodedName),
@ -1317,7 +1317,7 @@ class Email implements MessageInterface
private function encodeString(string $str, string $encoding = EncodingType::E_BASE64) : string
{
$encoded = '';
switch (strtolower($encoding)) {
switch (\strtolower($encoding)) {
case EncodingType::E_BASE64:
$encoded = \chunk_split(\base64_encode($str), self::STD_LINE_LENGTH, self::$LE);
break;
@ -1406,7 +1406,6 @@ class Email implements MessageInterface
return false;
}
/**
* Create address list
*
@ -1424,7 +1423,7 @@ class Email implements MessageInterface
$addresses[] = $this->addrFormat($address);
}
return $type . ': ' . implode(', ', $addresses) . static::$LE;
return $type . ': ' . \implode(', ', $addresses) . static::$LE;
}
/**
@ -1582,7 +1581,7 @@ class Email implements MessageInterface
return $str === $encoded && !\preg_match('/[^A-Za-z0-9!#$%&\'*+\/=?^_`{|}~ -]/', $str)
? $encoded
: "\"$encoded\"";
: "\"${encoded}\"";
}
$matchcount = \preg_match_all('/[^\040\041\043-\133\135-\176]/', $str, $matches);
@ -1628,13 +1627,13 @@ class Email implements MessageInterface
$maxLen -= $maxLen % 4;
$encoded = \trim(\chunk_split($encoded, $maxLen, "\n"));
}
$encoded = \preg_replace('/^(.*)$/m', ' =?' . $charset . "?$encoding?\\1?=", $encoded);
$encoded = \preg_replace('/^(.*)$/m', ' =?' . $charset . "?${encoding}?\\1?=", $encoded);
break;
case 'Q':
$encoded = $this->encodeQ($str, $position);
$encoded = $this->wrapText($encoded, $maxLen, true);
$encoded = \str_replace('=' . self::$LE, "\n", \trim($encoded));
$encoded = \preg_replace('/^(.*)$/m', ' =?' . $charset . "?$encoding?\\1?=", $encoded);
$encoded = \preg_replace('/^(.*)$/m', ' =?' . $charset . "?${encoding}?\\1?=", $encoded);
break;
default:
return $str;
@ -1710,7 +1709,7 @@ class Email implements MessageInterface
$end = '?=';
$encoded = '';
$mbLength = \mb_strlen($str, $this->charset);
$mbLength = \mb_strlen($str, $this->charset);
$length = 75 - \strlen($start) - \strlen($end);
$ratio = $mbLength / \strlen($str);
$avgLength = \floor($length * $ratio * .75);
@ -1721,8 +1720,8 @@ class Email implements MessageInterface
do {
$offset = $avgLength - $lookBack;
$chunk = \mb_substr($str, $i, $offset, $this->charset);
$chunk = \base64_encode($chunk);
$chunk = \mb_substr($str, $i, $offset, $this->charset);
$chunk = \base64_encode($chunk);
++$lookBack;
} while (\strlen($chunk) > $length);
@ -1732,7 +1731,6 @@ class Email implements MessageInterface
return \substr($encoded, 0, -\strlen($linebreak));
}
/**
* Add an attachment from a path on the filesystem.
*
@ -2181,7 +2179,7 @@ class Email implements MessageInterface
*/
public function dkimSign(string $signHeader) : string
{
if (!defined('PKCS7_TEXT')) {
if (!\defined('PKCS7_TEXT')) {
return '';
}
@ -2319,7 +2317,7 @@ class Email implements MessageInterface
foreach ($parsedHeaders as $header) {
if (\in_array(\strtolower($header['label']), $autoSignHeaders, true)) {
$headersToSignKeys[] = $header['label'];
$headersToSign[] = $header['label'] . ': ' . $header['value'];
$headersToSign[] = $header['label'] . ': ' . $header['value'];
if ($this->dkimCopyHeader) {
$copiedHeaders[] = $header['label'] . ':'
@ -2333,7 +2331,7 @@ class Email implements MessageInterface
foreach ($this->customHeader as $customHeader) {
if ($customHeader[0] === $header['label']) {
$headersToSignKeys[] = $header['label'];
$headersToSign[] = $header['label'] . ': ' . $header['value'];
$headersToSign[] = $header['label'] . ': ' . $header['value'];
if ($this->dkimCopyHeader) {
$copiedHeaders[] = $header['label'] . ':'

View File

@ -112,12 +112,12 @@ class Imap extends MailHandler implements MailBoxInterface
return \imap_num_recent($this->mailbox);
}
public function copyMail(string|array $messages, string $box) : bool
public function copyMail(string | array $messages, string $box) : bool
{
return \imap_mail_copy($this->mailbox, !\is_string($messages) ? \implode(',', $messages) : $messages, $box);
}
public function moveMail(string|array $messages, string $box) : bool
public function moveMail(string | array $messages, string $box) : bool
{
return \imap_mail_copy($this->mailbox, !\is_string($messages) ? \implode(',', $messages) : $messages, $box);
}

View File

@ -18,10 +18,10 @@ declare(strict_types=1);
namespace phpOMS\Message\Mail;
use phpOMS\Validation\Network\Email as EmailValidator;
use phpOMS\Utils\StringUtils;
use phpOMS\Validation\Network\Hostname;
use phpOMS\System\SystemUtils;
use phpOMS\Utils\StringUtils;
use phpOMS\Validation\Network\Email as EmailValidator;
use phpOMS\Validation\Network\Hostname;
/**
* Mail class.
@ -410,11 +410,11 @@ class MailHandler
/**
* Call mail() in a safe_mode-aware fashion.
*
* @param string $to To
* @param Email $mail Mail
* @param string $body Message Body
* @param string $header Additional Header(s)
* @param null|string $params Params
* @param string $to To
* @param Email $mail Mail
* @param string $body Message Body
* @param string $header Additional Header(s)
* @param null|string $params Params
*
* @return bool
*
@ -502,7 +502,7 @@ class MailHandler
}
$this->smtp->timeout = $this->timeout;
$this->smtp->doVerp = $this->useVerp;
$this->smtp->doVerp = $this->useVerp;
$hosts = \explode(';', $this->host);
foreach ($hosts as $hostentry) {
@ -540,7 +540,7 @@ class MailHandler
}
//Do we need the OpenSSL extension?
$sslExt = defined('OPENSSL_ALGO_SHA256');
$sslExt = \defined('OPENSSL_ALGO_SHA256');
if (($secure === EncryptionType::TLS || $secure === EncryptionType::SMTPS)
&& !$sslExt
) {
@ -580,7 +580,7 @@ class MailHandler
}
return !($this->useSMTPAuth
&& !$this->smtp->authenticate($this->username, $this->password, $this->authType, $this->oauth )
&& !$this->smtp->authenticate($this->username, $this->password, $this->authType, $this->oauth)
);
}
}

View File

@ -120,12 +120,12 @@ class Pop3 extends MailHandler implements MailBoxInterface
return \imap_num_recent($this->mailbox);
}
public function copyMail(string|array $messages, string $box) : bool
public function copyMail(string | array $messages, string $box) : bool
{
return \imap_mail_copy($this->mailbox, !\is_string($messages) ? \implode(',', $messages) : $messages, $box);
}
public function moveMail(string|array $messages, string $box) : bool
public function moveMail(string | array $messages, string $box) : bool
{
return \imap_mail_copy($this->mailbox, !\is_string($messages) ? \implode(',', $messages) : $messages, $box);
}

View File

@ -210,7 +210,7 @@ class Smtp
}
$crypto_method = \STREAM_CRYPTO_METHOD_TLS_CLIENT;
if (defined('STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT')) {
if (\defined('STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT')) {
$crypto_method |= \STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT;
$crypto_method |= \STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT;
}
@ -342,13 +342,13 @@ class Smtp
// Creates an md5 HMAC.
// by Lance Rushing
$byteLen = 64;
if (strlen($key) > $byteLen) {
if (\strlen($key) > $byteLen) {
$key = \pack('H*', \md5($key));
}
$key = \str_pad($key, $byteLen, \chr(0x00));
$ipad = \str_pad('', $byteLen, \chr(0x36));
$opad = \str_pad('', $byteLen, \chr(0x5c));
$key = \str_pad($key, $byteLen, \chr(0x00));
$ipad = \str_pad('', $byteLen, \chr(0x36));
$opad = \str_pad('', $byteLen, \chr(0x5c));
$k_ipad = $key ^ $ipad;
$k_opad = $key ^ $opad;
@ -392,7 +392,7 @@ class Smtp
$this->heloRply = '';
if (\is_resource($this->con)) {
fclose($this->con);
\fclose($this->con);
$this->con = null;
}
}
@ -526,7 +526,7 @@ class Smtp
protected function parseHelloFields(string $type) : void
{
$this->serverCaps = [];
$lines = \explode("\n", $this->heloRply);
$lines = \explode("\n", $this->heloRply);
foreach ($lines as $n => $s) {
//First 4 chars contain response code followed by - or space
@ -538,7 +538,7 @@ class Smtp
$fields = \explode(' ', $s);
if (!empty($fields)) {
if (!$n) {
$name = $type;
$name = $type;
$fields = $fields[0];
} else {
$name = \array_shift($fields);
@ -650,7 +650,7 @@ class Smtp
*
* @since 1.0.0
*/
protected function sendCommand(string $command, string $commandstring, int|array $expect) : bool
protected function sendCommand(string $command, string $commandstring, int | array $expect) : bool
{
if (!$this->isConnected()) {
return false;
@ -703,7 +703,7 @@ class Smtp
*/
public function sendAndMail(string $from) : bool
{
return $this->sendCommand('SAML', "SAML FROM:$from", 250);
return $this->sendCommand('SAML', "SAML FROM:${from}", 250);
}
/**
@ -717,7 +717,7 @@ class Smtp
*/
public function verify(string $name) : bool
{
return $this->sendCommand('VRFY', "VRFY $name", [250, 251]);
return $this->sendCommand('VRFY', "VRFY ${name}", [250, 251]);
}
/**
@ -877,7 +877,7 @@ class Smtp
$this->lastSmtpTransactionId = '';
} else {
$this->lastSmtpTransactionId = '';
$patterns = SmtpTransactionPattern::getConstants();
$patterns = SmtpTransactionPattern::getConstants();
foreach ($patterns as $pattern) {
$matches = [];

View File

@ -25,11 +25,11 @@ namespace phpOMS\Message;
interface MessageInterface
{
/**
* Gets the body of the message.
*
* @return string
*
* @since 1.0.0
*/
* Gets the body of the message.
*
* @return string
*
* @since 1.0.0
*/
public function getBody() : string;
}

View File

@ -46,14 +46,14 @@ final class SocketResponse extends ResponseAbstract implements RenderableInterfa
}
/**
* Remove response by ID.
*
* @param mixed $id Response ID
*
* @return bool
*
* @since 1.0.0
*/
* Remove response by ID.
*
* @param mixed $id Response ID
*
* @return bool
*
* @since 1.0.0
*/
public function remove($id) : bool
{
if (isset($this->response[$id])) {
@ -66,8 +66,8 @@ final class SocketResponse extends ResponseAbstract implements RenderableInterfa
}
/**
* {@inheritdoc}
*/
* {@inheritdoc}
*/
public function getJsonData() : array
{
return \json_decode($this->getRaw(), true);

View File

@ -320,7 +320,7 @@ abstract class ModuleAbstract
*
* @since 1.0.0
*/
protected function updateModel(int $account, mixed $old, mixed $new, string|\Closure $mapper, string $trigger, string $ip) : void
protected function updateModel(int $account, mixed $old, mixed $new, string | \Closure $mapper, string $trigger, string $ip) : void
{
$this->app->eventManager->triggerSimilar('PRE:Module:' . static::MODULE_NAME . '-' . $trigger . '-update', '', $old);
$id = 0;

View File

@ -710,7 +710,7 @@ final class ModuleManager
*
* @since 1.0.0
*/
public function initModule(string|array $modules) : void
public function initModule(string | array $modules) : void
{
$modules = (array) $modules;
foreach ($modules as $module) {

View File

@ -14,15 +14,15 @@ declare(strict_types=1);
namespace phpOMS\Module;
use phpOMS\Application\ApplicationInfo;
use phpOMS\DataStorage\Database\DatabasePool;
use phpOMS\DataStorage\Database\Query\Builder;
use phpOMS\System\File\Local\Directory;
use phpOMS\System\File\Local\File;
use phpOMS\System\File\PathException;
use phpOMS\System\File\PermissionException;
use phpOMS\Utils\Parser\Php\ArrayParser;
use phpOMS\Application\ApplicationInfo;
use phpOMS\Utils\ArrayUtils;
use phpOMS\Utils\Parser\Php\ArrayParser;
/**
* Status abstract class.

View File

@ -102,7 +102,7 @@ abstract class Enum
*
* @since 1.0.0
*/
public static function getName(string $value) : bool|int|string
public static function getName(string $value) : bool | int | string
{
$arr = self::getConstants();

View File

@ -88,7 +88,7 @@ class Graph
*
* @since 1.0.0
*/
public function getNode(int|string $key) : ?Node
public function getNode(int | string $key) : ?Node
{
return $this->nodes[$key] ?? null;
}
@ -117,7 +117,7 @@ class Graph
*
* @since 1.0.0
*/
public function hasNode(int|string $key) : bool
public function hasNode(int | string $key) : bool
{
return isset($this->nodes[$key]);
}
@ -167,7 +167,7 @@ class Graph
*
* @since 1.0.0
*/
public function getCost() : int|float
public function getCost() : int | float
{
$edges = $this->getEdges();
$costs = 0;
@ -555,7 +555,7 @@ class Graph
*
* @since 1.0.0
*/
public function longestPathBetweenNodes(int|string|Node $node1, int|string|Node $node2) : array
public function longestPathBetweenNodes(int | string | Node $node1, int | string | Node $node2) : array
{
if (!($node1 instanceof Node)) {
$node1 = $this->getNode($node1);

View File

@ -182,7 +182,7 @@ final class MultiMap implements \Countable
*
* @since 1.0.0
*/
public function get(int|string|array $key) : mixed
public function get(int | string | array $key) : mixed
{
if ($this->keyType === KeyType::MULTIPLE || \is_array($key)) {
return $this->getMultiple($key);
@ -200,7 +200,7 @@ final class MultiMap implements \Countable
*
* @since 1.0.0
*/
private function getSingle(int|string $key) : mixed
private function getSingle(int | string $key) : mixed
{
return isset($this->keys[$key]) ? $this->values[$this->keys[$key]] ?? null : null;
}
@ -214,7 +214,7 @@ final class MultiMap implements \Countable
*
* @since 1.0.0
*/
private function getMultiple(int|string|array $key) : mixed
private function getMultiple(int | string | array $key) : mixed
{
if (\is_array($key)) {
if ($this->orderType === OrderType::LOOSE) {
@ -248,7 +248,7 @@ final class MultiMap implements \Countable
*
* @since 1.0.0
*/
public function set(int|string|array $key, mixed $value) : bool
public function set(int | string | array $key, mixed $value) : bool
{
if ($this->keyType === KeyType::MULTIPLE || \is_array($key)) {
return $this->setMultiple($key, $value);
@ -267,7 +267,7 @@ final class MultiMap implements \Countable
*
* @since 1.0.0
*/
private function setMultiple(int|string|array $key, mixed $value) : bool
private function setMultiple(int | string | array $key, mixed $value) : bool
{
$key = \is_array($key) ? $key : [$key];
@ -297,7 +297,7 @@ final class MultiMap implements \Countable
*
* @since 1.0.0
*/
private function setSingle(int|string $key, mixed $value) : bool
private function setSingle(int | string $key, mixed $value) : bool
{
if (isset($this->keys[$key])) {
$this->values[$this->keys[$key]] = $value;
@ -317,7 +317,7 @@ final class MultiMap implements \Countable
*
* @since 1.0.0
*/
public function remove(int|string|array $key) : bool
public function remove(int | string | array $key) : bool
{
if ($this->keyType === KeyType::MULTIPLE || \is_array($key)) {
return $this->removeMultiple($key);
@ -335,7 +335,7 @@ final class MultiMap implements \Countable
*
* @since 1.0.0
*/
private function removeMultiple(int|string|array $key) : bool
private function removeMultiple(int | string | array $key) : bool
{
$key = \is_array($key) ? $key : [$key];
@ -367,7 +367,7 @@ final class MultiMap implements \Countable
*
* @since 1.0.0
*/
private function removeSingle(int|string $key) : bool
private function removeSingle(int | string $key) : bool
{
if (isset($this->keys[$key])) {
$id = $this->keys[$key];
@ -394,7 +394,7 @@ final class MultiMap implements \Countable
*
* @since 1.0.0
*/
public function remap(int|string $old, int|string $new) : bool
public function remap(int | string $old, int | string $new) : bool
{
if ($this->keyType === KeyType::MULTIPLE) {
return false;
@ -422,7 +422,7 @@ final class MultiMap implements \Countable
*
* @since 1.0.0
*/
public function removeKey(int|string $key) : bool
public function removeKey(int | string $key) : bool
{
if ($this->keyType === KeyType::MULTIPLE) {
return false;
@ -442,7 +442,7 @@ final class MultiMap implements \Countable
*
* @since 1.0.0
*/
private function removeKeySingle(int|string $key) : bool
private function removeKeySingle(int | string $key) : bool
{
if (isset($this->keys[$key])) {
unset($this->keys[$key]);
@ -464,7 +464,7 @@ final class MultiMap implements \Countable
*
* @since 1.0.0
*/
public function getSiblings(int|string|array $key) : array
public function getSiblings(int | string | array $key) : array
{
if ($this->keyType === KeyType::MULTIPLE || \is_array($key)) {
return $this->getSiblingsMultiple($key);
@ -482,7 +482,7 @@ final class MultiMap implements \Countable
*
* @since 1.0.0
*/
public function getSiblingsMultiple(int|string|array $key) : array
public function getSiblingsMultiple(int | string | array $key) : array
{
if ($this->orderType === OrderType::LOOSE) {
$key = \is_array($key) ? $key : [$key];
@ -502,7 +502,7 @@ final class MultiMap implements \Countable
*
* @since 1.0.0
*/
private function getSiblingsSingle(int|string $key) : array
private function getSiblingsSingle(int | string $key) : array
{
$siblings = [];
if (!isset($this->keys[$key])) {

View File

@ -202,7 +202,7 @@ final class FileUtils
*
* @since 1.0.0
*/
public static function mb_pathinfo(string $path, int|string $options = null) : string|array
public static function mb_pathinfo(string $path, int | string $options = null) : string | array
{
$ret = ['dirname' => '', 'basename' => '', 'extension' => '', 'filename' => ''];
$pathinfo = [];

View File

@ -694,7 +694,7 @@ class Directory extends FileAbstract implements DirectoryInterface
/**
* {@inheritdoc}
*/
public function next()
public function next() : void
{
$next = \next($this->nodes);
if ($next instanceof self) {

View File

@ -517,7 +517,7 @@ final class Directory extends FileAbstract implements DirectoryInterface
/**
* {@inheritdoc}
*/
public function next()
public function next() : void
{
$next = \next($this->nodes);
if ($next instanceof self) {

View File

@ -138,7 +138,7 @@ final class SystemUtils
{
if (isset($_SERVER['SERVER_NAME'])) {
return $_SERVER['SERVER_NAME'];
} elseif (($result = gethostname()) !== false) {
} elseif (($result = \gethostname()) !== false) {
return $result;
} elseif (\php_uname('n') !== false) {
return \php_uname('n');

View File

@ -334,7 +334,7 @@ final class ArrayUtils
*
* @since 1.0.0
*/
public static function arraySum(array $array, int $start = 0, int $count = 0) : int|float
public static function arraySum(array $array, int $start = 0, int $count = 0) : int | float
{
$count = $count === 0 ? \count($array) : $start + $count;
$sum = 0;
@ -391,7 +391,7 @@ final class ArrayUtils
*
* @since 1.0.0
*/
public static function power(array $values, int|float $exp = 2) : array
public static function power(array $values, int | float $exp = 2) : array
{
$squared = [];

View File

@ -292,7 +292,7 @@ class Repository
*
* @since 1.0.0
*/
public function add(string|array $files = '*') : string
public function add(string | array $files = '*') : string
{
$files = $this->parseFileList($files);
@ -309,7 +309,7 @@ class Repository
*
* @since 1.0.0
*/
public function rm(string|array $files = '*', bool $cached = false) : string
public function rm(string | array $files = '*', bool $cached = false) : string
{
$files = $this->parseFileList($files);
@ -327,7 +327,7 @@ class Repository
*
* @since 1.0.0
*/
private function parseFileList(string|array $files) : string
private function parseFileList(string | array $files) : string
{
if (\is_array($files)) {
return '"' . \implode('" "', $files) . '"';

View File

@ -35,7 +35,7 @@ interface ArchiveInterface
*
* @since 1.0.0
*/
public static function pack(string|array $sources, string $destination, bool $overwrite = false) : bool;
public static function pack(string | array $sources, string $destination, bool $overwrite = false) : bool;
/**
* Unpack archive.

View File

@ -29,7 +29,7 @@ class Gz implements ArchiveInterface
/**
* {@inheritdoc}
*/
public static function pack(string|array $source, string $destination, bool $overwrite = false) : bool
public static function pack(string | array $source, string $destination, bool $overwrite = false) : bool
{
$destination = \str_replace('\\', '/', $destination);
if ($destination === false

View File

@ -31,7 +31,7 @@ class Tar implements ArchiveInterface
/**
* {@inheritdoc}
*/
public static function pack(string|array $sources, string $destination, bool $overwrite = false) : bool
public static function pack(string | array $sources, string $destination, bool $overwrite = false) : bool
{
$destination = FileUtils::absolute(\str_replace('\\', '/', $destination));
if (!$overwrite && \is_file($destination)) {

View File

@ -31,7 +31,7 @@ class TarGz implements ArchiveInterface
/**
* {@inheritdoc}
*/
public static function pack(string|array $source, string $destination, bool $overwrite = false) : bool
public static function pack(string | array $source, string $destination, bool $overwrite = false) : bool
{
$destination = \str_replace('\\', '/', $destination);
if (!$overwrite && \is_file($destination)) {

View File

@ -31,7 +31,7 @@ class Zip implements ArchiveInterface
/**
* {@inheritdoc}
*/
public static function pack(string|array $sources, string $destination, bool $overwrite = false) : bool
public static function pack(string | array $sources, string $destination, bool $overwrite = false) : bool
{
$destination = FileUtils::absolute(\str_replace('\\', '/', $destination));
if (!$overwrite && \is_file($destination)

View File

@ -80,7 +80,7 @@ final class MbStringUtils
*
* @since 1.0.0
*/
public static function mb_startsWith(string $haystack, string|array $needles) : bool
public static function mb_startsWith(string $haystack, string | array $needles) : bool
{
if (\is_string($needles)) {
$needles = [$needles];
@ -112,7 +112,7 @@ final class MbStringUtils
*
* @since 1.0.0
*/
public static function mb_endsWith(string $haystack, string|array $needles) : bool
public static function mb_endsWith(string $haystack, string | array $needles) : bool
{
if (\is_string($needles)) {
$needles = [$needles];

View File

@ -109,7 +109,7 @@ final class Permutation
*
* @since 1.0.0
*/
public static function permutate(string|array $toPermute, array $key) : string|array
public static function permutate(string | array $toPermute, array $key) : string | array
{
$length = \is_array($toPermute) ? \count($toPermute) : \strlen($toPermute);

View File

@ -82,7 +82,7 @@ final class StringUtils
*
* @since 1.0.0
*/
public static function endsWith(string $haystack, string|array $needles) : bool
public static function endsWith(string $haystack, string | array $needles) : bool
{
if (\is_string($needles)) {
$needles = [$needles];
@ -114,7 +114,7 @@ final class StringUtils
*
* @since 1.0.0
*/
public static function startsWith(string $haystack, string|array $needles) : bool
public static function startsWith(string $haystack, string | array $needles) : bool
{
if (\is_string($needles)) {
$needles = [$needles];
@ -412,7 +412,7 @@ final class StringUtils
public static function isShellSafe(string $string)
{
if (\escapeshellcmd($string) !== $string
|| !\in_array(\escapeshellarg($string), ["'$string'", "\"$string\""])
|| !\in_array(\escapeshellarg($string), ["'${string}'", "\"${string}\""])
) {
return false;
}

View File

@ -72,7 +72,7 @@ final class Validator extends ValidatorAbstract
*
* @since 1.0.0
*/
public static function isType(mixed $var, string|array $constraint) : bool
public static function isType(mixed $var, string | array $constraint) : bool
{
if (!\is_array($constraint)) {
$constraint = [$constraint];
@ -119,7 +119,7 @@ final class Validator extends ValidatorAbstract
*
* @since 1.0.0
*/
public static function contains(string $var, string|array $substr) : bool
public static function contains(string $var, string | array $substr) : bool
{
return \is_string($substr) ? \strpos($var, $substr) !== false : StringUtils::contains($var, $substr);
}
@ -150,7 +150,7 @@ final class Validator extends ValidatorAbstract
*
* @since 1.0.0
*/
public static function hasLimit(int|float $var, int|float $min = 0, int|float $max = \PHP_INT_MAX) : bool
public static function hasLimit(int | float $var, int | float $min = 0, int | float $max = \PHP_INT_MAX) : bool
{
if ($var <= $max && $var >= $min) {
return true;

View File

@ -304,7 +304,7 @@ class View extends ViewAbstract
*
* @since 1.0.0
*/
public function getNumeric(int|float $numeric, string $format = null) : string
public function getNumeric(int | float $numeric, string $format = null) : string
{
return $this->l11nManager->getNumeric($this->l11n, $numeric, $format);
}
@ -336,7 +336,7 @@ class View extends ViewAbstract
*
* @since 1.0.0
*/
public function getCurrency(int|float $currency, string $format = null, string $symbol = null, int $divide = 1) : string
public function getCurrency(int | float $currency, string $format = null, string $symbol = null, int $divide = 1) : string
{
return $this->l11nManager->getCurrency($this->l11n, $currency, $format, $symbol, $divide);
}

View File

@ -127,7 +127,7 @@ abstract class ViewAbstract implements RenderableInterface
*
* @since 1.0.0
*/
public function getView(string $id) : bool|self
public function getView(string $id) : bool | self
{
if (!isset($this->views[$id])) {
return false;

View File

@ -21,9 +21,11 @@ require_once __DIR__ . '/../../Autoloader.php';
class NumericElement implements SortableInterface
{
public int|float $value = 0;
public int |
public function __construct(int|float $value)
float $value = 0;
public function __construct(int | float $value)
{
$this->value = $value;
}
@ -38,12 +40,12 @@ class NumericElement implements SortableInterface
return $this->value === $obj->getValue();
}
public function getValue() : int|float
public function getValue() : int | float
{
return $this->value;
}
public static function max(array $list) : int|float
public static function max(array $list) : int | float
{
$values = [];
foreach ($list as $element) {
@ -53,7 +55,7 @@ class NumericElement implements SortableInterface
return \max($values);
}
public static function min(array $list) : int|float
public static function min(array $list) : int | float
{
$values = [];
foreach ($list as $element) {

View File

@ -44,12 +44,12 @@ class ApplicationManagerTest extends \PHPUnit\Framework\TestCase
$app->dbPool = $GLOBALS['dbpool'];
$app->router = new WebRouter();
$app->dispatcher = new Dispatcher($app);
$app->appSettings = new class implements SettingsInterface {
$app->appSettings = new class() implements SettingsInterface {
use OptionsTrait;
public function get(
mixed $ids = null,
string|array $names = null,
string | array $names = null,
string $module = null,
int $group = null,
int $account = null

View File

@ -14,8 +14,8 @@ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Cache\Connection;
use phpOMS\DataStorage\Cache\CacheType;
use phpOMS\DataStorage\Cache\CacheStatus;
use phpOMS\DataStorage\Cache\CacheType;
use phpOMS\DataStorage\Cache\Connection\NullCache;
/**

View File

@ -19,9 +19,9 @@ use phpOMS\Dispatcher\Dispatcher;
use phpOMS\Localization\Localization;
use phpOMS\Message\Http\HttpRequest;
use phpOMS\Message\Http\HttpResponse;
use phpOMS\Module\ModuleAbstract;
use phpOMS\Router\WebRouter;
use phpOMS\Uri\HttpUri;
use phpOMS\Module\ModuleAbstract;
require_once __DIR__ . '/../Autoloader.php';
@ -36,7 +36,7 @@ class DispatcherTest extends \PHPUnit\Framework\TestCase
protected function setUp() : void
{
$this->app = new class() extends ApplicationAbstract {
$this->app = new class() extends ApplicationAbstract {
protected string $appName = 'Api';
};
@ -56,7 +56,11 @@ class DispatcherTest extends \PHPUnit\Framework\TestCase
public function testControllerInputOutput() : void
{
$this->app->dispatcher->set(new class extends ModuleAbstract { public string $name = 'test'; public function testFunction() { return $this->name; } }, 'test');
$this->app->dispatcher->set(new class() extends ModuleAbstract {
public string $name = 'test';
public function testFunction() { return $this->name; }
}, 'test');
$localization = new Localization();

View File

@ -28,7 +28,7 @@ class EmailTestTest extends \PHPUnit\Framework\TestCase
{
protected Email $mail;
public function setUp() : void
protected function setUp() : void
{
$this->mail = new Email();
}
@ -58,9 +58,9 @@ class EmailTestTest extends \PHPUnit\Framework\TestCase
public function testHtml() : void
{
$message = \file_get_contents(__DIR__ . '/files/utf8.html');
$message = \file_get_contents(__DIR__ . '/files/utf8.html');
$this->mail->charset = CharsetType::UTF_8;
$this->mail->body = '';
$this->mail->body = '';
$this->mail->bodyAlt = '';
$this->mail->msgHTML($message, __DIR__ . '/files');

View File

@ -16,10 +16,10 @@ namespace phpOMS\tests\Message;
require_once __DIR__ . '/../../Autoloader.php';
use phpOMS\Message\Mail\MailHandler;
use phpOMS\Message\Mail\SubmitType;
use phpOMS\Message\Mail\Email;
use phpOMS\Message\Mail\Imap;
use phpOMS\Message\Mail\MailHandler;
use phpOMS\Message\Mail\SubmitType;
use phpOMS\System\CharsetType;
/**
@ -31,7 +31,7 @@ class MailHandlerTest extends \PHPUnit\Framework\TestCase
{
protected MailHandler $handler;
public function setUp() : void
protected function setUp() : void
{
$this->handler = new MailHandler();
}
@ -93,9 +93,9 @@ class MailHandlerTest extends \PHPUnit\Framework\TestCase
$mail->addBCC('test3@orange-management.email', 'Dennis Eichhorn');
$mail->addReplyTo('test4@orange-management.email', 'Dennis Eichhorn');
$mail->subject = 'testSendHtmlWithMail';
$message = \file_get_contents(__DIR__ . '/files/utf8.html');
$message = \file_get_contents(__DIR__ . '/files/utf8.html');
$mail->charset = CharsetType::UTF_8;
$mail->body = '';
$mail->body = '';
$mail->bodyAlt = '';
$mail->msgHTML($message, __DIR__ . '/files');
@ -119,9 +119,9 @@ class MailHandlerTest extends \PHPUnit\Framework\TestCase
$mail->addBCC('test3@orange-management.email', 'Dennis Eichhorn');
$mail->addReplyTo('test4@orange-management.email', 'Dennis Eichhorn');
$mail->subject = 'testSendHtmlWithSendmail';
$message = \file_get_contents(__DIR__ . '/files/utf8.html');
$message = \file_get_contents(__DIR__ . '/files/utf8.html');
$mail->charset = CharsetType::UTF_8;
$mail->body = '';
$mail->body = '';
$mail->bodyAlt = '';
$mail->msgHTML($message, __DIR__ . '/files');