diff --git a/ApplicationAbstract.php b/ApplicationAbstract.php
index 58620425b..0458f595b 100644
--- a/ApplicationAbstract.php
+++ b/ApplicationAbstract.php
@@ -178,11 +178,11 @@ class ApplicationAbstract
*/
public function __set($name, $value) : void
{
- if (!empty($this->$name)) {
+ if (!empty($this->{$name})) {
return;
}
- $this->$name = $value;
+ $this->{$name} = $value;
}
/**
@@ -198,6 +198,6 @@ class ApplicationAbstract
*/
public function __get($name)
{
- return $this->$name;
+ return $this->{$name};
}
}
diff --git a/Business/Marketing/NetPromoterScore.php b/Business/Marketing/NetPromoterScore.php
index 856f79a44..45c7857c5 100644
--- a/Business/Marketing/NetPromoterScore.php
+++ b/Business/Marketing/NetPromoterScore.php
@@ -69,11 +69,11 @@ final class NetPromoterScore
foreach ($this->scores as $score) {
if ($score > 8) {
- $promoters++;
+ ++$promoters;
} elseif ($score > 6) {
- $passives++;
+ ++$passives;
} else {
- $detractors++;
+ ++$detractors;
}
}
diff --git a/DataStorage/Cache/Connection/ConnectionFactory.php b/DataStorage/Cache/Connection/ConnectionFactory.php
index 2b7d63ff8..2e90c0229 100644
--- a/DataStorage/Cache/Connection/ConnectionFactory.php
+++ b/DataStorage/Cache/Connection/ConnectionFactory.php
@@ -44,7 +44,7 @@ class ConnectionFactory
*
* @return ConnectionInterface
*
- * @throws \InvalidArgumentException Throws this exception if the cache is not supported.
+ * @throws \InvalidArgumentException throws this exception if the cache is not supported
*
* @since 1.0.0
*/
diff --git a/DataStorage/Database/Connection/ConnectionFactory.php b/DataStorage/Database/Connection/ConnectionFactory.php
index b526e1550..c29c3e256 100644
--- a/DataStorage/Database/Connection/ConnectionFactory.php
+++ b/DataStorage/Database/Connection/ConnectionFactory.php
@@ -46,7 +46,7 @@ final class ConnectionFactory
*
* @return ConnectionAbstract
*
- * @throws \InvalidArgumentException Throws this exception if the database is not supported.
+ * @throws \InvalidArgumentException throws this exception if the database is not supported
*
* @since 1.0.0
*/
diff --git a/DataStorage/Database/DataMapperAbstract.php b/DataStorage/Database/DataMapperAbstract.php
index ce5afbd5a..38b2ef4f3 100644
--- a/DataStorage/Database/DataMapperAbstract.php
+++ b/DataStorage/Database/DataMapperAbstract.php
@@ -2851,7 +2851,7 @@ class DataMapperAbstract implements DataMapperInterface
*/
private static function isInitialized(string $mapper, $id) : bool
{
- return isset(self::$initObjects[$mapper]) && isset(self::$initObjects[$mapper][$id]);
+ return isset(self::$initObjects[$mapper], self::$initObjects[$mapper][$id]);
}
/**
@@ -2866,7 +2866,7 @@ class DataMapperAbstract implements DataMapperInterface
*/
private static function isInitializedArray(string $mapper, $id) : bool
{
- return isset(self::$initArrays[$mapper]) && isset(self::$initArrays[$mapper][$id]);
+ return isset(self::$initArrays[$mapper], self::$initArrays[$mapper][$id]);
}
/**
diff --git a/DataStorage/Database/GrammarAbstract.php b/DataStorage/Database/GrammarAbstract.php
index 7278d3934..300eb36db 100644
--- a/DataStorage/Database/GrammarAbstract.php
+++ b/DataStorage/Database/GrammarAbstract.php
@@ -81,7 +81,7 @@ abstract class GrammarAbstract
* @since 1.0.0
*/
protected $specialKeywords = [
- 'COUNT('
+ 'COUNT(',
];
/**
diff --git a/DataStorage/Database/Query/Grammar/Grammar.php b/DataStorage/Database/Query/Grammar/Grammar.php
index f9cf3b619..9ee566c18 100644
--- a/DataStorage/Database/Query/Grammar/Grammar.php
+++ b/DataStorage/Database/Query/Grammar/Grammar.php
@@ -282,9 +282,9 @@ class Grammar extends GrammarAbstract
* @param mixed $value Value
* @param string $prefix Prefix in case value is a table
*
- * @return string Returns a string representation of the value.
+ * @return string returns a string representation of the value
*
- * @throws \InvalidArgumentException Throws this exception if the value to compile is not supported by this function.
+ * @throws \InvalidArgumentException throws this exception if the value to compile is not supported by this function
*
* @since 1.0.0
*/
diff --git a/DataStorage/Database/Schema/Grammar/Grammar.php b/DataStorage/Database/Schema/Grammar/Grammar.php
index 70ff08083..88ab2e8ef 100644
--- a/DataStorage/Database/Schema/Grammar/Grammar.php
+++ b/DataStorage/Database/Schema/Grammar/Grammar.php
@@ -57,7 +57,7 @@ class Grammar extends QueryGrammar
protected $createTablesComponents = [
'createTable',
'createFields',
- 'createTableSettings'
+ 'createTableSettings',
];
/**
@@ -134,7 +134,7 @@ class Grammar extends QueryGrammar
/**
* Compile drop query.
*
- * @param BuilderAbstract $query Query
+ * @param BuilderAbstract $query Query
* @param string $table Tables to drop
*
* @return string
@@ -155,7 +155,7 @@ class Grammar extends QueryGrammar
/**
* Compile drop query.
*
- * @param BuilderAbstract $query Query
+ * @param BuilderAbstract $query Query
* @param string $table Tables to drop
*
* @return string
diff --git a/DataStorage/File/JsonBuilder.php b/DataStorage/File/JsonBuilder.php
index 60f7e3a14..85425d69b 100644
--- a/DataStorage/File/JsonBuilder.php
+++ b/DataStorage/File/JsonBuilder.php
@@ -14,7 +14,6 @@ declare(strict_types=1);
namespace phpOMS\DataStorage\File;
-use phpOMS\DataStorage\File\QueryType;
use phpOMS\DataStorage\Database\Query\JoinType;
/**
diff --git a/DataStorage/File/JsonGrammar.php b/DataStorage/File/JsonGrammar.php
index 00ce90215..b570dce54 100644
--- a/DataStorage/File/JsonGrammar.php
+++ b/DataStorage/File/JsonGrammar.php
@@ -19,8 +19,6 @@ declare(strict_types=1);
namespace phpOMS\DataStorage\File;
-use phpOMS\DataStorage\File\QueryType;
-
/**
* Json query JsonGrammar.
*
diff --git a/DataStorage/Session/HttpSession.php b/DataStorage/Session/HttpSession.php
index 6ea44a1b4..9050c2e89 100644
--- a/DataStorage/Session/HttpSession.php
+++ b/DataStorage/Session/HttpSession.php
@@ -70,7 +70,7 @@ class HttpSession implements SessionInterface
* @param bool|int|string $sid Session id
* @param int $inactivityInterval Interval for session activity
*
- * @throws LockException Throws this exception if the session is alrady locked for further interaction.
+ * @throws LockException throws this exception if the session is alrady locked for further interaction
*
* @since 1.0.0
*/
@@ -86,7 +86,7 @@ class HttpSession implements SessionInterface
$this->inactivityInterval = $inactivityInterval;
- if (\session_status() !== PHP_SESSION_ACTIVE && !\headers_sent()) {
+ if (\session_status() !== \PHP_SESSION_ACTIVE && !\headers_sent()) {
\session_set_cookie_params($liftetime, '/', '', false, true);
\session_start();
}
diff --git a/Dispatcher/Dispatcher.php b/Dispatcher/Dispatcher.php
index 0c4240f03..11853b008 100644
--- a/Dispatcher/Dispatcher.php
+++ b/Dispatcher/Dispatcher.php
@@ -108,9 +108,9 @@ final class Dispatcher
*
* @return array
*
- * @throws PathException This exception is thrown if the function cannot be autoloaded.
- * @throws \Exception This exception is thrown if the function is not callable.
- * @throws \UnexpectedValueException This exception is thrown if the controller string is malformed.
+ * @throws PathException this exception is thrown if the function cannot be autoloaded
+ * @throws \Exception this exception is thrown if the function is not callable
+ * @throws \UnexpectedValueException this exception is thrown if the controller string is malformed
*
* @since 1.0.0
*/
@@ -184,7 +184,7 @@ final class Dispatcher
*
* @return object
*
- * @throws PathException This exception is thrown in case the controller couldn't be found.
+ * @throws PathException this exception is thrown in case the controller couldn't be found
*
* @since 1.0.0
*/
diff --git a/Event/EventManager.php b/Event/EventManager.php
index 28d6071d2..dc2aebbe8 100644
--- a/Event/EventManager.php
+++ b/Event/EventManager.php
@@ -65,7 +65,7 @@ final class EventManager implements \Countable
*/
public function __construct(Dispatcher $dispatcher = null)
{
- $this->dispatcher = $dispatcher ?? new class {
+ $this->dispatcher = $dispatcher ?? new class() {
public function dispatch($func, ...$data) : void
{
$func(...$data);
@@ -140,7 +140,7 @@ final class EventManager implements \Countable
* @param string $id Sub-requirement for event
* @param mixed $data Data to pass to the callback
*
- * @return bool Returns true on sucessfully triggering the event, false if the event couldn't be triggered which also includes sub-requirements missing.
+ * @return bool returns true on sucessfully triggering the event, false if the event couldn't be triggered which also includes sub-requirements missing
*
* @since 1.0.0
*/
@@ -169,7 +169,7 @@ final class EventManager implements \Countable
* @param string $id Sub-requirement for event
* @param mixed $data Data to pass to the callback
*
- * @return bool Returns true on sucessfully triggering the event, false if the event couldn't be triggered which also includes sub-requirements missing.
+ * @return bool returns true on sucessfully triggering the event, false if the event couldn't be triggered which also includes sub-requirements missing
*
* @since 1.0.0
*/
diff --git a/Localization/L11nManager.php b/Localization/L11nManager.php
index da889acad..65e0fa3cd 100644
--- a/Localization/L11nManager.php
+++ b/Localization/L11nManager.php
@@ -80,7 +80,7 @@ final class L11nManager
*
* @return void
*
- * @throws \UnexpectedValueException This exception is thrown when no language definitions for the defined source `$from` exist.
+ * @throws \UnexpectedValueException this exception is thrown when no language definitions for the defined source `$from` exist
*
* @since 1.0.0
*/
diff --git a/Localization/Money.php b/Localization/Money.php
index 7eacb2030..ccfda866d 100644
--- a/Localization/Money.php
+++ b/Localization/Money.php
@@ -102,7 +102,7 @@ final class Money implements \Serializable
*
* @return int
*
- * @throws \Exception This exception is thrown if an internal explode or substr error occurs.
+ * @throws \Exception this exception is thrown if an internal explode or substr error occurs
*
* @since 1.0.0
*/
@@ -189,7 +189,7 @@ final class Money implements \Serializable
*
* @return string
*
- * @throws \Exception This exception is thrown if an internal substr error occurs.
+ * @throws \Exception this exception is thrown if an internal substr error occurs
*
* @since 1.0.0
*/
diff --git a/Log/FileLogger.php b/Log/FileLogger.php
index 0964b631b..df089cbea 100644
--- a/Log/FileLogger.php
+++ b/Log/FileLogger.php
@@ -248,8 +248,8 @@ final class FileLogger implements LoggerInterface
$replace['{level}'] = \sprintf('%--12s', $level);
$replace['{path}'] = $_SERVER['REQUEST_URI'] ?? 'REQUEST_URI';
$replace['{ip}'] = \sprintf('%--15s', $_SERVER['REMOTE_ADDR'] ?? '0.0.0.0');
- $replace['{version}'] = \sprintf('%--15s', PHP_VERSION);
- $replace['{os}'] = \sprintf('%--15s', PHP_OS);
+ $replace['{version}'] = \sprintf('%--15s', \PHP_VERSION);
+ $replace['{os}'] = \sprintf('%--15s', \PHP_OS);
$replace['{line}'] = \sprintf('%--15s', $context['line'] ?? '?');
return \strtr($message, $replace);
@@ -277,10 +277,10 @@ final class FileLogger implements LoggerInterface
$this->fp = \fopen($this->path, 'a');
- if ($this->fp !== false && \flock($this->fp, LOCK_EX)) {
+ if ($this->fp !== false && \flock($this->fp, \LOCK_EX)) {
\fwrite($this->fp, $message . "\n");
\fflush($this->fp);
- \flock($this->fp, LOCK_UN);
+ \flock($this->fp, \LOCK_UN);
\fclose($this->fp);
$this->fp = false;
}
@@ -406,11 +406,11 @@ final class FileLogger implements LoggerInterface
$levels[$line[1]] = 0;
}
- $levels[$line[1]]++;
+ ++$levels[$line[1]];
$line = \fgetcsv($this->fp, 0, ';');
}
- \fseek($this->fp, 0, SEEK_END);
+ \fseek($this->fp, 0, \SEEK_END);
\fclose($this->fp);
return $levels;
@@ -453,11 +453,11 @@ final class FileLogger implements LoggerInterface
$connection[$line[2]] = 0;
}
- $connection[$line[2]]++;
+ ++$connection[$line[2]];
$line = \fgetcsv($this->fp, 0, ';');
}
- \fseek($this->fp, 0, SEEK_END);
+ \fseek($this->fp, 0, \SEEK_END);
\fclose($this->fp);
\asort($connection);
@@ -493,10 +493,10 @@ final class FileLogger implements LoggerInterface
$line = \fgetcsv($this->fp, 0, ';');
while ($line !== false && $line !== null) {
- $id++;
+ ++$id;
if ($offset > 0) {
- $offset--;
+ --$offset;
continue;
}
@@ -510,12 +510,12 @@ final class FileLogger implements LoggerInterface
}
$logs[$id] = $line;
- $limit--;
+ --$limit;
\ksort($logs);
$line = \fgetcsv($this->fp, 0, ';');
}
- \fseek($this->fp, 0, SEEK_END);
+ \fseek($this->fp, 0, \SEEK_END);
\fclose($this->fp);
return $logs;
@@ -548,7 +548,7 @@ final class FileLogger implements LoggerInterface
\fseek($this->fp, 0);
while (($line = \fgetcsv($this->fp, 0, ';')) !== false && $current <= $id) {
- $current++;
+ ++$current;
if ($current < $id) {
continue;
@@ -567,7 +567,7 @@ final class FileLogger implements LoggerInterface
break;
}
- \fseek($this->fp, 0, SEEK_END);
+ \fseek($this->fp, 0, \SEEK_END);
\fclose($this->fp);
return $log;
diff --git a/Math/Functions/Gamma.php b/Math/Functions/Gamma.php
index 10903f1ba..2851170cc 100644
--- a/Math/Functions/Gamma.php
+++ b/Math/Functions/Gamma.php
@@ -43,7 +43,7 @@ final class Gamma
*/
private const LANCZOSAPPROXIMATION = [
0.99999999999980993, 676.5203681218851, -1259.1392167224028, 771.32342877765313, -176.61502916214059,
- 12.507343278686905, -0.13857109526572012, 9.9843695780195716e-6, 1.5056327351493116e-7
+ 12.507343278686905, -0.13857109526572012, 9.9843695780195716e-6, 1.5056327351493116e-7,
];
/**
@@ -58,18 +58,18 @@ final class Gamma
public static function lanczosApproximationReal($z) : float
{
if ($z < 0.5) {
- return M_PI / (\sin(M_PI * $z) * self::lanczosApproximationReal(1 - $z));
+ return \M_PI / (\sin(\M_PI * $z) * self::lanczosApproximationReal(1 - $z));
}
- $z -= 1;
- $a = self::LANCZOSAPPROXIMATION[0];
- $t = $z + 7.5;
+ --$z;
+ $a = self::LANCZOSAPPROXIMATION[0];
+ $t = $z + 7.5;
for ($i = 1; $i < 9; ++$i) {
$a += self::LANCZOSAPPROXIMATION[$i] / ($z + $i);
}
- return \sqrt(2 * M_PI) * \pow($t, $z + 0.5) * \exp(-$t) * $a;
+ return \sqrt(2 * \M_PI) * \pow($t, $z + 0.5) * \exp(-$t) * $a;
}
/**
@@ -83,7 +83,7 @@ final class Gamma
*/
public static function stirlingApproximation($x) : float
{
- return \sqrt(2.0 * M_PI / $x) * \pow($x / M_E, $x);
+ return \sqrt(2.0 * \M_PI / $x) * \pow($x / \M_E, $x);
}
/**
@@ -98,7 +98,7 @@ final class Gamma
public static function spougeApproximation($z) : float
{
$k1_fact = 1.0;
- $c = [\sqrt(2.0 * M_PI)];
+ $c = [\sqrt(2.0 * \M_PI)];
for ($k = 1; $k < 12; ++$k) {
$c[$k] = \exp(12 - $k) * \pow(12 - $k, $k - 0.5) / $k1_fact;
diff --git a/Math/Geometry/ConvexHull/MonotoneChain.php b/Math/Geometry/ConvexHull/MonotoneChain.php
index 0874cd115..303bcc189 100644
--- a/Math/Geometry/ConvexHull/MonotoneChain.php
+++ b/Math/Geometry/ConvexHull/MonotoneChain.php
@@ -55,7 +55,7 @@ final class MonotoneChain
// Lower hull
for ($i = 0; $i < $n; ++$i) {
while ($k >= 2 && self::cross($result[$k - 2], $result[$k - 1], $points[$i]) <= 0) {
- $k--;
+ --$k;
}
$result[$k++] = $points[$i];
@@ -64,7 +64,7 @@ final class MonotoneChain
// Upper hull
for ($i = $n - 2, $t = $k + 1; $i >= 0; --$i) {
while ($k >= $t && self::cross($result[$k - 2], $result[$k - 1], $points[$i]) <= 0) {
- $k--;
+ --$k;
}
$result[$k++] = $points[$i];
diff --git a/Math/Geometry/Shape/D2/Circle.php b/Math/Geometry/Shape/D2/Circle.php
index 6cb4b0e83..bc6c813d6 100644
--- a/Math/Geometry/Shape/D2/Circle.php
+++ b/Math/Geometry/Shape/D2/Circle.php
@@ -36,7 +36,7 @@ final class Circle implements D2ShapeInterface
*/
public static function getSurface(float $r) : float
{
- return \pi() * $r ** 2;
+ return \M_PI * $r ** 2;
}
/**
@@ -50,7 +50,7 @@ final class Circle implements D2ShapeInterface
*/
public static function getPerimeter(float $r) : float
{
- return 2 * \pi() * $r;
+ return 2 * \M_PI * $r;
}
/**
@@ -64,7 +64,7 @@ final class Circle implements D2ShapeInterface
*/
public static function getRadiusBySurface(float $surface) : float
{
- return \sqrt($surface / \pi());
+ return \sqrt($surface / \M_PI);
}
/**
@@ -81,6 +81,6 @@ final class Circle implements D2ShapeInterface
*/
public static function getRadiusByPerimeter(float $C) : float
{
- return $C / (2 * \pi());
+ return $C / (2 * \M_PI);
}
}
diff --git a/Math/Geometry/Shape/D2/Ellipse.php b/Math/Geometry/Shape/D2/Ellipse.php
index 0241f2cc7..bdd60d3fb 100644
--- a/Math/Geometry/Shape/D2/Ellipse.php
+++ b/Math/Geometry/Shape/D2/Ellipse.php
@@ -42,7 +42,7 @@ final class Ellipse implements D2ShapeInterface
*/
public static function getSurface(float $a, float $b) : float
{
- return \pi() * $a * $b;
+ return \M_PI * $a * $b;
}
/**
@@ -62,6 +62,6 @@ final class Ellipse implements D2ShapeInterface
*/
public static function getPerimeter(float $a, float $b) : float
{
- return \pi() * ($a + $b) * (3 * ($a - $b) ** 2 / (($a + $b) ** 2 * (\sqrt(-3 * ($a - $b) ** 2 / (($a + $b) ** 2) + 4) + 10)) + 1);
+ return \M_PI * ($a + $b) * (3 * ($a - $b) ** 2 / (($a + $b) ** 2 * (\sqrt(-3 * ($a - $b) ** 2 / (($a + $b) ** 2) + 4) + 10)) + 1);
}
}
diff --git a/Math/Geometry/Shape/D2/Polygon.php b/Math/Geometry/Shape/D2/Polygon.php
index 7e2e60720..2d4f98b0d 100644
--- a/Math/Geometry/Shape/D2/Polygon.php
+++ b/Math/Geometry/Shape/D2/Polygon.php
@@ -126,7 +126,7 @@ final class Polygon implements D2ShapeInterface
}
if (\abs($vertex1['x'] - $vertex2['x']) < self::EPSILON || $point['x'] < $xinters) {
- $countIntersect++;
+ ++$countIntersect;
}
}
}
diff --git a/Math/Geometry/Shape/D3/Cone.php b/Math/Geometry/Shape/D3/Cone.php
index 23856d4c8..9725ea158 100644
--- a/Math/Geometry/Shape/D3/Cone.php
+++ b/Math/Geometry/Shape/D3/Cone.php
@@ -37,7 +37,7 @@ final class Cone implements D3ShapeInterface
*/
public static function getVolume(float $r, float $h) : float
{
- return \pi() * $r ** 2 * $h / 3;
+ return \M_PI * $r ** 2 * $h / 3;
}
/**
@@ -52,7 +52,7 @@ final class Cone implements D3ShapeInterface
*/
public static function getSurface(float $r, float $h) : float
{
- return \pi() * $r * ($r + \sqrt($h ** 2 + $r ** 2));
+ return \M_PI * $r * ($r + \sqrt($h ** 2 + $r ** 2));
}
/**
@@ -85,6 +85,6 @@ final class Cone implements D3ShapeInterface
*/
public static function getHeightFromVolume(float $V, float $r) : float
{
- return 3 * $V / (\pi() * $r ** 2);
+ return 3 * $V / (\M_PI * $r ** 2);
}
}
diff --git a/Math/Geometry/Shape/D3/Cylinder.php b/Math/Geometry/Shape/D3/Cylinder.php
index e7e2b0e37..49b8c9656 100644
--- a/Math/Geometry/Shape/D3/Cylinder.php
+++ b/Math/Geometry/Shape/D3/Cylinder.php
@@ -37,7 +37,7 @@ final class Cylinder implements D3ShapeInterface
*/
public static function getVolume(float $r, float $h) : float
{
- return \pi() * $r ** 2 * $h;
+ return \M_PI * $r ** 2 * $h;
}
/**
@@ -52,7 +52,7 @@ final class Cylinder implements D3ShapeInterface
*/
public static function getSurface(float $r, float $h) : float
{
- return 2 * \pi() * ($r * $h + $r ** 2);
+ return 2 * \M_PI * ($r * $h + $r ** 2);
}
/**
@@ -67,6 +67,6 @@ final class Cylinder implements D3ShapeInterface
*/
public static function getLateralSurface(float $r, float $h) : float
{
- return 2 * \pi() * $r * $h;
+ return 2 * \M_PI * $r * $h;
}
}
diff --git a/Math/Geometry/Shape/D3/Sphere.php b/Math/Geometry/Shape/D3/Sphere.php
index 4e79b7f0f..c20032822 100644
--- a/Math/Geometry/Shape/D3/Sphere.php
+++ b/Math/Geometry/Shape/D3/Sphere.php
@@ -116,7 +116,7 @@ final class Sphere implements D3ShapeInterface
*/
public static function getRadiusByVolume(float $v) : float
{
- return \pow($v * 3 / (4 * \pi()), 1 / 3);
+ return \pow($v * 3 / (4 * \M_PI), 1 / 3);
}
/**
@@ -147,7 +147,7 @@ final class Sphere implements D3ShapeInterface
*/
public static function getRadiusBySurface(float $S) : float
{
- return \sqrt($S / (4 * \pi()));
+ return \sqrt($S / (4 * \M_PI));
}
/**
@@ -173,7 +173,7 @@ final class Sphere implements D3ShapeInterface
*/
public static function getVolumeByRadius(float $r) : float
{
- return 4 / 3 * \pi() * $r ** 3;
+ return 4 / 3 * \M_PI * $r ** 3;
}
/**
@@ -211,6 +211,6 @@ final class Sphere implements D3ShapeInterface
*/
public static function getSurfaceByRadius(float $r) : float
{
- return 4 * \pi() * $r ** 2;
+ return 4 * \M_PI * $r ** 2;
}
}
diff --git a/Math/Number/Integer.php b/Math/Number/Integer.php
index 8e86328da..73e57c4fd 100644
--- a/Math/Number/Integer.php
+++ b/Math/Number/Integer.php
@@ -165,7 +165,7 @@ final class Integer
while (!Numbers::isSquare($b2) && $i < $limit) {
++$i;
- $a += 1;
+ ++$a;
$b2 = ($a * $a - $value);
}
diff --git a/Math/Number/Prime.php b/Math/Number/Prime.php
index 66c8be77e..1fb4140c8 100644
--- a/Math/Number/Prime.php
+++ b/Math/Number/Prime.php
@@ -90,7 +90,7 @@ final class Prime
while ($d % 2 == 0) {
$d /= 2;
- $s++;
+ ++$s;
}
for ($i = 0; $i < $k; ++$i) {
diff --git a/Math/Parser/Evaluator.php b/Math/Parser/Evaluator.php
index cbebce0ee..215e82c4f 100644
--- a/Math/Parser/Evaluator.php
+++ b/Math/Parser/Evaluator.php
@@ -37,7 +37,7 @@ class Evaluator
*/
public static function evaluate(string $equation) : ?float
{
- if (\preg_match('#[^0-9\+\-\*\/\(\)\ \^\.]#', $equation)) {
+ if (\substr_count($equation, '(') !== \substr_count($equation, ')') || \preg_match('#[^0-9\+\-\*\/\(\)\ \^\.]#', $equation)) {
return null;
}
@@ -106,7 +106,7 @@ class Evaluator
$output = [];
$equation = \str_replace(' ', '', $equation);
- $equation = \preg_split('/([\+\-\*\/\^\(\)])/', $equation, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
+ $equation = \preg_split('/([\+\-\*\/\^\(\)])/', $equation, -1, \PREG_SPLIT_NO_EMPTY | \PREG_SPLIT_DELIM_CAPTURE);
if ($equation === false) {
return [];
diff --git a/Math/Statistic/Forecast/Regression/MultipleLinearRegression.php b/Math/Statistic/Forecast/Regression/MultipleLinearRegression.php
index 41d4fb529..b89bbf688 100644
--- a/Math/Statistic/Forecast/Regression/MultipleLinearRegression.php
+++ b/Math/Statistic/Forecast/Regression/MultipleLinearRegression.php
@@ -17,9 +17,7 @@ use phpOMS\Math\Matrix\Matrix;
class MultipleLinearRegression
{
- /**
- *
- */
+
public static function getRegression(array $x, array $y) : array
{
$X = new Matrix(\count($x), \count($x[0]));
@@ -32,31 +30,23 @@ class MultipleLinearRegression
return $XT->mult($X)->inverse()->mult($XT)->mult($Y)->getMatrix();
}
- /**
- *
- */
+
public static function getVariance() : float
{
}
- /**
- *
- */
+
public static function getPredictionInterval() : array
{
}
- /**
- *
- */
+
public static function getSlope(float $b1, float $y, float $x) : float
{
return 0.0;
}
- /**
- *
- */
+
public static function getElasticity(float $b1, float $y, float $x): float
{
return 0.0;
diff --git a/Math/Statistic/Forecast/Regression/RegressionAbstract.php b/Math/Statistic/Forecast/Regression/RegressionAbstract.php
index f8bd7bdbb..ff62ca8d5 100644
--- a/Math/Statistic/Forecast/Regression/RegressionAbstract.php
+++ b/Math/Statistic/Forecast/Regression/RegressionAbstract.php
@@ -38,7 +38,7 @@ abstract class RegressionAbstract
*
* @return array [b0 => ?, b1 => ?]
*
- * @throws InvalidDimensionException Throws this exception if the dimension of both arrays is not equal.
+ * @throws InvalidDimensionException throws this exception if the dimension of both arrays is not equal
*
* @since 1.0.0
*/
diff --git a/Math/Stochastic/Distribution/CauchyDistribution.php b/Math/Stochastic/Distribution/CauchyDistribution.php
index 009f2feac..280ed2a5a 100644
--- a/Math/Stochastic/Distribution/CauchyDistribution.php
+++ b/Math/Stochastic/Distribution/CauchyDistribution.php
@@ -37,7 +37,7 @@ class CauchyDistribution
*/
public static function getPdf(float $x, float $x0, float $gamma) : float
{
- return 1 / (\pi() * $gamma * (1 + (($x - $x0) / $gamma) ** 2));
+ return 1 / (\M_PI * $gamma * (1 + (($x - $x0) / $gamma) ** 2));
}
/**
@@ -53,7 +53,7 @@ class CauchyDistribution
*/
public static function getCdf(float $x, float $x0, float $gamma) : float
{
- return 1 / \pi() * \atan(($x - $x0) / $gamma) + 0.5;
+ return 1 / \M_PI * \atan(($x - $x0) / $gamma) + 0.5;
}
/**
@@ -95,6 +95,6 @@ class CauchyDistribution
*/
public static function getEntropy(float $gamma) : float
{
- return \log(4 * M_PI * $gamma);
+ return \log(4 * \M_PI * $gamma);
}
}
diff --git a/Math/Stochastic/Distribution/ChiSquaredDistribution.php b/Math/Stochastic/Distribution/ChiSquaredDistribution.php
index 4e0c223e9..c456ee97f 100644
--- a/Math/Stochastic/Distribution/ChiSquaredDistribution.php
+++ b/Math/Stochastic/Distribution/ChiSquaredDistribution.php
@@ -120,7 +120,7 @@ class ChiSquaredDistribution
'Chi2' => $sum,
'P' => $p,
'H0' => ($p > $significance),
- 'df' => $df
+ 'df' => $df,
];
}
diff --git a/Math/Stochastic/Distribution/NormalDistribution.php b/Math/Stochastic/Distribution/NormalDistribution.php
index 6876aa9ec..d19e64830 100644
--- a/Math/Stochastic/Distribution/NormalDistribution.php
+++ b/Math/Stochastic/Distribution/NormalDistribution.php
@@ -38,7 +38,7 @@ class NormalDistribution
*/
public static function getPdf(float $x, float $mu, float $sig) : float
{
- return 1 / ($sig * \sqrt(2 * \pi())) * \exp(-($x - $mu) ** 2 / (2 * $sig ** 2));
+ return 1 / ($sig * \sqrt(2 * \M_PI)) * \exp(-($x - $mu) ** 2 / (2 * $sig ** 2));
}
/**
@@ -72,9 +72,9 @@ class NormalDistribution
return -self::erf(-$x);
}
- $a = 8 * (\pi() - 3) / (3 * \pi() * (4 - \pi()));
+ $a = 8 * (\M_PI - 3) / (3 * \M_PI * (4 - \M_PI));
- return \sqrt(1 - \exp(-($x ** 2) * (4 / \pi() + $a * $x ** 2) / (1 + $a * $x ** 2)));
+ return \sqrt(1 - \exp(-($x ** 2) * (4 / \M_PI + $a * $x ** 2) / (1 + $a * $x ** 2)));
}
/**
diff --git a/Message/Console/Request.php b/Message/Console/Request.php
index ee324745f..d10555005 100644
--- a/Message/Console/Request.php
+++ b/Message/Console/Request.php
@@ -109,7 +109,7 @@ final class Request extends RequestAbstract
public function getOS() : string
{
if ($this->os === null) {
- $this->os = \strtolower(PHP_OS);
+ $this->os = \strtolower(\PHP_OS);
}
return $this->os;
diff --git a/Message/Console/Response.php b/Message/Console/Response.php
index 84ab7d969..13a568f4f 100644
--- a/Message/Console/Response.php
+++ b/Message/Console/Response.php
@@ -120,7 +120,7 @@ final class Response extends ResponseAbstract implements RenderableInterface
*
* @return string
*
- * @throws \Exception This exception is thrown if the response cannot be rendered.
+ * @throws \Exception this exception is thrown if the response cannot be rendered
*
* @since 1.0.0
*/
@@ -129,7 +129,7 @@ final class Response extends ResponseAbstract implements RenderableInterface
$render = '';
foreach ($this->response as $key => $response) {
- if ($response instanceOf \Serializable) {
+ if ($response instanceof \Serializable) {
$render .= $response->serialize();
} elseif (\is_string($response) || \is_numeric($response)) {
$render .= $response;
diff --git a/Message/Http/Request.php b/Message/Http/Request.php
index 266f2573d..e6d40ae34 100644
--- a/Message/Http/Request.php
+++ b/Message/Http/Request.php
@@ -96,7 +96,7 @@ final class Request extends RequestAbstract
$this->setupUriBuilder();
}
- $this->data = \array_change_key_case($this->data, CASE_LOWER);
+ $this->data = \array_change_key_case($this->data, \CASE_LOWER);
}
/**
@@ -479,7 +479,7 @@ final class Request extends RequestAbstract
{
if ($this->getMethod() === RequestMethod::GET && !empty($this->data)) {
return $this->uri->__toString()
- . (\parse_url($this->uri->__toString(), PHP_URL_QUERY) ? '&' : '?')
+ . (\parse_url($this->uri->__toString(), \PHP_URL_QUERY) ? '&' : '?')
. \http_build_query($this->data);
}
diff --git a/Message/Http/Rest.php b/Message/Http/Rest.php
index 3348b77c0..8adada671 100644
--- a/Message/Http/Rest.php
+++ b/Message/Http/Rest.php
@@ -32,7 +32,7 @@ final class Rest
*
* @return string Returns the request result
*
- * @throws \Exception This exception is thrown if an internal curl_init error occurs.
+ * @throws \Exception this exception is thrown if an internal curl_init error occurs
*
* @since 1.0.0
*/
@@ -44,36 +44,36 @@ final class Rest
throw new \Exception('Internal curl_init error.'); // @codeCoverageIgnore
}
- \curl_setopt($curl, CURLOPT_NOBODY, true);
- \curl_setopt($curl, CURLOPT_HEADER, false);
+ \curl_setopt($curl, \CURLOPT_NOBODY, true);
+ \curl_setopt($curl, \CURLOPT_HEADER, false);
switch ($request->getMethod()) {
case RequestMethod::GET:
- \curl_setopt($curl, CURLOPT_HTTPGET, true);
+ \curl_setopt($curl, \CURLOPT_HTTPGET, true);
break;
case RequestMethod::PUT:
- \curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'PUT');
+ \curl_setopt($curl, \CURLOPT_CUSTOMREQUEST, 'PUT');
break;
case RequestMethod::DELETE:
- \curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'DELETE');
+ \curl_setopt($curl, \CURLOPT_CUSTOMREQUEST, 'DELETE');
break;
}
if ($request->getMethod() !== RequestMethod::GET) {
- \curl_setopt($curl, CURLOPT_POST, 1);
+ \curl_setopt($curl, \CURLOPT_POST, 1);
if ($request->getData() !== null) {
- \curl_setopt($curl, CURLOPT_POSTFIELDS, $request->getData());
+ \curl_setopt($curl, \CURLOPT_POSTFIELDS, $request->getData());
}
}
if ($request->getUri()->getUser() !== '') {
- \curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
- \curl_setopt($curl, CURLOPT_USERPWD, $request->getUri()->getUserInfo());
+ \curl_setopt($curl, \CURLOPT_HTTPAUTH, \CURLAUTH_BASIC);
+ \curl_setopt($curl, \CURLOPT_USERPWD, $request->getUri()->getUserInfo());
}
- \curl_setopt($curl, CURLOPT_URL, $request->__toString());
- \curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
+ \curl_setopt($curl, \CURLOPT_URL, $request->__toString());
+ \curl_setopt($curl, \CURLOPT_RETURNTRANSFER, 1);
$result = \curl_exec($curl);
diff --git a/Message/Mail/EmailAbstract.php b/Message/Mail/EmailAbstract.php
index 499327749..cc0bca615 100644
--- a/Message/Mail/EmailAbstract.php
+++ b/Message/Mail/EmailAbstract.php
@@ -89,10 +89,10 @@ class EmailAbstract
$this->timeout = $timeout;
$this->ssl = $ssl;
- \imap_timeout(IMAP_OPENTIMEOUT, $timeout);
- \imap_timeout(IMAP_READTIMEOUT, $timeout);
- \imap_timeout(IMAP_WRITETIMEOUT, $timeout);
- \imap_timeout(IMAP_CLOSETIMEOUT, $timeout);
+ \imap_timeout(\IMAP_OPENTIMEOUT, $timeout);
+ \imap_timeout(\IMAP_READTIMEOUT, $timeout);
+ \imap_timeout(\IMAP_WRITETIMEOUT, $timeout);
+ \imap_timeout(\IMAP_CLOSETIMEOUT, $timeout);
}
/**
@@ -259,7 +259,7 @@ class EmailAbstract
*/
public function getInboxOverview(string $option = 'ALL') : array
{
- $ids = \imap_search($this->con, $option, SE_FREE, 'UTF-8');
+ $ids = \imap_search($this->con, $option, \SE_FREE, 'UTF-8');
return \is_array($ids) ? \imap_fetch_overview($this->con, \implode(',', $ids)) : [];
}
diff --git a/Model/Message/FormValidation.php b/Model/Message/FormValidation.php
index e2fb7fe73..a3e92d9d1 100644
--- a/Model/Message/FormValidation.php
+++ b/Model/Message/FormValidation.php
@@ -115,7 +115,7 @@ class FormValidation implements \Serializable, ArrayableInterface, \JsonSerializ
{
return [
'type' => self::TYPE,
- 'validation' => $this->validation
+ 'validation' => $this->validation,
];
}
}
diff --git a/Model/Message/Redirect.php b/Model/Message/Redirect.php
index 5f70e6acc..586614988 100644
--- a/Model/Message/Redirect.php
+++ b/Model/Message/Redirect.php
@@ -165,7 +165,7 @@ class Redirect implements \Serializable, ArrayableInterface, \JsonSerializable
'type' => self::TYPE,
'time' => $this->delay,
'uri' => $this->uri,
- 'new' => $this->new
+ 'new' => $this->new,
];
}
}
diff --git a/Model/Message/Reload.php b/Model/Message/Reload.php
index 9381a2932..a46bb6b58 100644
--- a/Model/Message/Reload.php
+++ b/Model/Message/Reload.php
@@ -114,7 +114,7 @@ class Reload implements \Serializable, ArrayableInterface, \JsonSerializable
{
return [
'type' => self::TYPE,
- 'time' => $this->delay
+ 'time' => $this->delay,
];
}
diff --git a/Module/InfoManager.php b/Module/InfoManager.php
index 45dfce351..eff6c91cb 100644
--- a/Module/InfoManager.php
+++ b/Module/InfoManager.php
@@ -75,7 +75,7 @@ final class InfoManager
*
* @return void
*
- * @throws PathException This exception is thrown in case the info file path doesn't exist.
+ * @throws PathException this exception is thrown in case the info file path doesn't exist
*
* @since 1.0.0
*/
@@ -103,7 +103,7 @@ final class InfoManager
throw new PathException($this->path);
}
- \file_put_contents($this->path, \json_encode($this->info, JSON_PRETTY_PRINT));
+ \file_put_contents($this->path, \json_encode($this->info, \JSON_PRETTY_PRINT));
}
/**
diff --git a/Module/InstallerAbstract.php b/Module/InstallerAbstract.php
index 90bf655bc..38696292a 100644
--- a/Module/InstallerAbstract.php
+++ b/Module/InstallerAbstract.php
@@ -218,7 +218,7 @@ abstract class InstallerAbstract
$appRoutes = \array_merge_recursive($appRoutes, $moduleRoutes);
- \file_put_contents($destRoutePath, 'all)) {
\chdir($this->modulePath);
- $files = \glob('*', GLOB_ONLYDIR);
+ $files = \glob('*', \GLOB_ONLYDIR);
$c = \count($files);
for ($i = 0; $i < $c; ++$i) {
diff --git a/Module/PackageManager.php b/Module/PackageManager.php
index 95af606ac..0f336082c 100644
--- a/Module/PackageManager.php
+++ b/Module/PackageManager.php
@@ -109,7 +109,7 @@ final class PackageManager
*
* @return void
*
- * @throws PathException This exception is thrown in case the info file path doesn't exist.
+ * @throws PathException this exception is thrown in case the info file path doesn't exist
*
* @since 1.0.0
*/
diff --git a/Router/Router.php b/Router/Router.php
index e29bdec9c..933ea8503 100644
--- a/Router/Router.php
+++ b/Router/Router.php
@@ -14,8 +14,8 @@ declare(strict_types=1);
namespace phpOMS\Router;
-use phpOMS\Message\RequestAbstract;
use phpOMS\Message\Http\Request;
+use phpOMS\Message\RequestAbstract;
use phpOMS\Uri\Http;
/**
diff --git a/Socket/Client/Client.php b/Socket/Client/Client.php
index 1b2661a42..87231e600 100644
--- a/Socket/Client/Client.php
+++ b/Socket/Client/Client.php
@@ -74,7 +74,7 @@ class Client extends SocketAbstract
while ($this->run) {
try {
- $i++;
+ ++$i;
$msg = 'disconnect';
\socket_write($this->sock, $msg, \strlen($msg));
diff --git a/Socket/CommandManager.php b/Socket/CommandManager.php
index 5e73ac1de..b445753ed 100644
--- a/Socket/CommandManager.php
+++ b/Socket/CommandManager.php
@@ -64,7 +64,7 @@ class CommandManager implements \Countable
public function attach(string $cmd, $callback, $source) : void
{
$this->commands[$cmd] = [$callback, $source];
- $this->count++;
+ ++$this->count;
}
/**
@@ -81,7 +81,7 @@ class CommandManager implements \Countable
{
if (\array_key_exists($cmd, $this->commands)) {
unset($this->commands[$cmd]);
- $this->count--;
+ --$this->count;
}
}
diff --git a/Socket/Server/Server.php b/Socket/Server/Server.php
index 5afa49a40..af2869d1b 100644
--- a/Socket/Server/Server.php
+++ b/Socket/Server/Server.php
@@ -159,7 +159,7 @@ class Server extends SocketAbstract
$upgrade = "HTTP/1.1 101 Switching Protocols\r\n" .
"Upgrade: websocket\r\n" .
"Connection: Upgrade\r\n" .
- "Sec-WebSocket-Accept: $acceptKey" .
+ "Sec-WebSocket-Accept: ${acceptKey}" .
"\r\n\r\n";
\socket_write($client->getSocket(), $upgrade);
$client->setHandshake(true);
diff --git a/Socket/SocketAbstract.php b/Socket/SocketAbstract.php
index 9249e505b..a70e8a6d0 100644
--- a/Socket/SocketAbstract.php
+++ b/Socket/SocketAbstract.php
@@ -66,7 +66,7 @@ abstract class SocketAbstract implements SocketInterface
$this->port = $port;
// todo: if local network connect use AF_UNIX
- $this->sock = \socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
+ $this->sock = \socket_create(\AF_INET, \SOCK_STREAM, \SOL_TCP);
}
/**
diff --git a/Stdlib/Base/Enum.php b/Stdlib/Base/Enum.php
index 1766eb355..db7396048 100644
--- a/Stdlib/Base/Enum.php
+++ b/Stdlib/Base/Enum.php
@@ -81,7 +81,7 @@ abstract class Enum
*
* @return mixed
*
- * @throws \UnexpectedValueException Throws this exception if the constant is not defined in the enum class.
+ * @throws \UnexpectedValueException throws this exception if the constant is not defined in the enum class
*
* @since 1.0.0
*/
diff --git a/Stdlib/Base/SmartDateTime.php b/Stdlib/Base/SmartDateTime.php
index 94d7046b4..3f5b4a53a 100644
--- a/Stdlib/Base/SmartDateTime.php
+++ b/Stdlib/Base/SmartDateTime.php
@@ -70,7 +70,7 @@ class SmartDateTime extends \DateTime
*
* @since 1.0.0
*/
- public function createModify(int $y, int $m = 0, int $d = 0, int $calendar = CAL_GREGORIAN) : self
+ public function createModify(int $y, int $m = 0, int $d = 0, int $calendar = \CAL_GREGORIAN) : self
{
$dt = clone $this;
$dt->smartModify($y, $m, $d, $calendar);
@@ -90,7 +90,7 @@ class SmartDateTime extends \DateTime
*
* @since 1.0.0
*/
- public function smartModify(int $y, int $m = 0, int $d = 0, int $calendar = CAL_GREGORIAN) : self
+ public function smartModify(int $y, int $m = 0, int $d = 0, int $calendar = \CAL_GREGORIAN) : self
{
$yearChange = (int) \floor(((int) $this->format('m') - 1 + $m) / 12);
$yearChange = ((int) $this->format('m') - 1 + $m) < 0 && ((int) $this->format('m') - 1 + $m) % 12 === 0 ? $yearChange - 1 : $yearChange;
diff --git a/System/File/FileUtils.php b/System/File/FileUtils.php
index 298c847d9..d3b2d058e 100644
--- a/System/File/FileUtils.php
+++ b/System/File/FileUtils.php
@@ -161,7 +161,7 @@ final class FileUtils
} elseif ($permission[$i] === 'w') {
$tempPermission += 2;
} elseif ($permission[$i] === 'x') {
- $tempPermission += 1;
+ ++$tempPermission;
}
if (($i + 1) % 3 === 0) {
diff --git a/System/File/Ftp/Directory.php b/System/File/Ftp/Directory.php
index e94e84e59..dc91d6be1 100644
--- a/System/File/Ftp/Directory.php
+++ b/System/File/Ftp/Directory.php
@@ -18,7 +18,6 @@ use phpOMS\System\File\ContainerInterface;
use phpOMS\System\File\DirectoryInterface;
use phpOMS\System\File\FileUtils;
use phpOMS\System\File\Local\Directory as LocalDirectory;
-use phpOMS\System\File\Local\File as LocalFile;
use phpOMS\System\File\PathException;
use phpOMS\Uri\Http;
@@ -362,9 +361,9 @@ class Directory extends FileAbstract implements FtpContainerInterface, Directory
/**
* Download file.
*
- * @param resource $con FTP connection
- * @param string $from Path of the resource to copy
- * @param string $to Path of the resource to copy to
+ * @param resource $con FTP connection
+ * @param string $from Path of the resource to copy
+ * @param string $to Path of the resource to copy to
*
* @return bool True on success and false on failure
*
@@ -395,9 +394,9 @@ class Directory extends FileAbstract implements FtpContainerInterface, Directory
/**
* Upload file.
*
- * @param resource $con FTP connection
- * @param string $from Path of the resource to copy
- * @param string $to Path of the resource to copy to
+ * @param resource $con FTP connection
+ * @param string $from Path of the resource to copy
+ * @param string $to Path of the resource to copy to
*
* @return bool True on success and false on failure
*
@@ -638,7 +637,7 @@ class Directory extends FileAbstract implements FtpContainerInterface, Directory
* @param mixed $offset
* The offset to retrieve.
*
- * @return mixed Can return all value types.
+ * @return mixed can return all value types
* @since 5.0.0
*/
public function offsetGet($offset)
diff --git a/System/File/Ftp/File.php b/System/File/Ftp/File.php
index 4d95b6b8c..fa296b3b2 100644
--- a/System/File/Ftp/File.php
+++ b/System/File/Ftp/File.php
@@ -135,7 +135,7 @@ class File extends FileAbstract implements FileInterface
\file_put_contents($tmpFile, $content);
}
- \ftp_put($con, $path, $tmpFile, FTP_BINARY);
+ \ftp_put($con, $path, $tmpFile, \FTP_BINARY);
\ftp_chmod($con, 0755, $path);
\unlink($tmpFile);
@@ -157,7 +157,7 @@ class File extends FileAbstract implements FileInterface
$temp = \fopen('php://temp', 'r+');
$content = '';
- if (\ftp_fget($con, $temp, $path, FTP_BINARY, 0)) {
+ if (\ftp_fget($con, $temp, $path, \FTP_BINARY, 0)) {
\rewind($temp);
$content = \stream_get_contents($temp);
}
@@ -276,9 +276,9 @@ class File extends FileAbstract implements FileInterface
/**
* Gets the directory name of a file.
*
- * @param string $path Path of the file to get the directory name for.
+ * @param string $path path of the file to get the directory name for
*
- * @return string Returns the directory name of the file.
+ * @return string returns the directory name of the file
*
* @since 1.0.0
*/
@@ -290,9 +290,9 @@ class File extends FileAbstract implements FileInterface
/**
* Gets the directory path of a file.
*
- * @param string $path Path of the file to get the directory name for.
+ * @param string $path path of the file to get the directory name for
*
- * @return string Returns the directory name of the file.
+ * @return string returns the directory name of the file
*
* @since 1.0.0
*/
diff --git a/System/File/Ftp/FtpContainerInterface.php b/System/File/Ftp/FtpContainerInterface.php
index d481df58d..4bd7ccdca 100644
--- a/System/File/Ftp/FtpContainerInterface.php
+++ b/System/File/Ftp/FtpContainerInterface.php
@@ -143,7 +143,7 @@ interface FtpContainerInterface
/**
* Check existence of resource.
*
- * @param resource $con FTP connection
+ * @param resource $con FTP connection
* @param string $path Path of the resource
*
* @return bool
diff --git a/System/File/Local/Directory.php b/System/File/Local/Directory.php
index bd9b882cc..6e534a0f4 100644
--- a/System/File/Local/Directory.php
+++ b/System/File/Local/Directory.php
@@ -136,7 +136,7 @@ final class Directory extends FileAbstract implements LocalContainerInterface, D
{
parent::index();
- foreach (\glob($this->path . DIRECTORY_SEPARATOR . $this->filter) as $filename) {
+ foreach (\glob($this->path . \DIRECTORY_SEPARATOR . $this->filter) as $filename) {
if (!StringUtils::endsWith(\trim($filename), '.')) {
$file = \is_dir($filename) ? new self($filename) : new File($filename);
diff --git a/System/File/Local/File.php b/System/File/Local/File.php
index 82da5107e..478ff1566 100644
--- a/System/File/Local/File.php
+++ b/System/File/Local/File.php
@@ -284,9 +284,9 @@ final class File extends FileAbstract implements LocalContainerInterface, FileIn
/**
* Gets the directory name of a file.
*
- * @param string $path Path of the file to get the directory name for.
+ * @param string $path path of the file to get the directory name for
*
- * @return string Returns the directory name of the file.
+ * @return string returns the directory name of the file
*
* @since 1.0.0
*/
@@ -298,9 +298,9 @@ final class File extends FileAbstract implements LocalContainerInterface, FileIn
/**
* Gets the directory path of a file.
*
- * @param string $path Path of the file to get the directory name for.
+ * @param string $path path of the file to get the directory name for
*
- * @return string Returns the directory name of the file.
+ * @return string returns the directory name of the file
*
* @since 1.0.0
*/
@@ -366,7 +366,7 @@ final class File extends FileAbstract implements LocalContainerInterface, FileIn
/**
* Gets the directory name of a file.
*
- * @return string Returns the directory name of the file.
+ * @return string returns the directory name of the file
*
* @since 1.0.0
*/
@@ -378,7 +378,7 @@ final class File extends FileAbstract implements LocalContainerInterface, FileIn
/**
* Gets the directory path of a file.
*
- * @return string Returns the directory path of the file.
+ * @return string returns the directory path of the file
*
* @since 1.0.0
*/
diff --git a/System/File/StorageAbstract.php b/System/File/StorageAbstract.php
index be3946b0f..8c4ca3672 100644
--- a/System/File/StorageAbstract.php
+++ b/System/File/StorageAbstract.php
@@ -37,7 +37,7 @@ abstract class StorageAbstract
/**
* Get instance.
*
- * @return StorageAbstract Storage instance.
+ * @return StorageAbstract storage instance
*
* @since 1.0.0
*/
@@ -57,7 +57,7 @@ abstract class StorageAbstract
/**
* Get storage type.
*
- * @return int Storage type.
+ * @return int storage type
*
* @since 1.0.0
*/
diff --git a/System/OperatingSystem.php b/System/OperatingSystem.php
index ab0d71b14..10528647d 100644
--- a/System/OperatingSystem.php
+++ b/System/OperatingSystem.php
@@ -43,11 +43,11 @@ final class OperatingSystem
*/
public static function getSystem() : int
{
- if (\stristr(PHP_OS, 'DAR') !== false) {
+ if (\stristr(\PHP_OS, 'DAR') !== false) {
return SystemType::OSX;
- } elseif (\stristr(PHP_OS, 'WIN') !== false) {
+ } elseif (\stristr(\PHP_OS, 'WIN') !== false) {
return SystemType::WIN;
- } elseif (\stristr(PHP_OS, 'LINUX') !== false) {
+ } elseif (\stristr(\PHP_OS, 'LINUX') !== false) {
return SystemType::LINUX;
}
diff --git a/System/SystemUtils.php b/System/SystemUtils.php
index 486a7f801..dc9b42114 100644
--- a/System/SystemUtils.php
+++ b/System/SystemUtils.php
@@ -46,12 +46,12 @@ final class SystemUtils
{
$mem = 0;
- if (\stristr(PHP_OS, 'WIN')) {
+ if (\stristr(\PHP_OS, 'WIN')) {
$memArr = [];
\exec('wmic memorychip get capacity', $memArr);
$mem = \array_sum($memArr) / 1024;
- } elseif (\stristr(PHP_OS, 'LINUX')) {
+ } elseif (\stristr(\PHP_OS, 'LINUX')) {
$fh = \fopen('/proc/meminfo', 'r');
if ($fh === false) {
@@ -83,7 +83,7 @@ final class SystemUtils
{
$memUsage = 0;
- if (\stristr(PHP_OS, 'LINUX')) {
+ if (\stristr(\PHP_OS, 'LINUX')) {
$free = \shell_exec('free');
if ($free === null) {
@@ -111,11 +111,11 @@ final class SystemUtils
{
$cpuUsage = 0;
- if (\stristr(PHP_OS, 'WIN') !== false) {
+ if (\stristr(\PHP_OS, 'WIN') !== false) {
$cpuUsage = null;
\exec('wmic cpu get LoadPercentage', $cpuUsage);
$cpuUsage = $cpuUsage[1];
- } elseif (\stristr(PHP_OS, 'LINUX') !== false) {
+ } elseif (\stristr(\PHP_OS, 'LINUX') !== false) {
$cpuUsage = \sys_getloadavg()[0] * 100;
}
diff --git a/Uri/Http.php b/Uri/Http.php
index 041e28300..40655c837 100644
--- a/Uri/Http.php
+++ b/Uri/Http.php
@@ -191,7 +191,7 @@ final class Http implements UriInterface
\parse_str($this->queryString, $this->query);
}
- $this->query = \array_change_key_case($this->query, CASE_LOWER);
+ $this->query = \array_change_key_case($this->query, \CASE_LOWER);
$this->fragment = $url['fragment'] ?? '';
$this->base = $this->scheme . '://' . $this->host . ($this->port !== 80 ? ':' . $this->port : '') . $this->rootPath;
@@ -230,7 +230,7 @@ final class Http implements UriInterface
*/
public static function isValid(string $uri) : bool
{
- return (bool) \filter_var($uri, FILTER_VALIDATE_URL);
+ return (bool) \filter_var($uri, \FILTER_VALIDATE_URL);
}
/**
diff --git a/Utils/Barcode/C128Abstract.php b/Utils/Barcode/C128Abstract.php
index 6a3ba69fc..557c1e7fb 100644
--- a/Utils/Barcode/C128Abstract.php
+++ b/Utils/Barcode/C128Abstract.php
@@ -307,7 +307,7 @@ abstract class C128Abstract
$checksum += $values[$activeKey] * $pos;
}
- $codeString .= static::$CODEARRAY[$keys[($checksum - (\intval($checksum / 103) * 103))]];
+ $codeString .= static::$CODEARRAY[$keys[($checksum - ((int) ($checksum / 103) * 103))]];
return $codeString;
}
diff --git a/Utils/Barcode/C128c.php b/Utils/Barcode/C128c.php
index c9e17b0f6..0e02ed69d 100644
--- a/Utils/Barcode/C128c.php
+++ b/Utils/Barcode/C128c.php
@@ -100,10 +100,10 @@ class C128c extends C128Abstract
$codeString .= self::$CODEARRAY[$activeKey];
$checksum += $values[$activeKey] * $checkPos;
- $checkPos++;
+ ++$checkPos;
}
- $codeString .= self::$CODEARRAY[$keys[($checksum - (\intval($checksum / 103) * 103))]];
+ $codeString .= self::$CODEARRAY[$keys[($checksum - ((int) ($checksum / 103) * 103))]];
return $codeString;
}
diff --git a/Utils/Barcode/C25.php b/Utils/Barcode/C25.php
index af26d0b71..f8bda074b 100644
--- a/Utils/Barcode/C25.php
+++ b/Utils/Barcode/C25.php
@@ -69,7 +69,7 @@ class C25 extends C128Abstract
*
* @return void
*
- * @throws \InvalidArgumentException This exception is thrown if the content string is not supported.
+ * @throws \InvalidArgumentException this exception is thrown if the content string is not supported
*
* @since 1.0.0
*/
diff --git a/Utils/Compression/LZW.php b/Utils/Compression/LZW.php
index 176ca4446..922c65616 100644
--- a/Utils/Compression/LZW.php
+++ b/Utils/Compression/LZW.php
@@ -35,7 +35,7 @@ class LZW implements CompressionInterface
$result = [];
$dictSize = 256;
- for ($i = 0; $i < 256; $i += 1) {
+ for ($i = 0; $i < 256; ++$i) {
$dictionary[\chr($i)] = $i;
}
diff --git a/Utils/Converter/Numeric.php b/Utils/Converter/Numeric.php
index 442915124..6b9c34195 100644
--- a/Utils/Converter/Numeric.php
+++ b/Utils/Converter/Numeric.php
@@ -34,7 +34,7 @@ class Numeric
public const ROMANS = [
'M' => 1000, 'CM' => 900, 'D' => 500, 'CD' => 400, 'C' => 100,
'XC' => 90, 'L' => 50, 'XL' => 40, 'X' => 10,
- 'IX' => 9, 'V' => 5, 'IV' => 4, 'I' => 1
+ 'IX' => 9, 'V' => 5, 'IV' => 4, 'I' => 1,
];
/**
diff --git a/Utils/Git/Repository.php b/Utils/Git/Repository.php
index c6e2f4aef..2fcd67008 100644
--- a/Utils/Git/Repository.php
+++ b/Utils/Git/Repository.php
@@ -168,7 +168,7 @@ class Repository
*/
private function run(string $cmd) : array
{
- if (\strtolower((string) \substr(PHP_OS, 0, 3)) == 'win') {
+ if (\strtolower((string) \substr(\PHP_OS, 0, 3)) == 'win') {
$cmd = 'cd ' . \escapeshellarg(\dirname(Git::getBin()))
. ' && ' . \basename(Git::getBin())
. ' -C ' . \escapeshellarg($this->path) . ' '
@@ -672,7 +672,7 @@ class Repository
while (!\feof($fh)) {
\fgets($fh);
- $loc++;
+ ++$loc;
}
\fclose($fh);
diff --git a/Utils/IO/Csv/CsvSettings.php b/Utils/IO/Csv/CsvSettings.php
index 341c9abd0..1e170b7d9 100644
--- a/Utils/IO/Csv/CsvSettings.php
+++ b/Utils/IO/Csv/CsvSettings.php
@@ -56,7 +56,7 @@ class CsvSettings
if (\count($fields) > 1) {
if (!empty($results[$delimiter])) {
- $results[$delimiter]++;
+ ++$results[$delimiter];
} else {
$results[$delimiter] = 1;
}
diff --git a/Utils/Parser/Markdown/Markdown.php b/Utils/Parser/Markdown/Markdown.php
index 2c42a1e33..b8b77611e 100644
--- a/Utils/Parser/Markdown/Markdown.php
+++ b/Utils/Parser/Markdown/Markdown.php
@@ -183,7 +183,7 @@ class Markdown
* @since 1.0.0
*/
private static $continuable = [
- 'Code', 'FencedCode', 'List', 'Quote', 'Table'
+ 'Code', 'FencedCode', 'List', 'Quote', 'Table',
];
/**
@@ -193,7 +193,7 @@ class Markdown
* @since 1.0.0
*/
private static $completable = [
- 'Code', 'FencedCode'
+ 'Code', 'FencedCode',
];
/**
@@ -253,7 +253,7 @@ class Markdown
$currentBlock = null;
foreach ($lines as $line) {
- if (\chop($line) === '') {
+ if (\rtrim($line) === '') {
if (isset($currentBlock)) {
$currentBlock['interrupted'] = true;
}
@@ -277,7 +277,7 @@ class Markdown
$indent = 0;
while (isset($line[$indent]) && $line[$indent] === ' ') {
- $indent ++;
+ ++$indent;
}
$text = $indent > 0 ? \substr($line, $indent) : $line;
@@ -463,7 +463,7 @@ class Markdown
'name' => 'pre',
'handler' => 'element',
'text' => $elementArray,
- ]
+ ],
];
}
@@ -532,7 +532,7 @@ class Markdown
$level = 1;
while (isset($lineArray['text'][$level]) && $lineArray['text'][$level] === '#') {
- $level ++;
+ ++$level;
}
if ($level > 6) {
@@ -725,7 +725,7 @@ class Markdown
return [
'element' => [
- 'name' => 'hr'
+ 'name' => 'hr',
],
];
}
@@ -746,7 +746,7 @@ class Markdown
return null;
}
- if (\chop($lineArray['text'], $lineArray['text'][0]) !== '') {
+ if (\rtrim($lineArray['text'], $lineArray['text'][0]) !== '') {
return null;
}
@@ -796,7 +796,7 @@ class Markdown
return null;
}
- if (\strpos($block['element']['text'], '|') !== false && \chop($lineArray['text'], ' -:|') === '') {
+ if (\strpos($block['element']['text'], '|') !== false && \rtrim($lineArray['text'], ' -:|') === '') {
$alignments = [];
$divider = $lineArray['text'];
$divider = \trim($divider);
@@ -1293,7 +1293,7 @@ class Markdown
return null;
}
- if (!\preg_match('/\bhttps?:[\/]{2}[^\s<]+\b\/*/ui', $excerpt['context'], $matches, PREG_OFFSET_CAPTURE)) {
+ if (!\preg_match('/\bhttps?:[\/]{2}[^\s<]+\b\/*/ui', $excerpt['context'], $matches, \PREG_OFFSET_CAPTURE)) {
return null;
}
@@ -1503,7 +1503,7 @@ class Markdown
*/
protected static function escape(string $text, bool $allowQuotes = false) : string
{
- return \htmlspecialchars($text, $allowQuotes ? ENT_NOQUOTES : ENT_QUOTES, 'UTF-8');
+ return \htmlspecialchars($text, $allowQuotes ? \ENT_NOQUOTES : \ENT_QUOTES, 'UTF-8');
}
/**
diff --git a/Utils/RnG/File.php b/Utils/RnG/File.php
index 7ad7d24f6..990cd3394 100644
--- a/Utils/RnG/File.php
+++ b/Utils/RnG/File.php
@@ -60,8 +60,8 @@ class File
$source = self::$extensions;
}
- $key = \rand(0, \count($source) - 1);
+ $key = \mt_rand(0, \count($source) - 1);
- return $source[$key][\rand(0, \count($source[$key]) - 1)];
+ return $source[$key][\mt_rand(0, \count($source[$key]) - 1)];
}
}
diff --git a/Utils/RnG/Name.php b/Utils/RnG/Name.php
index 77290a825..fd6ceb3a6 100644
--- a/Utils/RnG/Name.php
+++ b/Utils/RnG/Name.php
@@ -478,7 +478,7 @@ class Name
'Yıldırım', 'Öztürk', 'Aydın', 'Özdemir', 'Arslan', 'Doğan', 'Kılıç', 'Aslan', 'Çetin', 'Kara',
'Koç', 'Kurt', 'Özkan', 'Şimşek',
],
- ]
+ ],
];
/**
diff --git a/Utils/RnG/Phone.php b/Utils/RnG/Phone.php
index 04dd0739c..27800bfbb 100644
--- a/Utils/RnG/Phone.php
+++ b/Utils/RnG/Phone.php
@@ -53,7 +53,7 @@ class Phone
$numberString = \str_replace(
'$1',
- $countries[\array_keys($countries)[\rand(0, \count($countries) - 1)]],
+ $countries[\array_keys($countries)[\mt_rand(0, \count($countries) - 1)]],
$numberString
);
}
diff --git a/Utils/RnG/Text.php b/Utils/RnG/Text.php
index c02491ff6..89585d1dd 100644
--- a/Utils/RnG/Text.php
+++ b/Utils/RnG/Text.php
@@ -91,7 +91,7 @@ class Text
/**
* Set if the text should have formatting.
*
- * @param bool $hasFormatting Text has formatting.
+ * @param bool $hasFormatting text has formatting
*
* @return void
*
@@ -187,11 +187,11 @@ class Text
if ($newSentence) {
$word = \ucfirst($word);
- $sentenceCount++;
+ ++$sentenceCount;
/** @noinspection PhpUndefinedVariableInspection */
if ($this->hasParagraphs) {
- $paid++;
+ ++$paid;
$text .= '';
}
@@ -206,7 +206,7 @@ class Text
if ($punctuation[$puid][0] === $i) {
$text .= $punctuation[$puid][1];
- $puid++;
+ ++$puid;
}
}
diff --git a/Utils/StringCompare.php b/Utils/StringCompare.php
index 3bc550542..535495612 100644
--- a/Utils/StringCompare.php
+++ b/Utils/StringCompare.php
@@ -71,7 +71,7 @@ final class StringCompare
*/
public function matchDictionary(string $match) : string
{
- $bestScore = PHP_INT_MAX;
+ $bestScore = \PHP_INT_MAX;
$bestMatch = '';
foreach ($this->dictionary as $word) {
@@ -103,7 +103,7 @@ final class StringCompare
$total = 0;
if ($words1 === false || $words2 === false) {
- return PHP_INT_MAX;
+ return \PHP_INT_MAX;
}
foreach ($words1 as $word1) {
diff --git a/Utils/StringUtils.php b/Utils/StringUtils.php
index 020ef66cd..f50c16b72 100644
--- a/Utils/StringUtils.php
+++ b/Utils/StringUtils.php
@@ -53,7 +53,7 @@ final class StringUtils
*
* @example StringUtils::contains('This string', ['This', 'test']); // true
*
- * @return bool The function returns true if any of the needles is part of the haystack, false otherwise.
+ * @return bool the function returns true if any of the needles is part of the haystack, false otherwise
*
* @since 1.0.0
*/
@@ -78,7 +78,7 @@ final class StringUtils
*
* @example StringUtils::mb_contains('This string', ['This', 'test']); // true
*
- * @return bool The function returns true if any of the needles is part of the haystack, false otherwise.
+ * @return bool the function returns true if any of the needles is part of the haystack, false otherwise
*
* @since 1.0.0
*/
@@ -100,11 +100,11 @@ final class StringUtils
* In case of an array the function will test if any of the needles is at the end of the haystack string.
*
* @param string $haystack Haystack
- * @param array|string $needles Needles to check if they are at the end of the haystack.
+ * @param array|string $needles needles to check if they are at the end of the haystack
*
* @example StringUtils::endsWith('Test string', ['test1', 'string']); // true
*
- * @return bool The function returns true if any of the needles is at the end of the haystack, false otherwise.
+ * @return bool the function returns true if any of the needles is at the end of the haystack, false otherwise
*
* @since 1.0.0
*/
@@ -130,13 +130,13 @@ final class StringUtils
* In case of an array the function will test if any of the needles is at the beginning of the haystack string.
*
* @param string $haystack Haystack
- * @param array|string $needles Needles to check if they are at the beginning of the haystack.
+ * @param array|string $needles needles to check if they are at the beginning of the haystack
*
* @example StringUtils::startsWith('Test string', ['Test', 'something']); // true
* @example StringUtils::startsWith('Test string', 'string'); // false
* @example StringUtils::startsWith('Test string', 'Test'); // true
*
- * @return bool The function returns true if any of the needles is at the beginning of the haystack, false otherwise.
+ * @return bool the function returns true if any of the needles is at the beginning of the haystack, false otherwise
*
* @since 1.0.0
*/
@@ -162,9 +162,9 @@ final class StringUtils
* In case of an array the function will test if any of the needles is at the beginning of the haystack string.
*
* @param string $haystack Haystack
- * @param array|string $needles Needles to check if they are at the beginning of the haystack.
+ * @param array|string $needles needles to check if they are at the beginning of the haystack
*
- * @return bool The function returns true if any of the needles is at the beginning of the haystack, false otherwise.
+ * @return bool the function returns true if any of the needles is at the beginning of the haystack, false otherwise
*
* @since 1.0.0
*/
@@ -190,13 +190,13 @@ final class StringUtils
* In case of an array the function will test if any of the needles is at the end of the haystack string.
*
* @param string $haystack Haystack
- * @param array|string $needles Needles to check if they are at the end of the haystack.
+ * @param array|string $needles needles to check if they are at the end of the haystack
*
* @example StringUtils::endsWith('Test string', ['test1', 'string']); // true
* @example StringUtils::endsWith('Test string', 'string'); // true
* @example StringUtils::endsWith('Test string', String); // false
*
- * @return bool The function returns true if any of the needles is at the end of the haystack, false otherwise.
+ * @return bool the function returns true if any of the needles is at the end of the haystack, false otherwise
*
* @since 1.0.0
*/
@@ -218,9 +218,9 @@ final class StringUtils
/**
* Makes first letter of a multi byte string upper case.
*
- * @param string $string String to upper case first letter.
+ * @param string $string string to upper case first letter
*
- * @return string Multi byte string with first character as upper case.
+ * @return string multi byte string with first character as upper case
*
* @since 1.0.0
*/
@@ -236,9 +236,9 @@ final class StringUtils
/**
* Makes first letter of a multi byte string lower case.
*
- * @param string $string String to lower case first letter.
+ * @param string $string string to lower case first letter
*
- * @return string Multi byte string with first character as lower case.
+ * @return string multi byte string with first character as lower case
*
* @since 1.0.0
*/
@@ -254,10 +254,10 @@ final class StringUtils
/**
* Trim multi byte characters from a multi byte string.
*
- * @param string $string Multi byte string to trim multi byte characters from.
+ * @param string $string multi byte string to trim multi byte characters from
* @param string $charlist Multi byte character list used for trimming
*
- * @return string Trimmed multi byte string.
+ * @return string trimmed multi byte string
*
* @since 1.0.0
*/
@@ -275,10 +275,10 @@ final class StringUtils
/**
* Trim multi byte characters from the right of a multi byte string.
*
- * @param string $string Multi byte string to trim multi byte characters from.
+ * @param string $string multi byte string to trim multi byte characters from
* @param string $charlist Multi byte character list used for trimming
*
- * @return string Trimmed multi byte string.
+ * @return string trimmed multi byte string
*
* @since 1.0.0
*/
@@ -296,10 +296,10 @@ final class StringUtils
/**
* Trim multi byte characters from the left of a multi byte string.
*
- * @param string $string Multi byte string to trim multi byte characters from.
+ * @param string $string multi byte string to trim multi byte characters from
* @param string $charlist Multi byte character list used for trimming
*
- * @return string Trimmed multi byte string.
+ * @return string trimmed multi byte string
*
* @since 1.0.0
*/
@@ -317,13 +317,13 @@ final class StringUtils
/**
* Count occurences of character at the beginning of a string.
*
- * @param string $string String to analyze.
- * @param string $character Character to count at the beginning of the string.
+ * @param string $string string to analyze
+ * @param string $character character to count at the beginning of the string
*
* @example StringUtils::countCharacterFromStart(' Test string', ' '); // 4
* @example StringUtils::countCharacterFromStart(' Test string', 's'); // 0
*
- * @return int The amount of repeating occurences at the beginning of the string.
+ * @return int the amount of repeating occurences at the beginning of the string
*
* @since 1.0.0
*/
@@ -346,7 +346,7 @@ final class StringUtils
/**
* Calculate string entropy
*
- * @param string $value String to analyze.
+ * @param string $value string to analyze
*
* @return float
*
@@ -369,7 +369,7 @@ final class StringUtils
/**
* Count chars of utf-8 string.
*
- * @param string $input String to count chars.
+ * @param string $input string to count chars
*
* @return array
*
@@ -387,7 +387,7 @@ final class StringUtils
$unique[$char] = 0;
}
- $unique[$char]++;
+ ++$unique[$char];
}
return $unique;
@@ -396,7 +396,7 @@ final class StringUtils
/**
* Turn value into string
*
- * @param mixed $element Value to stringify.
+ * @param mixed $element value to stringify
* @param mixed $option Stringify option
*
* @return null|string
diff --git a/Utils/TaskSchedule/Cron.php b/Utils/TaskSchedule/Cron.php
index 303df1d09..6291bf79f 100644
--- a/Utils/TaskSchedule/Cron.php
+++ b/Utils/TaskSchedule/Cron.php
@@ -31,7 +31,7 @@ class Cron extends SchedulerAbstract
public function create(TaskAbstract $task) : void
{
$this->run('-l > ' . __DIR__ . '/tmpcron.tmp');
- \file_put_contents(__DIR__ . '/tmpcron.tmp', $task->__toString() . "\n", FILE_APPEND);
+ \file_put_contents(__DIR__ . '/tmpcron.tmp', $task->__toString() . "\n", \FILE_APPEND);
$this->run(__DIR__ . '/tmpcron.tmp');
\unlink(__DIR__ . '/tmpcron.tmp');
}
diff --git a/Validation/Finance/CreditCard.php b/Validation/Finance/CreditCard.php
index 2b90125d5..bb5d2a2cb 100644
--- a/Validation/Finance/CreditCard.php
+++ b/Validation/Finance/CreditCard.php
@@ -65,9 +65,9 @@ final class CreditCard extends ValidatorAbstract
/**
* Luhn algorithm or mod 10 algorithm is used to verify credit cards.
*
- * @param string $num Credit card number.
+ * @param string $num credit card number
*
- * @return bool Returns true if the number is a valid credit card and false if it isn't.
+ * @return bool returns true if the number is a valid credit card and false if it isn't
*
* @since 1.0.0
*/
diff --git a/Validation/Finance/Iban.php b/Validation/Finance/Iban.php
index f18fc508d..a838c5758 100644
--- a/Validation/Finance/Iban.php
+++ b/Validation/Finance/Iban.php
@@ -97,7 +97,7 @@ final class Iban extends ValidatorAbstract
return false;
}
- $lastPos += 1;
+ ++$lastPos;
}
return true;
@@ -125,7 +125,7 @@ final class Iban extends ValidatorAbstract
return false;
}
- $lastPos += 1;
+ ++$lastPos;
}
return true;
diff --git a/Validation/Network/Email.php b/Validation/Network/Email.php
index 9cfdf0b8b..44e282146 100644
--- a/Validation/Network/Email.php
+++ b/Validation/Network/Email.php
@@ -42,7 +42,7 @@ abstract class Email extends ValidatorAbstract
*/
public static function isValid($value, array $constraints = null) : bool
{
- if (\filter_var($value, FILTER_VALIDATE_EMAIL) === false) {
+ if (\filter_var($value, \FILTER_VALIDATE_EMAIL) === false) {
self::$msg = 'Invalid Email by filter_var standards';
self::$error = 1;
diff --git a/Validation/Network/Hostname.php b/Validation/Network/Hostname.php
index 3ad9a09fb..9876f6aaf 100644
--- a/Validation/Network/Hostname.php
+++ b/Validation/Network/Hostname.php
@@ -42,6 +42,6 @@ abstract class Hostname extends ValidatorAbstract
*/
public static function isValid($value, array $constraints = null) : bool
{
- return \filter_var(\gethostbyname($value), FILTER_VALIDATE_IP) !== false;
+ return \filter_var(\gethostbyname($value), \FILTER_VALIDATE_IP) !== false;
}
}
diff --git a/Validation/Network/Ip.php b/Validation/Network/Ip.php
index 251d5ca10..65bcfb77b 100644
--- a/Validation/Network/Ip.php
+++ b/Validation/Network/Ip.php
@@ -42,7 +42,7 @@ abstract class Ip extends ValidatorAbstract
*/
public static function isValid($value, array $constraints = null) : bool
{
- return \filter_var($value, FILTER_VALIDATE_IP) !== false;
+ return \filter_var($value, \FILTER_VALIDATE_IP) !== false;
}
/**
@@ -56,7 +56,7 @@ abstract class Ip extends ValidatorAbstract
*/
public static function isValidIpv6($value) : bool
{
- return \filter_var($value, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) !== false;
+ return \filter_var($value, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV6) !== false;
}
/**
@@ -70,6 +70,6 @@ abstract class Ip extends ValidatorAbstract
*/
public static function isValidIpv4($value) : bool
{
- return \filter_var($value, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) !== false;
+ return \filter_var($value, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV4) !== false;
}
}
diff --git a/Validation/Validator.php b/Validation/Validator.php
index 1c9764941..a30be29fd 100644
--- a/Validation/Validator.php
+++ b/Validation/Validator.php
@@ -35,7 +35,7 @@ final class Validator extends ValidatorAbstract
*
* @return bool
*
- * @throws \BadFunctionCallException This exception is thrown if the callback is not callable.
+ * @throws \BadFunctionCallException this exception is thrown if the callback is not callable
*
* @since 1.0.0
*/
@@ -99,7 +99,7 @@ final class Validator extends ValidatorAbstract
*
* @since 1.0.0
*/
- public static function hasLength(string $var, int $min = 0, int $max = PHP_INT_MAX) : bool
+ public static function hasLength(string $var, int $min = 0, int $max = \PHP_INT_MAX) : bool
{
$length = \strlen($var);
@@ -151,7 +151,7 @@ final class Validator extends ValidatorAbstract
*
* @since 1.0.0
*/
- public static function hasLimit($var, $min = 0, $max = PHP_INT_MAX) : bool
+ public static function hasLimit($var, $min = 0, $max = \PHP_INT_MAX) : bool
{
if ($var <= $max && $var >= $min) {
return true;
diff --git a/Views/PaginationView.php b/Views/PaginationView.php
index 6b32319f0..275e343e0 100644
--- a/Views/PaginationView.php
+++ b/Views/PaginationView.php
@@ -1,4 +1,4 @@
-views[$id])) {
return false;
diff --git a/tests/Account/AccountManagerTest.php b/tests/Account/AccountManagerTest.php
index 3d508448a..05768f715 100644
--- a/tests/Account/AccountManagerTest.php
+++ b/tests/Account/AccountManagerTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Account;
@@ -20,6 +21,8 @@ require_once __DIR__ . '/../Autoloader.php';
/**
* @testdox phpOMS\tests\Account\AccountManager: Account/user manager to handle/access loaded accounts
+ *
+ * @internal
*/
class AccountManagerTest extends \PHPUnit\Framework\TestCase
{
diff --git a/tests/Account/AccountStatusTest.php b/tests/Account/AccountStatusTest.php
index 3313aaaf0..73deb82cf 100644
--- a/tests/Account/AccountStatusTest.php
+++ b/tests/Account/AccountStatusTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Account;
@@ -17,11 +18,14 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Account\AccountStatus;
+/**
+ * @internal
+ */
class AccountStatusTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(4, \count(AccountStatus::getConstants()));
+ self::assertCount(4, AccountStatus::getConstants());
self::assertEquals(1, AccountStatus::ACTIVE);
self::assertEquals(2, AccountStatus::INACTIVE);
self::assertEquals(3, AccountStatus::TIMEOUT);
diff --git a/tests/Account/AccountTest.php b/tests/Account/AccountTest.php
index bf501fa3b..2f55a26ec 100644
--- a/tests/Account/AccountTest.php
+++ b/tests/Account/AccountTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Account;
@@ -26,6 +27,8 @@ require_once __DIR__ . '/../Autoloader.php';
/**
* @testdox phpOMS\tests\Account\Account: Base account/user representation
+ *
+ * @internal
*/
class AccountTest extends \PHPUnit\Framework\TestCase
{
@@ -69,31 +72,31 @@ class AccountTest extends \PHPUnit\Framework\TestCase
$account = new Account();
/* Testing default values */
- self::assertTrue(\is_int($account->getId()));
+ self::assertIsInt($account->getId());
self::assertEquals(0, $account->getId());
self::assertInstanceOf('\phpOMS\Localization\Localization', $account->getL11n());
self::assertEquals([], $account->getGroups());
- self::assertEquals(null, $account->getName());
+ self::assertNull($account->getName());
- self::assertTrue(\is_string($account->getName1()));
+ self::assertIsString($account->getName1());
self::assertEquals('', $account->getName1());
- self::assertTrue(\is_string($account->getName2()));
+ self::assertIsString($account->getName2());
self::assertEquals('', $account->getName2());
- self::assertTrue(\is_string($account->getName3()));
+ self::assertIsString($account->getName3());
self::assertEquals('', $account->getName3());
- self::assertTrue(\is_string($account->getEmail()));
+ self::assertIsString($account->getEmail());
self::assertEquals('', $account->getEmail());
- self::assertTrue(\is_int($account->getStatus()));
+ self::assertIsInt($account->getStatus());
self::assertEquals(AccountStatus::INACTIVE, $account->getStatus());
- self::assertTrue(\is_int($account->getType()));
+ self::assertIsInt($account->getType());
self::assertEquals(AccountType::USER, $account->getType());
self::assertEquals([], $account->getPermissions());
@@ -102,7 +105,7 @@ class AccountTest extends \PHPUnit\Framework\TestCase
self::assertInstanceOf('\DateTime', $account->getCreatedAt());
$array = $account->toArray();
- self::assertTrue(\is_array($array));
+ self::assertIsArray($array);
self::assertGreaterThan(0, \count($array));
self::assertEquals(\json_encode($array), $account->__toString());
self::assertEquals($array, $account->jsonSerialize());
@@ -141,7 +144,7 @@ class AccountTest extends \PHPUnit\Framework\TestCase
$account->generatePassword('abcd');
$account->addGroup(new Group());
- self::assertEquals(1, \count($account->getGroups()));
+ self::assertCount(1, $account->getGroups());
}
/**
@@ -188,26 +191,26 @@ class AccountTest extends \PHPUnit\Framework\TestCase
$account = new Account();
$account->generatePassword('abcd');
- $account->addPermission(new class extends PermissionAbstract {});
- self::assertEquals(1, \count($account->getPermissions()));
+ $account->addPermission(new class() extends PermissionAbstract {});
+ self::assertCount(1, $account->getPermissions());
$account->setPermissions([
- new class extends PermissionAbstract {},
- new class extends PermissionAbstract {},
+ new class() extends PermissionAbstract {},
+ new class() extends PermissionAbstract {},
]);
- self::assertEquals(2, \count($account->getPermissions()));
+ self::assertCount(2, $account->getPermissions());
$account->addPermissions([
- new class extends PermissionAbstract {},
- new class extends PermissionAbstract {},
+ new class() extends PermissionAbstract {},
+ new class() extends PermissionAbstract {},
]);
- self::assertEquals(4, \count($account->getPermissions()));
+ self::assertCount(4, $account->getPermissions());
$account->addPermissions([[
- new class extends PermissionAbstract {},
- new class extends PermissionAbstract {},
+ new class() extends PermissionAbstract {},
+ new class() extends PermissionAbstract {},
]]);
- self::assertEquals(6, \count($account->getPermissions()));
+ self::assertCount(6, $account->getPermissions());
self::assertFalse($account->hasPermission(PermissionType::READ, 1, 'a', 'a', 1, 1, 1));
self::assertTrue($account->hasPermission(PermissionType::NONE));
@@ -260,7 +263,7 @@ class AccountTest extends \PHPUnit\Framework\TestCase
$rand = 0;
do {
- $rand = \mt_rand(PHP_INT_MIN, PHP_INT_MAX);
+ $rand = \mt_rand(\PHP_INT_MIN, \PHP_INT_MAX);
} while (AccountStatus::isValidValue($rand));
$account->setStatus($rand);
@@ -277,7 +280,7 @@ class AccountTest extends \PHPUnit\Framework\TestCase
$rand = 0;
do {
- $rand = \mt_rand(PHP_INT_MIN, PHP_INT_MAX);
+ $rand = \mt_rand(\PHP_INT_MIN, \PHP_INT_MAX);
} while (AccountType::isValidValue($rand));
$account->setType($rand);
diff --git a/tests/Account/AccountTypeTest.php b/tests/Account/AccountTypeTest.php
index 3fae4d81f..c9d97b34b 100644
--- a/tests/Account/AccountTypeTest.php
+++ b/tests/Account/AccountTypeTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Account;
@@ -17,11 +18,14 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Account\AccountType;
+/**
+ * @internal
+ */
class AccountTypeTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(2, \count(AccountType::getConstants()));
+ self::assertCount(2, AccountType::getConstants());
self::assertEquals(0, AccountType::USER);
self::assertEquals(1, AccountType::GROUP);
}
diff --git a/tests/Account/GroupStatusTest.php b/tests/Account/GroupStatusTest.php
index 0310090a7..7062214a6 100644
--- a/tests/Account/GroupStatusTest.php
+++ b/tests/Account/GroupStatusTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Account;
@@ -17,11 +18,14 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Account\GroupStatus;
+/**
+ * @internal
+ */
class GroupStatusTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(3, \count(GroupStatus::getConstants()));
+ self::assertCount(3, GroupStatus::getConstants());
self::assertEquals(1, GroupStatus::ACTIVE);
self::assertEquals(2, GroupStatus::INACTIVE);
self::assertEquals(4, GroupStatus::HIDDEN);
diff --git a/tests/Account/GroupTest.php b/tests/Account/GroupTest.php
index e71f4f69f..4c3d02994 100644
--- a/tests/Account/GroupTest.php
+++ b/tests/Account/GroupTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Account;
@@ -22,6 +23,8 @@ require_once __DIR__ . '/../Autoloader.php';
/**
* @testdox phpOMS\tests\Account\Group: Base group representation
+ *
+ * @internal
*/
class GroupTest extends \PHPUnit\Framework\TestCase
{
@@ -51,20 +54,20 @@ class GroupTest extends \PHPUnit\Framework\TestCase
$group = new Group();
/* Testing default values */
- self::assertTrue(\is_int($group->getId()));
+ self::assertIsInt($group->getId());
self::assertEquals(0, $group->getId());
- self::assertTrue(\is_string($group->getName()));
+ self::assertIsString($group->getName());
self::assertEquals('', $group->getName());
- self::assertTrue(\is_int($group->getStatus()));
+ self::assertIsInt($group->getStatus());
self::assertEquals(GroupStatus::INACTIVE, $group->getStatus());
- self::assertTrue(\is_string($group->getDescription()));
+ self::assertIsString($group->getDescription());
self::assertEquals('', $group->getDescription());
$array = $group->toArray();
- self::assertTrue(\is_array($array));
+ self::assertIsArray($array);
self::assertGreaterThan(0, \count($array));
self::assertEquals(\json_encode($array), $group->__toString());
self::assertEquals($array, $group->jsonSerialize());
@@ -90,26 +93,26 @@ class GroupTest extends \PHPUnit\Framework\TestCase
public function testPermissionHandling() : void
{
$group = new Group();
- $group->addPermission(new class extends PermissionAbstract {});
- self::assertEquals(1, \count($group->getPermissions()));
+ $group->addPermission(new class() extends PermissionAbstract {});
+ self::assertCount(1, $group->getPermissions());
$group->setPermissions([
- new class extends PermissionAbstract {},
- new class extends PermissionAbstract {},
+ new class() extends PermissionAbstract {},
+ new class() extends PermissionAbstract {},
]);
- self::assertEquals(2, \count($group->getPermissions()));
+ self::assertCount(2, $group->getPermissions());
$group->addPermissions([
- new class extends PermissionAbstract {},
- new class extends PermissionAbstract {},
+ new class() extends PermissionAbstract {},
+ new class() extends PermissionAbstract {},
]);
- self::assertEquals(4, \count($group->getPermissions()));
+ self::assertCount(4, $group->getPermissions());
$group->addPermissions([[
- new class extends PermissionAbstract {},
- new class extends PermissionAbstract {},
+ new class() extends PermissionAbstract {},
+ new class() extends PermissionAbstract {},
]]);
- self::assertEquals(6, \count($group->getPermissions()));
+ self::assertCount(6, $group->getPermissions());
self::assertFalse($group->hasPermission(PermissionType::READ, 1, 'a', 'a', 1, 1, 1));
self::assertTrue($group->hasPermission(PermissionType::NONE));
@@ -137,7 +140,7 @@ class GroupTest extends \PHPUnit\Framework\TestCase
$rand = 0;
do {
- $rand = \mt_rand(PHP_INT_MIN, PHP_INT_MAX);
+ $rand = \mt_rand(\PHP_INT_MIN, \PHP_INT_MAX);
} while (GroupStatus::isValidValue($rand));
$group->setStatus($rand);
diff --git a/tests/Account/NullAccountTest.php b/tests/Account/NullAccountTest.php
index 2c3fee2df..20199430e 100644
--- a/tests/Account/NullAccountTest.php
+++ b/tests/Account/NullAccountTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Account;
@@ -17,6 +18,9 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Account\NullAccount;
+/**
+ * @internal
+ */
class NullAccountTest extends \PHPUnit\Framework\TestCase
{
public function testNull() : void
diff --git a/tests/Account/PermissionAbstractTest.php b/tests/Account/PermissionAbstractTest.php
index 1425bdb46..8bf25e686 100644
--- a/tests/Account/PermissionAbstractTest.php
+++ b/tests/Account/PermissionAbstractTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Account;
@@ -18,20 +19,23 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Account\PermissionAbstract;
use phpOMS\Account\PermissionType;
+/**
+ * @internal
+ */
class PermissionAbstractTest extends \PHPUnit\Framework\TestCase
{
public function testAbstractDefault() : void
{
- $perm = new class extends PermissionAbstract {};
+ $perm = new class() extends PermissionAbstract {};
self::assertEquals(0, $perm->getId());
- self::assertEquals(null, $perm->getUnit());
- self::assertEquals(null, $perm->getApp());
- self::assertEquals(null, $perm->getModule());
+ self::assertNull($perm->getUnit());
+ self::assertNull($perm->getApp());
+ self::assertNull($perm->getModule());
self::assertEquals(0, $perm->getFrom());
- self::assertEquals(null, $perm->getType());
- self::assertEquals(null, $perm->getElement());
- self::assertEquals(null, $perm->getComponent());
+ self::assertNull($perm->getType());
+ self::assertNull($perm->getElement());
+ self::assertNull($perm->getComponent());
self::assertEquals(PermissionType::NONE, $perm->getPermission());
self::assertEquals(
@@ -52,7 +56,7 @@ class PermissionAbstractTest extends \PHPUnit\Framework\TestCase
public function testAbstractGetSet() : void
{
- $perm = new class extends PermissionAbstract {};
+ $perm = new class() extends PermissionAbstract {};
$perm->setUnit(1);
self::assertEquals(1, $perm->getUnit());
@@ -60,8 +64,8 @@ class PermissionAbstractTest extends \PHPUnit\Framework\TestCase
$perm->setApp('Test');
self::assertEquals('Test', $perm->getApp());
- $perm->setModule(2);
- self::assertEquals(2, $perm->getModule());
+ $perm->setModule('2');
+ self::assertEquals('2', $perm->getModule());
$perm->setFrom(3);
self::assertEquals(3, $perm->getFrom());
diff --git a/tests/Account/PermissionTypeTest.php b/tests/Account/PermissionTypeTest.php
index 0b10cfa39..8437cc7f2 100644
--- a/tests/Account/PermissionTypeTest.php
+++ b/tests/Account/PermissionTypeTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Account;
@@ -17,11 +18,14 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Account\PermissionType;
+/**
+ * @internal
+ */
class PermissionTypeTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(6, \count(PermissionType::getConstants()));
+ self::assertCount(6, PermissionType::getConstants());
self::assertEquals(PermissionType::getConstants(), \array_unique(PermissionType::getConstants()));
self::assertEquals(1, PermissionType::NONE);
diff --git a/tests/ApplicationAbstractTest.php b/tests/ApplicationAbstractTest.php
index aba2d64de..fc45b4d64 100644
--- a/tests/ApplicationAbstractTest.php
+++ b/tests/ApplicationAbstractTest.php
@@ -10,16 +10,20 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests;
use phpOMS\ApplicationAbstract;
+/**
+ * @internal
+ */
class ApplicationAbstractTest extends \PHPUnit\Framework\TestCase
{
public function testGetSet() : void
{
- $obj = new class extends ApplicationAbstract {};
+ $obj = new class() extends ApplicationAbstract {};
$obj->appName = 'Test';
self::assertEquals('Test', $obj->appName);
diff --git a/tests/Asset/AssetManagerTest.php b/tests/Asset/AssetManagerTest.php
index 6b05cd45a..83f19e3f6 100644
--- a/tests/Asset/AssetManagerTest.php
+++ b/tests/Asset/AssetManagerTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Asset;
@@ -19,6 +20,8 @@ require_once __DIR__ . '/../Autoloader.php';
/**
* @testdox phpOMS\tests\Asset\AssetManagerTest: Asset manager to handle/access assets
+ *
+ * @internal
*/
class AssetManagerTest extends \PHPUnit\Framework\TestCase
{
diff --git a/tests/Asset/AssetTypeTest.php b/tests/Asset/AssetTypeTest.php
index da6a4008b..706368ad3 100644
--- a/tests/Asset/AssetTypeTest.php
+++ b/tests/Asset/AssetTypeTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Asset;
@@ -17,11 +18,14 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Asset\AssetType;
+/**
+ * @internal
+ */
class AssetTypeTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(3, \count(AssetType::getConstants()));
+ self::assertCount(3, AssetType::getConstants());
self::assertEquals(0, AssetType::CSS);
self::assertEquals(1, AssetType::JS);
self::assertEquals(2, AssetType::JSLATE);
diff --git a/tests/Auth/AuthTest.php b/tests/Auth/AuthTest.php
index ed57abcec..bcf53db36 100644
--- a/tests/Auth/AuthTest.php
+++ b/tests/Auth/AuthTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Auth;
@@ -19,6 +20,8 @@ require_once __DIR__ . '/../Autoloader.php';
/**
* @testdox phpOMS\tests\Auth\AuthTest: Account and session authentication
+ *
+ * @internal
*/
class AuthTest extends \PHPUnit\Framework\TestCase
{
diff --git a/tests/Auth/LoginReturnTypeTest.php b/tests/Auth/LoginReturnTypeTest.php
index 39d08339f..e4c628811 100644
--- a/tests/Auth/LoginReturnTypeTest.php
+++ b/tests/Auth/LoginReturnTypeTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Auth;
@@ -17,11 +18,14 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Auth\LoginReturnType;
+/**
+ * @internal
+ */
class LoginReturnTypeTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(11, \count(LoginReturnType::getConstants()));
+ self::assertCount(11, LoginReturnType::getConstants());
self::assertEquals(0, LoginReturnType::OK);
self::assertEquals(-1, LoginReturnType::FAILURE);
self::assertEquals(-2, LoginReturnType::WRONG_PASSWORD);
diff --git a/tests/AutoloadExceptionTest.php b/tests/AutoloadExceptionTest.php
index 11a25022f..29070c9c5 100644
--- a/tests/AutoloadExceptionTest.php
+++ b/tests/AutoloadExceptionTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests;
use phpOMS\AutoloadException;
+/**
+ * @internal
+ */
class AutoloadExceptionTest extends \PHPUnit\Framework\TestCase
{
public function testException() : void
diff --git a/tests/AutoloaderTest.php b/tests/AutoloaderTest.php
index 8a2239d93..d3e319c4c 100644
--- a/tests/AutoloaderTest.php
+++ b/tests/AutoloaderTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests;
use phpOMS\Autoloader;
+/**
+ * @internal
+ */
class AutoloaderTest extends \PHPUnit\Framework\TestCase
{
public function testAutoloader() : void
diff --git a/tests/Bootstrap.php b/tests/Bootstrap.php
index 651af3ae3..1aaa157e6 100644
--- a/tests/Bootstrap.php
+++ b/tests/Bootstrap.php
@@ -1,9 +1,9 @@
- [
- ]
+ ],
];
// Reset database
diff --git a/tests/Business/Finance/DepreciationTest.php b/tests/Business/Finance/DepreciationTest.php
index 601512831..6154d31eb 100644
--- a/tests/Business/Finance/DepreciationTest.php
+++ b/tests/Business/Finance/DepreciationTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Business\Finance;
use phpOMS\Business\Finance\Depreciation;
+/**
+ * @internal
+ */
class DepreciationTest extends \PHPUnit\Framework\TestCase
{
public function testStraightLine() : void
diff --git a/tests/Business/Finance/FinanceFormulasTest.php b/tests/Business/Finance/FinanceFormulasTest.php
index 042870243..5a5134852 100644
--- a/tests/Business/Finance/FinanceFormulasTest.php
+++ b/tests/Business/Finance/FinanceFormulasTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Business\Finance;
use phpOMS\Business\Finance\FinanceFormulas;
+/**
+ * @internal
+ */
class FinanceFormulasTest extends \PHPUnit\Framework\TestCase
{
public function testAnnualPercentageYield() : void
diff --git a/tests/Business/Finance/LoanTest.php b/tests/Business/Finance/LoanTest.php
index 3e3cad5bf..eb44dde12 100644
--- a/tests/Business/Finance/LoanTest.php
+++ b/tests/Business/Finance/LoanTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Business\Finance;
use phpOMS\Business\Finance\Loan;
+/**
+ * @internal
+ */
class LoanTest extends \PHPUnit\Framework\TestCase
{
public function testRatios() : void
diff --git a/tests/Business/Finance/LorenzkurveTest.php b/tests/Business/Finance/LorenzkurveTest.php
index ce47af0b9..fe98be368 100644
--- a/tests/Business/Finance/LorenzkurveTest.php
+++ b/tests/Business/Finance/LorenzkurveTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Business\Finance;
use phpOMS\Business\Finance\Lorenzkurve;
+/**
+ * @internal
+ */
class LorenzkurveTest extends \PHPUnit\Framework\TestCase
{
public function testLorenz() : void
diff --git a/tests/Business/Finance/StockBondsTest.php b/tests/Business/Finance/StockBondsTest.php
index 226b232c4..efe3ecf6c 100644
--- a/tests/Business/Finance/StockBondsTest.php
+++ b/tests/Business/Finance/StockBondsTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Business\Finance;
use phpOMS\Business\Finance\StockBonds;
+/**
+ * @internal
+ */
class StockBondsTest extends \PHPUnit\Framework\TestCase
{
public function testRatios() : void
diff --git a/tests/Business/Marketing/MetricsTest.php b/tests/Business/Marketing/MetricsTest.php
index f19dac5a7..521ecd0a7 100644
--- a/tests/Business/Marketing/MetricsTest.php
+++ b/tests/Business/Marketing/MetricsTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Business\Marketing;
use phpOMS\Business\Marketing\Metrics;
+/**
+ * @internal
+ */
class MetricsTest extends \PHPUnit\Framework\TestCase
{
public function testMetrics() : void
diff --git a/tests/Business/Marketing/NetPromoterScoreTest.php b/tests/Business/Marketing/NetPromoterScoreTest.php
index c05a87f54..66b128fcc 100644
--- a/tests/Business/Marketing/NetPromoterScoreTest.php
+++ b/tests/Business/Marketing/NetPromoterScoreTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Business\Marketing;
use phpOMS\Business\Marketing\NetPromoterScore;
+/**
+ * @internal
+ */
class NetPromoterScoreTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
diff --git a/tests/Business/Programming/MetricsTest.php b/tests/Business/Programming/MetricsTest.php
index be931ab92..08f0b6e0b 100644
--- a/tests/Business/Programming/MetricsTest.php
+++ b/tests/Business/Programming/MetricsTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Business\Programming;
use phpOMS\Business\Programming\Metrics;
+/**
+ * @internal
+ */
class MetricsTest extends \PHPUnit\Framework\TestCase
{
public function testMetrics() : void
diff --git a/tests/Business/Sales/MarketShareEstimationTest.php b/tests/Business/Sales/MarketShareEstimationTest.php
index c8db25438..0486481da 100644
--- a/tests/Business/Sales/MarketShareEstimationTest.php
+++ b/tests/Business/Sales/MarketShareEstimationTest.php
@@ -10,10 +10,14 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Business\Sales;
use phpOMS\Business\Sales\MarketShareEstimation;
+/**
+ * @internal
+ */
class MarketShareEstimationTest extends \PHPUnit\Framework\TestCase
{
public function testZipfRank() : void
diff --git a/tests/Config/OptionsTraitTest.php b/tests/Config/OptionsTraitTest.php
index 835693add..0f54e62c4 100644
--- a/tests/Config/OptionsTraitTest.php
+++ b/tests/Config/OptionsTraitTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Config;
@@ -17,12 +18,15 @@ use phpOMS\Config\OptionsTrait;
require_once __DIR__ . '/../Autoloader.php';
+/**
+ * @internal
+ */
class OptionsTraitTest extends \PHPUnit\Framework\TestCase
{
public function testOptionTrait() : void
{
- $class = new class {
+ $class = new class() {
use OptionsTrait;
};
@@ -32,7 +36,7 @@ class OptionsTraitTest extends \PHPUnit\Framework\TestCase
public function testDefault() : void
{
- $class = new class {
+ $class = new class() {
use OptionsTrait;
};
@@ -42,7 +46,7 @@ class OptionsTraitTest extends \PHPUnit\Framework\TestCase
public function testSetGet() : void
{
- $class = new class {
+ $class = new class() {
use OptionsTrait;
};
diff --git a/tests/DataStorage/Cache/CachePoolTest.php b/tests/DataStorage/Cache/CachePoolTest.php
index 02e24a76e..ff7f28e46 100644
--- a/tests/DataStorage/Cache/CachePoolTest.php
+++ b/tests/DataStorage/Cache/CachePoolTest.php
@@ -10,12 +10,16 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Cache;
use phpOMS\DataStorage\Cache\CachePool;
use phpOMS\DataStorage\Cache\Connection\FileCache;
+/**
+ * @internal
+ */
class CachePoolTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
diff --git a/tests/DataStorage/Cache/CacheStatusTest.php b/tests/DataStorage/Cache/CacheStatusTest.php
index 42085b347..f3625698d 100644
--- a/tests/DataStorage/Cache/CacheStatusTest.php
+++ b/tests/DataStorage/Cache/CacheStatusTest.php
@@ -10,16 +10,20 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Cache;
use phpOMS\DataStorage\Cache\CacheStatus;
+/**
+ * @internal
+ */
class CacheStatusTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(4, \count(CacheStatus::getConstants()));
+ self::assertCount(4, CacheStatus::getConstants());
self::assertEquals(0, CacheStatus::OK);
self::assertEquals(1, CacheStatus::FAILURE);
self::assertEquals(2, CacheStatus::READONLY);
diff --git a/tests/DataStorage/Cache/CacheTypeTest.php b/tests/DataStorage/Cache/CacheTypeTest.php
index a70725f0d..238e2c392 100644
--- a/tests/DataStorage/Cache/CacheTypeTest.php
+++ b/tests/DataStorage/Cache/CacheTypeTest.php
@@ -10,16 +10,20 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Cache;
use phpOMS\DataStorage\Cache\CacheType;
+/**
+ * @internal
+ */
class CacheTypeTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(4, \count(CacheType::getConstants()));
+ self::assertCount(4, CacheType::getConstants());
self::assertEquals('file', CacheType::FILE);
self::assertEquals('mem', CacheType::MEMCACHED);
self::assertEquals('redis', CacheType::REDIS);
diff --git a/tests/DataStorage/Cache/Connection/CacheValueTypeTest.php b/tests/DataStorage/Cache/Connection/CacheValueTypeTest.php
index 3db968f3e..28a0a6dc8 100644
--- a/tests/DataStorage/Cache/Connection/CacheValueTypeTest.php
+++ b/tests/DataStorage/Cache/Connection/CacheValueTypeTest.php
@@ -10,16 +10,20 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Cache\Connection;
use phpOMS\DataStorage\Cache\Connection\CacheValueType;
+/**
+ * @internal
+ */
class CacheValueTypeTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(8, \count(CacheValueType::getConstants()));
+ self::assertCount(8, CacheValueType::getConstants());
self::assertEquals(0, CacheValueType::_INT);
self::assertEquals(1, CacheValueType::_STRING);
self::assertEquals(2, CacheValueType::_ARRAY);
diff --git a/tests/DataStorage/Cache/Connection/ConnectionFactoryTest.php b/tests/DataStorage/Cache/Connection/ConnectionFactoryTest.php
index de265caf7..7dd36c538 100644
--- a/tests/DataStorage/Cache/Connection/ConnectionFactoryTest.php
+++ b/tests/DataStorage/Cache/Connection/ConnectionFactoryTest.php
@@ -10,12 +10,16 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Cache\Connection;
use phpOMS\DataStorage\Cache\CacheType;
use phpOMS\DataStorage\Cache\Connection\ConnectionFactory;
+/**
+ * @internal
+ */
class ConnectionFactoryTest extends \PHPUnit\Framework\TestCase
{
public function testCreateFileCache() : void
diff --git a/tests/DataStorage/Cache/Connection/FileCacheJsonSerializable.php b/tests/DataStorage/Cache/Connection/FileCacheJsonSerializable.php
index 277ea6d9b..6e94d64b9 100644
--- a/tests/DataStorage/Cache/Connection/FileCacheJsonSerializable.php
+++ b/tests/DataStorage/Cache/Connection/FileCacheJsonSerializable.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Cache\Connection;
@@ -29,4 +30,4 @@ class FileCacheJsonSerializable implements \JsonSerializable
{
$this->val = \json_decode($val, true);
}
-}
\ No newline at end of file
+}
diff --git a/tests/DataStorage/Cache/Connection/FileCacheSerializable.php b/tests/DataStorage/Cache/Connection/FileCacheSerializable.php
index 0d8d6a5f3..bd943209d 100644
--- a/tests/DataStorage/Cache/Connection/FileCacheSerializable.php
+++ b/tests/DataStorage/Cache/Connection/FileCacheSerializable.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Cache\Connection;
@@ -26,4 +27,4 @@ class FileCacheSerializable implements \Serializable
{
$this->val = $val;
}
-}
\ No newline at end of file
+}
diff --git a/tests/DataStorage/Cache/Connection/FileCacheTest.php b/tests/DataStorage/Cache/Connection/FileCacheTest.php
index 2dae1eca5..5d8eee3b1 100644
--- a/tests/DataStorage/Cache/Connection/FileCacheTest.php
+++ b/tests/DataStorage/Cache/Connection/FileCacheTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Cache\Connection;
@@ -18,6 +19,9 @@ use phpOMS\DataStorage\Cache\CacheType;
use phpOMS\DataStorage\Cache\Connection\FileCache;
use phpOMS\Utils\TestUtils;
+/**
+ * @internal
+ */
class FileCacheTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
@@ -33,7 +37,7 @@ class FileCacheTest extends \PHPUnit\Framework\TestCase
self::assertTrue(\is_dir(__DIR__ . '/Cache'));
self::assertTrue($cache->flushAll());
self::assertEquals(50, $cache->getThreshold());
- self::assertEquals(null, $cache->get('test'));
+ self::assertNull($cache->get('test'));
if (\file_exists(__DIR__ . '/Cache')) {
\rmdir(__DIR__ . '/Cache');
@@ -73,10 +77,10 @@ class FileCacheTest extends \PHPUnit\Framework\TestCase
self::assertEquals('testValAdd', $cache->get('addKey'));
$cache->set('key2', false); // 3
- self::assertEquals(false, $cache->get('key2'));
+ self::assertFalse($cache->get('key2'));
$cache->set('key3', null); // 4
- self::assertEquals(null, $cache->get('key3'));
+ self::assertNull($cache->get('key3'));
$cache->set('key4', 4); // 5
self::assertEquals(4, $cache->get('key4'));
@@ -99,7 +103,7 @@ class FileCacheTest extends \PHPUnit\Framework\TestCase
self::assertTrue($cache->delete('key4')); // 8
self::assertTrue($cache->delete('keyInvalid'));
- self::assertEquals(null, $cache->get('key4'));
+ self::assertNull($cache->get('key4'));
self::assertEquals(
[
@@ -111,7 +115,7 @@ class FileCacheTest extends \PHPUnit\Framework\TestCase
);
self::assertTrue($cache->flushAll());
- self::assertEquals(null, $cache->get('key5'));
+ self::assertNull($cache->get('key5'));
self::assertEquals(
[
@@ -143,12 +147,12 @@ class FileCacheTest extends \PHPUnit\Framework\TestCase
$cache->set('key2', 'testVal2', 1);
self::assertEquals('testVal2', $cache->get('key2', 1));
\sleep(3);
- self::assertEquals(null, $cache->get('key2', 1));
+ self::assertNull($cache->get('key2', 1));
$cache->set('key3', 'testVal3', 1);
self::assertEquals('testVal3', $cache->get('key3', 1));
\sleep(3);
- self::assertEquals(null, $cache->get('key3', 1));
+ self::assertNull($cache->get('key3', 1));
$cache->set('key4', 'testVal4', 1);
self::assertFalse($cache->delete('key4', 0));
@@ -183,7 +187,7 @@ class FileCacheTest extends \PHPUnit\Framework\TestCase
$cache->set('key1', 'testVal');
self::assertFalse($cache->add('key2', 'testVal2'));
- self::assertEquals(null, $cache->get('key1'));
+ self::assertNull($cache->get('key1'));
self::assertFalse($cache->replace('key1', 5));
self::assertFalse($cache->delete('key1'));
self::assertFalse($cache->flushAll());
diff --git a/tests/DataStorage/Cache/Connection/MemCachedTest.php b/tests/DataStorage/Cache/Connection/MemCachedTest.php
index db25fc761..444757f74 100644
--- a/tests/DataStorage/Cache/Connection/MemCachedTest.php
+++ b/tests/DataStorage/Cache/Connection/MemCachedTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Cache\Connection;
@@ -18,6 +19,9 @@ use phpOMS\DataStorage\Cache\CacheType;
use phpOMS\DataStorage\Cache\Connection\MemCached;
use phpOMS\Utils\TestUtils;
+/**
+ * @internal
+ */
class MemCachedTest extends \PHPUnit\Framework\TestCase
{
protected function setUp() : void
@@ -37,7 +41,7 @@ class MemCachedTest extends \PHPUnit\Framework\TestCase
self::assertEquals(CacheType::MEMCACHED, $cache->getType());
self::assertTrue($cache->flushAll());
self::assertEquals(0, $cache->getThreshold());
- self::assertEquals(null, $cache->get('test'));
+ self::assertNull($cache->get('test'));
}
public function testConnect() : void
@@ -63,10 +67,10 @@ class MemCachedTest extends \PHPUnit\Framework\TestCase
self::assertEquals('testValAdd', $cache->get('addKey'));
$cache->set('key2', false); // 3
- self::assertEquals(false, $cache->get('key2'));
+ self::assertFalse($cache->get('key2'));
$cache->set('key3', null); // 4
- self::assertEquals(null, $cache->get('key3'));
+ self::assertNull($cache->get('key3'));
$cache->set('key4', 4); // 5
self::assertEquals(4, $cache->get('key4'));
@@ -83,7 +87,7 @@ class MemCachedTest extends \PHPUnit\Framework\TestCase
self::assertTrue($cache->delete('key4')); // 6
self::assertFalse($cache->delete('keyInvalid'));
- self::assertEquals(null, $cache->get('key4'));
+ self::assertNull($cache->get('key4'));
self::assertArraySubset(
[
@@ -95,7 +99,7 @@ class MemCachedTest extends \PHPUnit\Framework\TestCase
self::assertTrue($cache->flushAll());
self::assertTrue($cache->flush());
- self::assertEquals(null, $cache->get('key5')); // This reduces the stat count by one see stat comment. Stupid memcached!
+ self::assertNull($cache->get('key5')); // This reduces the stat count by one see stat comment. Stupid memcached!
$cache->flushAll();
@@ -117,7 +121,7 @@ class MemCachedTest extends \PHPUnit\Framework\TestCase
$cache->set('key1', 'testVal');
self::assertFalse($cache->add('key2', 'testVal2'));
- self::assertEquals(null, $cache->get('key1'));
+ self::assertNull($cache->get('key1'));
self::assertFalse($cache->replace('key1', 5));
self::assertFalse($cache->delete('key1'));
self::assertFalse($cache->flushAll());
diff --git a/tests/DataStorage/Cache/Connection/NullCacheTest.php b/tests/DataStorage/Cache/Connection/NullCacheTest.php
index 72eb5c5d7..1947769dd 100644
--- a/tests/DataStorage/Cache/Connection/NullCacheTest.php
+++ b/tests/DataStorage/Cache/Connection/NullCacheTest.php
@@ -10,12 +10,16 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Cache\Connection;
use phpOMS\DataStorage\Cache\CacheType;
use phpOMS\DataStorage\Cache\Connection\NullCache;
+/**
+ * @internal
+ */
class NullCacheTest extends \PHPUnit\Framework\TestCase
{
public function testCache() : void
@@ -28,7 +32,7 @@ class NullCacheTest extends \PHPUnit\Framework\TestCase
self::assertTrue($cache->add(1, 1));
$cache->set(1, 1);
- self::assertEquals(null, $cache->get(1));
+ self::assertNull($cache->get(1));
self::assertTrue($cache->delete(1));
self::assertTrue($cache->flush(1));
diff --git a/tests/DataStorage/Cache/Connection/RedisCacheTest.php b/tests/DataStorage/Cache/Connection/RedisCacheTest.php
index 4f5599543..f621664e8 100644
--- a/tests/DataStorage/Cache/Connection/RedisCacheTest.php
+++ b/tests/DataStorage/Cache/Connection/RedisCacheTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Cache\Connection;
@@ -18,6 +19,9 @@ use phpOMS\DataStorage\Cache\CacheType;
use phpOMS\DataStorage\Cache\Connection\RedisCache;
use phpOMS\Utils\TestUtils;
+/**
+ * @internal
+ */
class RedisCacheTest extends \PHPUnit\Framework\TestCase
{
protected function setUp() : void
@@ -38,7 +42,7 @@ class RedisCacheTest extends \PHPUnit\Framework\TestCase
self::assertTrue($cache->flushAll());
self::assertTrue($cache->flush());
self::assertEquals(0, $cache->getThreshold());
- self::assertEquals(null, $cache->get('test'));
+ self::assertNull($cache->get('test'));
}
public function testConnect() : void
@@ -65,10 +69,10 @@ class RedisCacheTest extends \PHPUnit\Framework\TestCase
self::assertEquals('testValAdd', $cache->get('addKey'));
$cache->set('key2', false); // 3
- self::assertEquals(false, $cache->get('key2'));
+ self::assertFalse($cache->get('key2'));
$cache->set('key3', null); // 4
- self::assertEquals(null, $cache->get('key3'));
+ self::assertNull($cache->get('key3'));
$cache->set('key4', 4); // 5
self::assertEquals(4, $cache->get('key4'));
@@ -85,7 +89,7 @@ class RedisCacheTest extends \PHPUnit\Framework\TestCase
self::assertTrue($cache->delete('key4')); // 6
self::assertFalse($cache->delete('keyInvalid'));
- self::assertEquals(null, $cache->get('key4'));
+ self::assertNull($cache->get('key4'));
self::assertArraySubset(
[
@@ -97,7 +101,7 @@ class RedisCacheTest extends \PHPUnit\Framework\TestCase
self::assertTrue($cache->flushAll());
self::assertTrue($cache->flush());
- self::assertEquals(null, $cache->get('key5'));
+ self::assertNull($cache->get('key5'));
$cache->flushAll();
@@ -119,7 +123,7 @@ class RedisCacheTest extends \PHPUnit\Framework\TestCase
$cache->set('key1', 'testVal');
self::assertFalse($cache->add('key2', 'testVal2'));
- self::assertEquals(null, $cache->get('key1'));
+ self::assertNull($cache->get('key1'));
self::assertFalse($cache->replace('key1', 5));
self::assertFalse($cache->delete('key1'));
self::assertFalse($cache->flushAll());
diff --git a/tests/DataStorage/Cache/Exception/InvalidConnectionConfigExceptionTest.php b/tests/DataStorage/Cache/Exception/InvalidConnectionConfigExceptionTest.php
index 6cf4b9461..a1cb17732 100644
--- a/tests/DataStorage/Cache/Exception/InvalidConnectionConfigExceptionTest.php
+++ b/tests/DataStorage/Cache/Exception/InvalidConnectionConfigExceptionTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Cache\Exception;
use phpOMS\DataStorage\Cache\Exception\InvalidConnectionConfigException;
+/**
+ * @internal
+ */
class InvalidConnectionConfigExceptionTest extends \PHPUnit\Framework\TestCase
{
public function testException() : void
diff --git a/tests/DataStorage/Cookie/CookieJarTest.php b/tests/DataStorage/Cookie/CookieJarTest.php
index b1906dc0a..26b0a8e63 100644
--- a/tests/DataStorage/Cookie/CookieJarTest.php
+++ b/tests/DataStorage/Cookie/CookieJarTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Cookie;
use phpOMS\DataStorage\Cookie\CookieJar;
+/**
+ * @internal
+ */
class CookieJarTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
@@ -22,7 +26,7 @@ class CookieJarTest extends \PHPUnit\Framework\TestCase
$jar = new CookieJar();
self::assertFalse(CookieJar::isLocked());
- self::assertEquals(null, $jar->get('asd'));
+ self::assertNull($jar->get('asd'));
self::assertFalse($jar->delete('abc'));
}
diff --git a/tests/DataStorage/Database/Connection/ConnectionFactoryTest.php b/tests/DataStorage/Database/Connection/ConnectionFactoryTest.php
index 8488ccd7f..33fa52e40 100644
--- a/tests/DataStorage/Database/Connection/ConnectionFactoryTest.php
+++ b/tests/DataStorage/Database/Connection/ConnectionFactoryTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\Connection;
@@ -19,6 +20,9 @@ use phpOMS\DataStorage\Database\Connection\PostgresConnection;
use phpOMS\DataStorage\Database\Connection\SQLiteConnection;
use phpOMS\DataStorage\Database\Connection\SqlServerConnection;
+/**
+ * @internal
+ */
class ConnectionFactoryTest extends \PHPUnit\Framework\TestCase
{
public function testCreateMysql() : void
diff --git a/tests/DataStorage/Database/Connection/MysqlConnectionTest.php b/tests/DataStorage/Database/Connection/MysqlConnectionTest.php
index a21a27867..7ebc13d77 100644
--- a/tests/DataStorage/Database/Connection/MysqlConnectionTest.php
+++ b/tests/DataStorage/Database/Connection/MysqlConnectionTest.php
@@ -10,12 +10,16 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\Connection;
use phpOMS\DataStorage\Database\Connection\MysqlConnection;
use phpOMS\DataStorage\Database\DatabaseStatus;
+/**
+ * @internal
+ */
class MysqlConnectionTest extends \PHPUnit\Framework\TestCase
{
protected function setUp() : void
diff --git a/tests/DataStorage/Database/Connection/NullConnectionTest.php b/tests/DataStorage/Database/Connection/NullConnectionTest.php
index f58e83c91..7f82535b7 100644
--- a/tests/DataStorage/Database/Connection/NullConnectionTest.php
+++ b/tests/DataStorage/Database/Connection/NullConnectionTest.php
@@ -10,12 +10,16 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\Connection;
use phpOMS\DataStorage\Database\Connection\NullConnection;
use phpOMS\DataStorage\Database\DatabaseType;
+/**
+ * @internal
+ */
class NullConnectionTest extends \PHPUnit\Framework\TestCase
{
public function testConnect() : void
@@ -25,4 +29,4 @@ class NullConnectionTest extends \PHPUnit\Framework\TestCase
self::assertEquals(DatabaseType::UNDEFINED, $null->getType());
}
-}
\ No newline at end of file
+}
diff --git a/tests/DataStorage/Database/Connection/PostgresConnectionTest.php b/tests/DataStorage/Database/Connection/PostgresConnectionTest.php
index d13d3b82f..133b9f2e8 100644
--- a/tests/DataStorage/Database/Connection/PostgresConnectionTest.php
+++ b/tests/DataStorage/Database/Connection/PostgresConnectionTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\Connection;
use phpOMS\DataStorage\Database\Connection\PostgresConnection;
use phpOMS\DataStorage\Database\DatabaseStatus;
+/**
+ * @internal
+ */
class PostgresConnectionTest extends \PHPUnit\Framework\TestCase
{
protected function setUp() : void
diff --git a/tests/DataStorage/Database/Connection/SQLiteConnectionTest.php b/tests/DataStorage/Database/Connection/SQLiteConnectionTest.php
index fab72f907..edf24e3e7 100644
--- a/tests/DataStorage/Database/Connection/SQLiteConnectionTest.php
+++ b/tests/DataStorage/Database/Connection/SQLiteConnectionTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\Connection;
use phpOMS\DataStorage\Database\Connection\SQLiteConnection;
use phpOMS\DataStorage\Database\DatabaseStatus;
+/**
+ * @internal
+ */
class SQLiteConnectionTest extends \PHPUnit\Framework\TestCase
{
protected function setUp() : void
diff --git a/tests/DataStorage/Database/Connection/SqlServerConnectionTest.php b/tests/DataStorage/Database/Connection/SqlServerConnectionTest.php
index 389f9e8b6..98288f114 100644
--- a/tests/DataStorage/Database/Connection/SqlServerConnectionTest.php
+++ b/tests/DataStorage/Database/Connection/SqlServerConnectionTest.php
@@ -10,12 +10,16 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\Connection;
use phpOMS\DataStorage\Database\Connection\SqlServerConnection;
use phpOMS\DataStorage\Database\DatabaseStatus;
+/**
+ * @internal
+ */
class SqlServerConnectionTest extends \PHPUnit\Framework\TestCase
{
protected function setUp() : void
diff --git a/tests/DataStorage/Database/DataMapperAbstractTest.php b/tests/DataStorage/Database/DataMapperAbstractTest.php
index bd1923a03..c0a9aa8e3 100644
--- a/tests/DataStorage/Database/DataMapperAbstractTest.php
+++ b/tests/DataStorage/Database/DataMapperAbstractTest.php
@@ -10,12 +10,16 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database;
use phpOMS\tests\DataStorage\Database\TestModel\BaseModel;
use phpOMS\tests\DataStorage\Database\TestModel\BaseModelMapper;
use phpOMS\tests\DataStorage\Database\TestModel\ManyToManyDirectModelMapper;
+/**
+ * @internal
+ */
class DataMapperAbstractTest extends \PHPUnit\Framework\TestCase
{
protected $model = null;
@@ -32,7 +36,7 @@ class DataMapperAbstractTest extends \PHPUnit\Framework\TestCase
'null' => null,
'float' => 1.3,
'json' => [1, 2, 3],
- 'jsonSerializable' => new class implements \JsonSerializable {
+ 'jsonSerializable' => new class() implements \JsonSerializable {
public function jsonSerialize()
{
return [1, 2, 3];
@@ -57,7 +61,7 @@ class DataMapperAbstractTest extends \PHPUnit\Framework\TestCase
'id' => 0,
'string' => 'ManyToManyDirect',
'to' => 0,
- ]
+ ],
],
'hasManyRelations' => [
[
@@ -67,7 +71,7 @@ class DataMapperAbstractTest extends \PHPUnit\Framework\TestCase
[
'id' => 0,
'string' => 'ManyToManyRel',
- ]
+ ],
],
];
@@ -178,8 +182,8 @@ class DataMapperAbstractTest extends \PHPUnit\Framework\TestCase
//self::assertEquals($this->model->json, $modelR->json);
//self::assertEquals([1, 2, 3], $modelR->jsonSerializable);
- self::assertEquals(2, \count($modelR->hasManyDirect));
- self::assertEquals(2, \count($modelR->hasManyRelations));
+ self::assertCount(2, $modelR->hasManyDirect);
+ self::assertCount(2, $modelR->hasManyRelations);
self::assertEquals(\reset($this->model->hasManyDirect)->string, \reset($modelR->hasManyDirect)->string);
self::assertEquals(\reset($this->model->hasManyRelations)->string, \reset($modelR->hasManyRelations)->string);
self::assertEquals($this->model->ownsOneSelf->string, $modelR->ownsOneSelf->string);
@@ -188,7 +192,7 @@ class DataMapperAbstractTest extends \PHPUnit\Framework\TestCase
$for = ManyToManyDirectModelMapper::getFor($id, 'to');
self::assertEquals(\reset($this->model->hasManyDirect)->string, \reset($for)->string);
- self::assertEquals(1, \count(BaseModelMapper::getAll()));
+ self::assertCount(1, BaseModelMapper::getAll());
}
public function testReadArray() : void
@@ -204,8 +208,8 @@ class DataMapperAbstractTest extends \PHPUnit\Framework\TestCase
self::assertEquals($this->modelArray['null'], $modelR['null']);
self::assertEquals($this->modelArray['datetime']->format('Y-m-d'), $modelR['datetime']->format('Y-m-d'));
- self::assertEquals(2, \count($modelR['hasManyDirect']));
- self::assertEquals(2, \count($modelR['hasManyRelations']));
+ self::assertCount(2, $modelR['hasManyDirect']);
+ self::assertCount(2, $modelR['hasManyRelations']);
self::assertEquals(\reset($this->modelArray['hasManyDirect'])['string'], \reset($modelR['hasManyDirect'])['string']);
self::assertEquals(\reset($this->modelArray['hasManyRelations'])['string'], \reset($modelR['hasManyRelations'])['string']);
self::assertEquals($this->modelArray['ownsOneSelf']['string'], $modelR['ownsOneSelf']['string']);
@@ -214,7 +218,7 @@ class DataMapperAbstractTest extends \PHPUnit\Framework\TestCase
$for = ManyToManyDirectModelMapper::getForArray($id, 'to');
self::assertEquals(\reset($this->modelArray['hasManyDirect'])['string'], \reset($for)['string']);
- self::assertEquals(1, \count(BaseModelMapper::getAllArray()));
+ self::assertCount(1, BaseModelMapper::getAllArray());
}
public function testUpdate() : void
diff --git a/tests/DataStorage/Database/DatabaseExceptionFactoryTest.php b/tests/DataStorage/Database/DatabaseExceptionFactoryTest.php
index 83798f0eb..5d4fe0b90 100644
--- a/tests/DataStorage/Database/DatabaseExceptionFactoryTest.php
+++ b/tests/DataStorage/Database/DatabaseExceptionFactoryTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database;
use phpOMS\DataStorage\Database\DatabaseExceptionFactory;
+/**
+ * @internal
+ */
class DatabaseExceptionFactoryTest extends \PHPUnit\Framework\TestCase
{
public function testException() : void
diff --git a/tests/DataStorage/Database/DatabasePoolTest.php b/tests/DataStorage/Database/DatabasePoolTest.php
index 6f9177d8e..bd3396bf1 100644
--- a/tests/DataStorage/Database/DatabasePoolTest.php
+++ b/tests/DataStorage/Database/DatabasePoolTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database;
@@ -17,6 +18,9 @@ use phpOMS\DataStorage\Database\Connection\MysqlConnection;
use phpOMS\DataStorage\Database\DatabasePool;
use phpOMS\DataStorage\Database\DatabaseStatus;
+/**
+ * @internal
+ */
class DatabasePoolTest extends \PHPUnit\Framework\TestCase
{
public function testBasicConnection() : void
diff --git a/tests/DataStorage/Database/DatabaseStatusTest.php b/tests/DataStorage/Database/DatabaseStatusTest.php
index cb9821e83..112dfeb04 100644
--- a/tests/DataStorage/Database/DatabaseStatusTest.php
+++ b/tests/DataStorage/Database/DatabaseStatusTest.php
@@ -10,16 +10,20 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database;
use phpOMS\DataStorage\Database\DatabaseStatus;
+/**
+ * @internal
+ */
class DatabaseStatusTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(6, \count(DatabaseStatus::getConstants()));
+ self::assertCount(6, DatabaseStatus::getConstants());
self::assertEquals(0, DatabaseStatus::OK);
self::assertEquals(1, DatabaseStatus::MISSING_DATABASE);
self::assertEquals(2, DatabaseStatus::MISSING_TABLE);
diff --git a/tests/DataStorage/Database/DatabaseTypeTest.php b/tests/DataStorage/Database/DatabaseTypeTest.php
index 266c4d319..b9fd4292e 100644
--- a/tests/DataStorage/Database/DatabaseTypeTest.php
+++ b/tests/DataStorage/Database/DatabaseTypeTest.php
@@ -10,16 +10,20 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database;
use phpOMS\DataStorage\Database\DatabaseType;
+/**
+ * @internal
+ */
class DatabaseTypeTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(5, \count(DatabaseType::getConstants()));
+ self::assertCount(5, DatabaseType::getConstants());
self::assertEquals('mysql', DatabaseType::MYSQL);
self::assertEquals('pgsql', DatabaseType::PGSQL);
self::assertEquals('sqlite', DatabaseType::SQLITE);
diff --git a/tests/DataStorage/Database/Exception/InvalidConnectionConfigExceptionTest.php b/tests/DataStorage/Database/Exception/InvalidConnectionConfigExceptionTest.php
index 90d095853..4b8bc0749 100644
--- a/tests/DataStorage/Database/Exception/InvalidConnectionConfigExceptionTest.php
+++ b/tests/DataStorage/Database/Exception/InvalidConnectionConfigExceptionTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\Exception;
use phpOMS\DataStorage\Database\Exception\InvalidConnectionConfigException;
+/**
+ * @internal
+ */
class InvalidConnectionConfigExceptionTest extends \PHPUnit\Framework\TestCase
{
public function testException() : void
diff --git a/tests/DataStorage/Database/Exception/InvalidDatabaseTypeExceptionTest.php b/tests/DataStorage/Database/Exception/InvalidDatabaseTypeExceptionTest.php
index e1caa7000..e849f91a9 100644
--- a/tests/DataStorage/Database/Exception/InvalidDatabaseTypeExceptionTest.php
+++ b/tests/DataStorage/Database/Exception/InvalidDatabaseTypeExceptionTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\Exception;
use phpOMS\DataStorage\Database\Exception\InvalidDatabaseTypeException;
+/**
+ * @internal
+ */
class InvalidDatabaseTypeExceptionTest extends \PHPUnit\Framework\TestCase
{
public function testException() : void
diff --git a/tests/DataStorage/Database/Exception/InvalidMapperExceptionTest.php b/tests/DataStorage/Database/Exception/InvalidMapperExceptionTest.php
index 96cd87177..cb67443d4 100644
--- a/tests/DataStorage/Database/Exception/InvalidMapperExceptionTest.php
+++ b/tests/DataStorage/Database/Exception/InvalidMapperExceptionTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\Exception;
use phpOMS\DataStorage\Database\Exception\InvalidMapperException;
+/**
+ * @internal
+ */
class InvalidMapperExceptionTest extends \PHPUnit\Framework\TestCase
{
public function testException() : void
diff --git a/tests/DataStorage/Database/Query/BuilderTest.php b/tests/DataStorage/Database/Query/BuilderTest.php
index d95e2ecd6..b74729ec7 100644
--- a/tests/DataStorage/Database/Query/BuilderTest.php
+++ b/tests/DataStorage/Database/Query/BuilderTest.php
@@ -10,12 +10,16 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\Query;
use phpOMS\DataStorage\Database\Connection\MysqlConnection;
use phpOMS\DataStorage\Database\Query\Builder;
+/**
+ * @internal
+ */
class BuilderTest extends \PHPUnit\Framework\TestCase
{
protected $con = null;
diff --git a/tests/DataStorage/Database/Query/ColumnTest.php b/tests/DataStorage/Database/Query/ColumnTest.php
index 44c591286..b8f7fe24c 100644
--- a/tests/DataStorage/Database/Query/ColumnTest.php
+++ b/tests/DataStorage/Database/Query/ColumnTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\Query;
-
+/**
+ * @internal
+ */
class ColumnTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/DataStorage/Database/Query/CountTest.php b/tests/DataStorage/Database/Query/CountTest.php
index 6ffae6832..8850fcd43 100644
--- a/tests/DataStorage/Database/Query/CountTest.php
+++ b/tests/DataStorage/Database/Query/CountTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\Query;
-
+/**
+ * @internal
+ */
class CountTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/DataStorage/Database/Query/ExpressionTest.php b/tests/DataStorage/Database/Query/ExpressionTest.php
index 8821475c6..b5249a2ea 100644
--- a/tests/DataStorage/Database/Query/ExpressionTest.php
+++ b/tests/DataStorage/Database/Query/ExpressionTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\Query;
-
+/**
+ * @internal
+ */
class ExpressionTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/DataStorage/Database/Query/FromTest.php b/tests/DataStorage/Database/Query/FromTest.php
index 2a38b54b7..7c824b046 100644
--- a/tests/DataStorage/Database/Query/FromTest.php
+++ b/tests/DataStorage/Database/Query/FromTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\Query;
-
+/**
+ * @internal
+ */
class FromTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/DataStorage/Database/Query/Grammar/GrammarTest.php b/tests/DataStorage/Database/Query/Grammar/GrammarTest.php
index e4296cd96..28ee36b3d 100644
--- a/tests/DataStorage/Database/Query/Grammar/GrammarTest.php
+++ b/tests/DataStorage/Database/Query/Grammar/GrammarTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\Query\Grammar;
use phpOMS\DataStorage\Database\Query\Grammar\Grammar;
+/**
+ * @internal
+ */
class GrammarTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
diff --git a/tests/DataStorage/Database/Query/Grammar/MicrosoftGrammarTest.php b/tests/DataStorage/Database/Query/Grammar/MicrosoftGrammarTest.php
index c76b59f03..dc7d707dd 100644
--- a/tests/DataStorage/Database/Query/Grammar/MicrosoftGrammarTest.php
+++ b/tests/DataStorage/Database/Query/Grammar/MicrosoftGrammarTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\Query\Grammar;
use phpOMS\DataStorage\Database\Query\Grammar\MicrosoftGrammar;
+/**
+ * @internal
+ */
class MicrosoftGrammarTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
diff --git a/tests/DataStorage/Database/Query/Grammar/MysqlGrammarTest.php b/tests/DataStorage/Database/Query/Grammar/MysqlGrammarTest.php
index 5c713db15..257df6b37 100644
--- a/tests/DataStorage/Database/Query/Grammar/MysqlGrammarTest.php
+++ b/tests/DataStorage/Database/Query/Grammar/MysqlGrammarTest.php
@@ -10,12 +10,16 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\Query\Grammar;
use phpOMS\DataStorage\Database\Query\Grammar\MysqlGrammar;
use phpOMS\Utils\TestUtils;
+/**
+ * @internal
+ */
class MysqlGrammarTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
diff --git a/tests/DataStorage/Database/Query/Grammar/OracleGrammarTest.php b/tests/DataStorage/Database/Query/Grammar/OracleGrammarTest.php
index c2d4d4fc4..877d57e7b 100644
--- a/tests/DataStorage/Database/Query/Grammar/OracleGrammarTest.php
+++ b/tests/DataStorage/Database/Query/Grammar/OracleGrammarTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\Query\Grammar;
use phpOMS\DataStorage\Database\Query\Grammar\OracleGrammar;
+/**
+ * @internal
+ */
class OracleGrammarTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
diff --git a/tests/DataStorage/Database/Query/Grammar/PostgresGrammarTest.php b/tests/DataStorage/Database/Query/Grammar/PostgresGrammarTest.php
index 3f942fba3..371c693c5 100644
--- a/tests/DataStorage/Database/Query/Grammar/PostgresGrammarTest.php
+++ b/tests/DataStorage/Database/Query/Grammar/PostgresGrammarTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\Query\Grammar;
use phpOMS\DataStorage\Database\Query\Grammar\PostgresGrammar;
+/**
+ * @internal
+ */
class PostgresGrammarTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
diff --git a/tests/DataStorage/Database/Query/Grammar/SQLiteGrammarTest.php b/tests/DataStorage/Database/Query/Grammar/SQLiteGrammarTest.php
index ea8dc7185..50487b01e 100644
--- a/tests/DataStorage/Database/Query/Grammar/SQLiteGrammarTest.php
+++ b/tests/DataStorage/Database/Query/Grammar/SQLiteGrammarTest.php
@@ -10,12 +10,16 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\Query\Grammar;
use phpOMS\DataStorage\Database\Query\Grammar\SQLiteGrammar;
use phpOMS\Utils\TestUtils;
+/**
+ * @internal
+ */
class SQLiteGrammarTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
diff --git a/tests/DataStorage/Database/Query/IntoTest.php b/tests/DataStorage/Database/Query/IntoTest.php
index 1863d23d5..d0868bef2 100644
--- a/tests/DataStorage/Database/Query/IntoTest.php
+++ b/tests/DataStorage/Database/Query/IntoTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\Query;
-
+/**
+ * @internal
+ */
class IntoTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/DataStorage/Database/Query/JoinTypeTest.php b/tests/DataStorage/Database/Query/JoinTypeTest.php
index e1762dde6..48102a613 100644
--- a/tests/DataStorage/Database/Query/JoinTypeTest.php
+++ b/tests/DataStorage/Database/Query/JoinTypeTest.php
@@ -10,16 +10,20 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\Query;
use phpOMS\DataStorage\Database\Query\JoinType;
+/**
+ * @internal
+ */
class JoinTypeTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(12, \count(JoinType::getConstants()));
+ self::assertCount(12, JoinType::getConstants());
self::assertEquals(JoinType::getConstants(), \array_unique(JoinType::getConstants()));
self::assertEquals('JOIN', JoinType::JOIN);
diff --git a/tests/DataStorage/Database/Query/QueryTypeTest.php b/tests/DataStorage/Database/Query/QueryTypeTest.php
index 4d148ac4d..09ce5ec72 100644
--- a/tests/DataStorage/Database/Query/QueryTypeTest.php
+++ b/tests/DataStorage/Database/Query/QueryTypeTest.php
@@ -10,16 +10,20 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\Query;
use phpOMS\DataStorage\Database\Query\QueryType;
+/**
+ * @internal
+ */
class QueryTypeTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(7, \count(QueryType::getConstants()));
+ self::assertCount(7, QueryType::getConstants());
self::assertEquals(QueryType::getConstants(), \array_unique(QueryType::getConstants()));
self::assertEquals(0, QueryType::SELECT);
diff --git a/tests/DataStorage/Database/Query/SelectTest.php b/tests/DataStorage/Database/Query/SelectTest.php
index 27da5b2e5..2e9f27e21 100644
--- a/tests/DataStorage/Database/Query/SelectTest.php
+++ b/tests/DataStorage/Database/Query/SelectTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\Query;
-
+/**
+ * @internal
+ */
class SelectTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/DataStorage/Database/Query/WhereTest.php b/tests/DataStorage/Database/Query/WhereTest.php
index 86e576804..c5c8e7817 100644
--- a/tests/DataStorage/Database/Query/WhereTest.php
+++ b/tests/DataStorage/Database/Query/WhereTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\Query;
-
+/**
+ * @internal
+ */
class WhereTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/DataStorage/Database/RelationTypeTest.php b/tests/DataStorage/Database/RelationTypeTest.php
index 434f2a8c8..24e7fd69e 100644
--- a/tests/DataStorage/Database/RelationTypeTest.php
+++ b/tests/DataStorage/Database/RelationTypeTest.php
@@ -10,16 +10,20 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database;
use phpOMS\DataStorage\Database\RelationType;
+/**
+ * @internal
+ */
class RelationTypeTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(7, \count(RelationType::getConstants()));
+ self::assertCount(7, RelationType::getConstants());
self::assertEquals(1, RelationType::NONE);
self::assertEquals(2, RelationType::NEWEST);
self::assertEquals(4, RelationType::BELONGS_TO);
diff --git a/tests/DataStorage/Database/Schema/BuilderTest.php b/tests/DataStorage/Database/Schema/BuilderTest.php
index c63027f0d..1642261b8 100644
--- a/tests/DataStorage/Database/Schema/BuilderTest.php
+++ b/tests/DataStorage/Database/Schema/BuilderTest.php
@@ -10,12 +10,16 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\Schema;
use phpOMS\DataStorage\Database\Connection\MysqlConnection;
use phpOMS\DataStorage\Database\Schema\Builder;
+/**
+ * @internal
+ */
class BuilderTest extends \PHPUnit\Framework\TestCase
{
protected $con = null;
diff --git a/tests/DataStorage/Database/Schema/Exception/TableExceptionTest.php b/tests/DataStorage/Database/Schema/Exception/TableExceptionTest.php
index a67521f08..3acdb6c2d 100644
--- a/tests/DataStorage/Database/Schema/Exception/TableExceptionTest.php
+++ b/tests/DataStorage/Database/Schema/Exception/TableExceptionTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\Schema\Exception;
-
+/**
+ * @internal
+ */
class TableExceptionTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/DataStorage/Database/Schema/Grammar/GrammarTest.php b/tests/DataStorage/Database/Schema/Grammar/GrammarTest.php
index 1fd4766ef..2bb52823b 100644
--- a/tests/DataStorage/Database/Schema/Grammar/GrammarTest.php
+++ b/tests/DataStorage/Database/Schema/Grammar/GrammarTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\Schema\Grammar;
use phpOMS\DataStorage\Database\Schema\Grammar\Grammar;
+/**
+ * @internal
+ */
class GrammarTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
diff --git a/tests/DataStorage/Database/Schema/Grammar/MysqlGrammarTest.php b/tests/DataStorage/Database/Schema/Grammar/MysqlGrammarTest.php
index 9a3f44603..14e504eba 100644
--- a/tests/DataStorage/Database/Schema/Grammar/MysqlGrammarTest.php
+++ b/tests/DataStorage/Database/Schema/Grammar/MysqlGrammarTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\Schema\Grammar;
@@ -19,6 +20,9 @@ use phpOMS\DataStorage\Database\Schema\Grammar\MysqlGrammar;
use phpOMS\Utils\ArrayUtils;
use phpOMS\Utils\TestUtils;
+/**
+ * @internal
+ */
class MysqlGrammarTest extends \PHPUnit\Framework\TestCase
{
protected $con = null;
diff --git a/tests/DataStorage/Database/Schema/Grammar/OracleGrammarTest.php b/tests/DataStorage/Database/Schema/Grammar/OracleGrammarTest.php
index 7b00998fd..b00b82878 100644
--- a/tests/DataStorage/Database/Schema/Grammar/OracleGrammarTest.php
+++ b/tests/DataStorage/Database/Schema/Grammar/OracleGrammarTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\Schema\Grammar;
use phpOMS\DataStorage\Database\Schema\Grammar\OracleGrammar;
+/**
+ * @internal
+ */
class OracleGrammarTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
diff --git a/tests/DataStorage/Database/Schema/Grammar/PostgresGrammarTest.php b/tests/DataStorage/Database/Schema/Grammar/PostgresGrammarTest.php
index b07959e3b..ce14bf3fe 100644
--- a/tests/DataStorage/Database/Schema/Grammar/PostgresGrammarTest.php
+++ b/tests/DataStorage/Database/Schema/Grammar/PostgresGrammarTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\Schema\Grammar;
use phpOMS\DataStorage\Database\Schema\Grammar\PostgresGrammar;
+/**
+ * @internal
+ */
class PostgresGrammarTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
diff --git a/tests/DataStorage/Database/Schema/Grammar/SQLiteGrammarTest.php b/tests/DataStorage/Database/Schema/Grammar/SQLiteGrammarTest.php
index 2cd512742..a405acaa6 100644
--- a/tests/DataStorage/Database/Schema/Grammar/SQLiteGrammarTest.php
+++ b/tests/DataStorage/Database/Schema/Grammar/SQLiteGrammarTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\Schema\Grammar;
use phpOMS\DataStorage\Database\Schema\Grammar\SQLiteGrammar;
use phpOMS\Utils\TestUtils;
+/**
+ * @internal
+ */
class SQLiteGrammarTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
diff --git a/tests/DataStorage/Database/Schema/Grammar/SqlServerGrammarTest.php b/tests/DataStorage/Database/Schema/Grammar/SqlServerGrammarTest.php
index 70a5110be..dde8ff605 100644
--- a/tests/DataStorage/Database/Schema/Grammar/SqlServerGrammarTest.php
+++ b/tests/DataStorage/Database/Schema/Grammar/SqlServerGrammarTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\Schema\Grammar;
use phpOMS\DataStorage\Database\Schema\Grammar\SqlServerGrammar;
+/**
+ * @internal
+ */
class SqlServerGrammarTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
diff --git a/tests/DataStorage/Database/Schema/QueryTypeTest.php b/tests/DataStorage/Database/Schema/QueryTypeTest.php
index 388f1f606..45061243f 100644
--- a/tests/DataStorage/Database/Schema/QueryTypeTest.php
+++ b/tests/DataStorage/Database/Schema/QueryTypeTest.php
@@ -10,16 +10,20 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\Schema;
use phpOMS\DataStorage\Database\Schema\QueryType;
+/**
+ * @internal
+ */
class QueryTypeTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(13, \count(QueryType::getConstants()));
+ self::assertCount(13, QueryType::getConstants());
self::assertEquals(QueryType::getConstants(), \array_unique(QueryType::getConstants()));
self::assertEquals(128, QueryType::DROP_DATABASE);
diff --git a/tests/DataStorage/Database/TestModel/BaseModel.php b/tests/DataStorage/Database/TestModel/BaseModel.php
index f99749e46..67c99da40 100644
--- a/tests/DataStorage/Database/TestModel/BaseModel.php
+++ b/tests/DataStorage/Database/TestModel/BaseModel.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\TestModel;
@@ -60,7 +61,7 @@ class BaseModel
$this->ownsOneSelf = new OwnsOneModel();
$this->belongsToOne = new BelongsToModel();
- $this->serializable = new class implements \Serializable {
+ $this->serializable = new class() implements \Serializable {
public function serialize()
{
return '123';
@@ -72,7 +73,7 @@ class BaseModel
}
};
- $this->jsonSerializable = new class implements \JsonSerializable {
+ $this->jsonSerializable = new class() implements \JsonSerializable {
public function jsonSerialize()
{
return [1, 2, 3];
diff --git a/tests/DataStorage/Database/TestModel/BelongsToModel.php b/tests/DataStorage/Database/TestModel/BelongsToModel.php
index 4f0d6b11e..2afe2c7c7 100644
--- a/tests/DataStorage/Database/TestModel/BelongsToModel.php
+++ b/tests/DataStorage/Database/TestModel/BelongsToModel.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\TestModel;
diff --git a/tests/DataStorage/Database/TestModel/ManyToManyDirectModel.php b/tests/DataStorage/Database/TestModel/ManyToManyDirectModel.php
index b8d9d52b6..a00ac07b3 100644
--- a/tests/DataStorage/Database/TestModel/ManyToManyDirectModel.php
+++ b/tests/DataStorage/Database/TestModel/ManyToManyDirectModel.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\TestModel;
diff --git a/tests/DataStorage/Database/TestModel/ManyToManyRelModel.php b/tests/DataStorage/Database/TestModel/ManyToManyRelModel.php
index 0dfb33cfc..9905bbf2a 100644
--- a/tests/DataStorage/Database/TestModel/ManyToManyRelModel.php
+++ b/tests/DataStorage/Database/TestModel/ManyToManyRelModel.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\TestModel;
diff --git a/tests/DataStorage/Database/TestModel/NullBaseModel.php b/tests/DataStorage/Database/TestModel/NullBaseModel.php
index f549e85b8..d2ecc388b 100644
--- a/tests/DataStorage/Database/TestModel/NullBaseModel.php
+++ b/tests/DataStorage/Database/TestModel/NullBaseModel.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\TestModel;
diff --git a/tests/DataStorage/Database/TestModel/NullBelongsToModel.php b/tests/DataStorage/Database/TestModel/NullBelongsToModel.php
index 70e937156..9ae61822a 100644
--- a/tests/DataStorage/Database/TestModel/NullBelongsToModel.php
+++ b/tests/DataStorage/Database/TestModel/NullBelongsToModel.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\TestModel;
diff --git a/tests/DataStorage/Database/TestModel/NullManyToManyDirectModel.php b/tests/DataStorage/Database/TestModel/NullManyToManyDirectModel.php
index 5f09dd1a2..95cc205b0 100644
--- a/tests/DataStorage/Database/TestModel/NullManyToManyDirectModel.php
+++ b/tests/DataStorage/Database/TestModel/NullManyToManyDirectModel.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\TestModel;
diff --git a/tests/DataStorage/Database/TestModel/NullManyToManyRelModel.php b/tests/DataStorage/Database/TestModel/NullManyToManyRelModel.php
index cbddd09af..ec9496998 100644
--- a/tests/DataStorage/Database/TestModel/NullManyToManyRelModel.php
+++ b/tests/DataStorage/Database/TestModel/NullManyToManyRelModel.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\TestModel;
diff --git a/tests/DataStorage/Database/TestModel/NullOwnsOneModel.php b/tests/DataStorage/Database/TestModel/NullOwnsOneModel.php
index a3ec32f16..050969f43 100644
--- a/tests/DataStorage/Database/TestModel/NullOwnsOneModel.php
+++ b/tests/DataStorage/Database/TestModel/NullOwnsOneModel.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\TestModel;
diff --git a/tests/DataStorage/Database/TestModel/OwnsOneModel.php b/tests/DataStorage/Database/TestModel/OwnsOneModel.php
index 2cc8ca06c..72ea877b1 100644
--- a/tests/DataStorage/Database/TestModel/OwnsOneModel.php
+++ b/tests/DataStorage/Database/TestModel/OwnsOneModel.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database\TestModel;
diff --git a/tests/DataStorage/File/JsonBuilderTest.php b/tests/DataStorage/File/JsonBuilderTest.php
index a9a0b41ef..6aebb5af6 100644
--- a/tests/DataStorage/File/JsonBuilderTest.php
+++ b/tests/DataStorage/File/JsonBuilderTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\File;
use phpOMS\DataStorage\File\JsonBuilder;
+/**
+ * @internal
+ */
class JsonBuilderTest extends \PHPUnit\Framework\TestCase
{
private $table1 = [];
@@ -142,4 +146,4 @@ class JsonBuilderTest extends \PHPUnit\Framework\TestCase
$query = new JsonBuilder(true);
$query->orderBy(null, 'DESC');
}
-}
\ No newline at end of file
+}
diff --git a/tests/DataStorage/LockExceptionTest.php b/tests/DataStorage/LockExceptionTest.php
index 963c1f791..55af255bd 100644
--- a/tests/DataStorage/LockExceptionTest.php
+++ b/tests/DataStorage/LockExceptionTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage;
@@ -17,6 +18,9 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\DataStorage\LockException;
+/**
+ * @internal
+ */
class LockExceptionTest extends \PHPUnit\Framework\TestCase
{
public function testException() : void
diff --git a/tests/DataStorage/Session/HttpSessionTest.php b/tests/DataStorage/Session/HttpSessionTest.php
index 40c990fe7..bfb91ae3f 100644
--- a/tests/DataStorage/Session/HttpSessionTest.php
+++ b/tests/DataStorage/Session/HttpSessionTest.php
@@ -10,17 +10,21 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Session;
use phpOMS\DataStorage\Session\HttpSession;
+/**
+ * @internal
+ */
class HttpSessionTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
{
$session = new HttpSession();
- self::assertEquals(null, $session->get('key'));
+ self::assertNull($session->get('key'));
self::assertFalse($session->isLocked());
}
diff --git a/tests/Dispatcher/DispatcherTest.php b/tests/Dispatcher/DispatcherTest.php
index 5691ede43..27dfb3395 100644
--- a/tests/Dispatcher/DispatcherTest.php
+++ b/tests/Dispatcher/DispatcherTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Dispatcher;
@@ -23,13 +24,16 @@ use phpOMS\Uri\Http;
require_once __DIR__ . '/../Autoloader.php';
+/**
+ * @internal
+ */
class DispatcherTest extends \PHPUnit\Framework\TestCase
{
protected $app = null;
protected function setUp() : void
{
- $this->app = new class extends ApplicationAbstract { protected $appName = 'Api'; };
+ $this->app = new class() extends ApplicationAbstract { protected $appName = 'Api'; };
$this->app->router = new Router();
$this->app->dispatcher = new Dispatcher($this->app);
}
diff --git a/tests/Dispatcher/TestController.php b/tests/Dispatcher/TestController.php
index 8612cb5a4..7e979b48a 100644
--- a/tests/Dispatcher/TestController.php
+++ b/tests/Dispatcher/TestController.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Dispatcher;
class TestController
diff --git a/tests/Event/EventManagerTest.php b/tests/Event/EventManagerTest.php
index 384f18acf..3b811e17c 100644
--- a/tests/Event/EventManagerTest.php
+++ b/tests/Event/EventManagerTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Event;
@@ -17,6 +18,9 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Event\EventManager;
+/**
+ * @internal
+ */
class EventManagerTest extends \PHPUnit\Framework\TestCase
{
public function testAttributes() : void
diff --git a/tests/Event/events.php b/tests/Event/events.php
index 1f23b091a..5e3f4f6b7 100644
--- a/tests/Event/events.php
+++ b/tests/Event/events.php
@@ -1,4 +1,5 @@
- [
'callback' => [
0 => function($v1, $v2, $v3) : void {},
@@ -10,4 +11,4 @@
0 => function($v4) : void {},
],
],
-];
\ No newline at end of file
+];
diff --git a/tests/ExtensionTest.php b/tests/ExtensionTest.php
index 65e09604d..6939dac89 100644
--- a/tests/ExtensionTest.php
+++ b/tests/ExtensionTest.php
@@ -10,9 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests;
+/**
+ * @internal
+ */
class ExtensionTest extends \PHPUnit\Framework\TestCase
{
public function testExtensionMbstring() : void
diff --git a/tests/Localization/Defaults/CityMapperTest.php b/tests/Localization/Defaults/CityMapperTest.php
index 3c7966ba5..42acdca59 100644
--- a/tests/Localization/Defaults/CityMapperTest.php
+++ b/tests/Localization/Defaults/CityMapperTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Localization\Defaults;
@@ -19,6 +20,9 @@ use phpOMS\DataStorage\Database\Connection\SQLiteConnection;
use phpOMS\DataStorage\Database\DataMapperAbstract;
use phpOMS\Localization\Defaults\CityMapper;
+/**
+ * @internal
+ */
class CityMapperTest extends \PHPUnit\Framework\TestCase
{
public static function setUpBeforeClass() : void
diff --git a/tests/Localization/Defaults/CityTest.php b/tests/Localization/Defaults/CityTest.php
index a210e3e4c..2b2630d1d 100644
--- a/tests/Localization/Defaults/CityTest.php
+++ b/tests/Localization/Defaults/CityTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Localization\Defaults;
@@ -17,6 +18,9 @@ require_once __DIR__ . '/../../Autoloader.php';
use phpOMS\Localization\Defaults\City;
+/**
+ * @internal
+ */
class CityTest extends \PHPUnit\Framework\TestCase
{
public function testDefaults() : void
diff --git a/tests/Localization/Defaults/CountryMapperTest.php b/tests/Localization/Defaults/CountryMapperTest.php
index ccfc366ad..c200cb642 100644
--- a/tests/Localization/Defaults/CountryMapperTest.php
+++ b/tests/Localization/Defaults/CountryMapperTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Localization\Defaults;
@@ -19,6 +20,9 @@ use phpOMS\DataStorage\Database\Connection\SQLiteConnection;
use phpOMS\DataStorage\Database\DataMapperAbstract;
use phpOMS\Localization\Defaults\CountryMapper;
+/**
+ * @internal
+ */
class CountryMapperTest extends \PHPUnit\Framework\TestCase
{
public static function setUpBeforeClass() : void
diff --git a/tests/Localization/Defaults/CountryTest.php b/tests/Localization/Defaults/CountryTest.php
index 36e447d6f..c27b1e406 100644
--- a/tests/Localization/Defaults/CountryTest.php
+++ b/tests/Localization/Defaults/CountryTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Localization\Defaults;
@@ -17,6 +18,9 @@ require_once __DIR__ . '/../../Autoloader.php';
use phpOMS\Localization\Defaults\Country;
+/**
+ * @internal
+ */
class CountryTest extends \PHPUnit\Framework\TestCase
{
public function testDefaults() : void
diff --git a/tests/Localization/Defaults/CurrencyMapperTest.php b/tests/Localization/Defaults/CurrencyMapperTest.php
index ae7ca880c..730cf23ee 100644
--- a/tests/Localization/Defaults/CurrencyMapperTest.php
+++ b/tests/Localization/Defaults/CurrencyMapperTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Localization\Defaults;
@@ -19,6 +20,9 @@ use phpOMS\DataStorage\Database\Connection\SQLiteConnection;
use phpOMS\DataStorage\Database\DataMapperAbstract;
use phpOMS\Localization\Defaults\CurrencyMapper;
+/**
+ * @internal
+ */
class CurrencyMapperTest extends \PHPUnit\Framework\TestCase
{
public static function setUpBeforeClass() : void
diff --git a/tests/Localization/Defaults/CurrencyTest.php b/tests/Localization/Defaults/CurrencyTest.php
index 46a1e9d6b..84c46ac8b 100644
--- a/tests/Localization/Defaults/CurrencyTest.php
+++ b/tests/Localization/Defaults/CurrencyTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Localization\Defaults;
@@ -17,6 +18,9 @@ require_once __DIR__ . '/../../Autoloader.php';
use phpOMS\Localization\Defaults\Currency;
+/**
+ * @internal
+ */
class CurrencyTest extends \PHPUnit\Framework\TestCase
{
public function testDefaults() : void
diff --git a/tests/Localization/Defaults/IbanMapperTest.php b/tests/Localization/Defaults/IbanMapperTest.php
index bde0b499c..85b549302 100644
--- a/tests/Localization/Defaults/IbanMapperTest.php
+++ b/tests/Localization/Defaults/IbanMapperTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Localization\Defaults;
@@ -19,6 +20,9 @@ use phpOMS\DataStorage\Database\Connection\SQLiteConnection;
use phpOMS\DataStorage\Database\DataMapperAbstract;
use phpOMS\Localization\Defaults\IbanMapper;
+/**
+ * @internal
+ */
class IbanMapperTest extends \PHPUnit\Framework\TestCase
{
public static function setUpBeforeClass() : void
diff --git a/tests/Localization/Defaults/IbanTest.php b/tests/Localization/Defaults/IbanTest.php
index 8e08c15f3..812cd9002 100644
--- a/tests/Localization/Defaults/IbanTest.php
+++ b/tests/Localization/Defaults/IbanTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Localization\Defaults;
@@ -17,6 +18,9 @@ require_once __DIR__ . '/../../Autoloader.php';
use phpOMS\Localization\Defaults\Iban;
+/**
+ * @internal
+ */
class IbanTest extends \PHPUnit\Framework\TestCase
{
public function testDefaults() : void
diff --git a/tests/Localization/Defaults/LanguageMapperTest.php b/tests/Localization/Defaults/LanguageMapperTest.php
index c3187b798..c03a27750 100644
--- a/tests/Localization/Defaults/LanguageMapperTest.php
+++ b/tests/Localization/Defaults/LanguageMapperTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Localization\Defaults;
@@ -19,6 +20,9 @@ use phpOMS\DataStorage\Database\Connection\SQLiteConnection;
use phpOMS\DataStorage\Database\DataMapperAbstract;
use phpOMS\Localization\Defaults\LanguageMapper;
+/**
+ * @internal
+ */
class LanguageMapperTest extends \PHPUnit\Framework\TestCase
{
public static function setUpBeforeClass() : void
diff --git a/tests/Localization/Defaults/LanguageTest.php b/tests/Localization/Defaults/LanguageTest.php
index d3932d8a4..f6dbd38e1 100644
--- a/tests/Localization/Defaults/LanguageTest.php
+++ b/tests/Localization/Defaults/LanguageTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Localization\Defaults;
@@ -17,6 +18,9 @@ require_once __DIR__ . '/../../Autoloader.php';
use phpOMS\Localization\Defaults\Language;
+/**
+ * @internal
+ */
class LanguageTest extends \PHPUnit\Framework\TestCase
{
public function testDefaults() : void
diff --git a/tests/Localization/ISO3166CharEnumTest.php b/tests/Localization/ISO3166CharEnumTest.php
index df7e30c10..ee0bb8150 100644
--- a/tests/Localization/ISO3166CharEnumTest.php
+++ b/tests/Localization/ISO3166CharEnumTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Localization;
@@ -17,6 +18,9 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Localization\ISO3166CharEnum;
+/**
+ * @internal
+ */
class ISO3166CharEnumTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
diff --git a/tests/Localization/ISO3166NameEnumTest.php b/tests/Localization/ISO3166NameEnumTest.php
index 96772c246..a0b9cf5c6 100644
--- a/tests/Localization/ISO3166NameEnumTest.php
+++ b/tests/Localization/ISO3166NameEnumTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Localization;
@@ -17,6 +18,9 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Localization\ISO3166NameEnum;
+/**
+ * @internal
+ */
class ISO3166NameEnumTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
diff --git a/tests/Localization/ISO3166NumEnumTest.php b/tests/Localization/ISO3166NumEnumTest.php
index 3b27bcdbf..b98daf08f 100644
--- a/tests/Localization/ISO3166NumEnumTest.php
+++ b/tests/Localization/ISO3166NumEnumTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Localization;
@@ -17,6 +18,9 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Localization\ISO3166NumEnum;
+/**
+ * @internal
+ */
class ISO3166NumEnumTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
diff --git a/tests/Localization/ISO3166TwoEnumTest.php b/tests/Localization/ISO3166TwoEnumTest.php
index d6e81d825..fd415f7f2 100644
--- a/tests/Localization/ISO3166TwoEnumTest.php
+++ b/tests/Localization/ISO3166TwoEnumTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Localization;
@@ -17,6 +18,9 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Localization\ISO3166TwoEnum;
+/**
+ * @internal
+ */
class ISO3166TwoEnumTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
diff --git a/tests/Localization/ISO4217CharEnumTest.php b/tests/Localization/ISO4217CharEnumTest.php
index cb6dae589..fe7d6b966 100644
--- a/tests/Localization/ISO4217CharEnumTest.php
+++ b/tests/Localization/ISO4217CharEnumTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Localization;
@@ -17,6 +18,9 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Localization\ISO4217CharEnum;
+/**
+ * @internal
+ */
class ISO4217CharEnumTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
diff --git a/tests/Localization/ISO4217DecimalEnumTest.php b/tests/Localization/ISO4217DecimalEnumTest.php
index b16f012fb..275a0907c 100644
--- a/tests/Localization/ISO4217DecimalEnumTest.php
+++ b/tests/Localization/ISO4217DecimalEnumTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Localization;
@@ -17,6 +18,9 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Localization\ISO4217DecimalEnum;
+/**
+ * @internal
+ */
class ISO4217DecimalEnumTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
diff --git a/tests/Localization/ISO4217EnumTest.php b/tests/Localization/ISO4217EnumTest.php
index 2a5e1efe3..b67934004 100644
--- a/tests/Localization/ISO4217EnumTest.php
+++ b/tests/Localization/ISO4217EnumTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Localization;
@@ -17,6 +18,9 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Localization\ISO4217Enum;
+/**
+ * @internal
+ */
class ISO4217EnumTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
diff --git a/tests/Localization/ISO4217NumEnumTest.php b/tests/Localization/ISO4217NumEnumTest.php
index f24068133..ebf012f2d 100644
--- a/tests/Localization/ISO4217NumEnumTest.php
+++ b/tests/Localization/ISO4217NumEnumTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Localization;
@@ -17,6 +18,9 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Localization\ISO4217NumEnum;
+/**
+ * @internal
+ */
class ISO4217NumEnumTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
diff --git a/tests/Localization/ISO4217SubUnitEnumTest.php b/tests/Localization/ISO4217SubUnitEnumTest.php
index 032814945..095a7ee7f 100644
--- a/tests/Localization/ISO4217SubUnitEnumTest.php
+++ b/tests/Localization/ISO4217SubUnitEnumTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Localization;
@@ -17,6 +18,9 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Localization\ISO4217SubUnitEnum;
+/**
+ * @internal
+ */
class ISO4217SubUnitEnumTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
diff --git a/tests/Localization/ISO4217SymbolEnumTest.php b/tests/Localization/ISO4217SymbolEnumTest.php
index a3641450b..f80aa4242 100644
--- a/tests/Localization/ISO4217SymbolEnumTest.php
+++ b/tests/Localization/ISO4217SymbolEnumTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Localization;
@@ -17,11 +18,14 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Localization\ISO4217SymbolEnum;
+/**
+ * @internal
+ */
class ISO4217SymbolEnumTest extends \PHPUnit\Framework\TestCase
{
public function testEnum() : void
{
$enum = ISO4217SymbolEnum::getConstants();
- self::assertEquals(109, \count($enum));
+ self::assertCount(109, $enum);
}
}
diff --git a/tests/Localization/ISO639EnumTest.php b/tests/Localization/ISO639EnumTest.php
index b395ad4cc..ca441ea96 100644
--- a/tests/Localization/ISO639EnumTest.php
+++ b/tests/Localization/ISO639EnumTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Localization;
@@ -17,6 +18,9 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Localization\ISO639Enum;
+/**
+ * @internal
+ */
class ISO639EnumTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
diff --git a/tests/Localization/ISO639x1EnumTest.php b/tests/Localization/ISO639x1EnumTest.php
index f9ee06478..56ee4e9d5 100644
--- a/tests/Localization/ISO639x1EnumTest.php
+++ b/tests/Localization/ISO639x1EnumTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Localization;
@@ -17,6 +18,9 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Localization\ISO639x1Enum;
+/**
+ * @internal
+ */
class ISO639x1EnumTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
diff --git a/tests/Localization/ISO639x2EnumTest.php b/tests/Localization/ISO639x2EnumTest.php
index 5226665ee..05c23f59e 100644
--- a/tests/Localization/ISO639x2EnumTest.php
+++ b/tests/Localization/ISO639x2EnumTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Localization;
@@ -17,6 +18,9 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Localization\ISO639x2Enum;
+/**
+ * @internal
+ */
class ISO639x2EnumTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
diff --git a/tests/Localization/ISO8601EnumArrayTest.php b/tests/Localization/ISO8601EnumArrayTest.php
index 61c1977d0..78e055823 100644
--- a/tests/Localization/ISO8601EnumArrayTest.php
+++ b/tests/Localization/ISO8601EnumArrayTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Localization;
@@ -17,10 +18,13 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Localization\ISO8601EnumArray;
+/**
+ * @internal
+ */
class ISO8601EnumArrayTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(4, \count(ISO8601EnumArray::getConstants()));
+ self::assertCount(4, ISO8601EnumArray::getConstants());
}
}
diff --git a/tests/Localization/L11nManagerTest.php b/tests/Localization/L11nManagerTest.php
index 9af6f1d1f..63902e643 100644
--- a/tests/Localization/L11nManagerTest.php
+++ b/tests/Localization/L11nManagerTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Localization;
@@ -17,6 +18,9 @@ use phpOMS\Localization\L11nManager;
require_once __DIR__ . '/../Autoloader.php';
+/**
+ * @internal
+ */
class L11nManagerTest extends \PHPUnit\Framework\TestCase
{
public function testAttributes() : void
@@ -42,9 +46,9 @@ class L11nManagerTest extends \PHPUnit\Framework\TestCase
$expected = [
'en' => [
'Admin' => [
- 'Test' => 'Test string'
- ]
- ]
+ 'Test' => 'Test string',
+ ],
+ ],
];
$localization = new L11nManager('Api');
@@ -56,17 +60,17 @@ class L11nManagerTest extends \PHPUnit\Framework\TestCase
$expected = [
'en' => [
'Admin' => [
- 'Test' => 'Test string'
- ]
- ]
+ 'Test' => 'Test string',
+ ],
+ ],
];
$expected2 = [
'en' => [
'Admin' => [
- 'Test2' => 'Test strin&g2'
- ]
- ]
+ 'Test2' => 'Test strin&g2',
+ ],
+ ],
];
$l11nManager = new L11nManager('Api');
diff --git a/tests/Localization/LocalizationTest.php b/tests/Localization/LocalizationTest.php
index 1452f80af..c57d698a3 100644
--- a/tests/Localization/LocalizationTest.php
+++ b/tests/Localization/LocalizationTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Localization;
@@ -25,6 +26,9 @@ use phpOMS\Utils\Converter\TemperatureType;
require_once __DIR__ . '/../Autoloader.php';
+/**
+ * @internal
+ */
class LocalizationTest extends \PHPUnit\Framework\TestCase
{
protected $l11nManager = null;
diff --git a/tests/Localization/MoneyTest.php b/tests/Localization/MoneyTest.php
index f71b87f42..ed9f3ea50 100644
--- a/tests/Localization/MoneyTest.php
+++ b/tests/Localization/MoneyTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Localization;
@@ -20,6 +21,8 @@ use phpOMS\Localization\Money;
/**
* @testdox phpOMS\Localization\Money: Money datatype for internal representation of money
+ *
+ * @internal
*/
class MoneyTest extends \PHPUnit\Framework\TestCase
{
diff --git a/tests/Localization/PhoneEnumTest.php b/tests/Localization/PhoneEnumTest.php
index fb350c688..847a7ecf5 100644
--- a/tests/Localization/PhoneEnumTest.php
+++ b/tests/Localization/PhoneEnumTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Localization;
@@ -17,6 +18,9 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Localization\PhoneEnum;
+/**
+ * @internal
+ */
class PhoneEnumTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
@@ -26,7 +30,7 @@ class PhoneEnumTest extends \PHPUnit\Framework\TestCase
$countryCodes = PhoneEnum::getConstants();
foreach ($countryCodes as $code) {
- if (\strlen($code) < 0 || $code > 9999) {
+ if ($code < 0 || $code > 9999) {
$ok = false;
break;
}
diff --git a/tests/Localization/TimeZoneEnumArrayTest.php b/tests/Localization/TimeZoneEnumArrayTest.php
index c63072545..69ba9abad 100644
--- a/tests/Localization/TimeZoneEnumArrayTest.php
+++ b/tests/Localization/TimeZoneEnumArrayTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Localization;
@@ -17,6 +18,9 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Localization\TimeZoneEnumArray;
+/**
+ * @internal
+ */
class TimeZoneEnumArrayTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
diff --git a/tests/Localization/langTestFile.php b/tests/Localization/langTestFile.php
index 9100d2c8e..a0c7e1059 100644
--- a/tests/Localization/langTestFile.php
+++ b/tests/Localization/langTestFile.php
@@ -1,6 +1,6 @@
- [
- 'key' => 'value'
- ]
+ 'key' => 'value',
+ ],
];
diff --git a/tests/Log/FileLoggerTest.php b/tests/Log/FileLoggerTest.php
index efc936ec0..213c2a71a 100644
--- a/tests/Log/FileLoggerTest.php
+++ b/tests/Log/FileLoggerTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Log;
@@ -18,6 +19,9 @@ use phpOMS\Log\LogLevel;
require_once __DIR__ . '/../Autoloader.php';
+/**
+ * @internal
+ */
class FileLoggerTest extends \PHPUnit\Framework\TestCase
{
public function testAttributes() : void
diff --git a/tests/Log/LogLevelTest.php b/tests/Log/LogLevelTest.php
index 653d4447a..03e922393 100644
--- a/tests/Log/LogLevelTest.php
+++ b/tests/Log/LogLevelTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Log;
@@ -17,11 +18,14 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Log\LogLevel;
+/**
+ * @internal
+ */
class LogLevelTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(8, \count(LogLevel::getConstants()));
+ self::assertCount(8, LogLevel::getConstants());
self::assertEquals('emergency', LogLevel::EMERGENCY);
self::assertEquals('alert', LogLevel::ALERT);
self::assertEquals('critical', LogLevel::CRITICAL);
diff --git a/tests/Math/Exception/ZeroDevisionExceptionTest.php b/tests/Math/Exception/ZeroDevisionExceptionTest.php
index 633364651..3f886f928 100644
--- a/tests/Math/Exception/ZeroDevisionExceptionTest.php
+++ b/tests/Math/Exception/ZeroDevisionExceptionTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Exception;
use phpOMS\Math\Exception\ZeroDevisionException;
+/**
+ * @internal
+ */
class ZeroDevisionExceptionTest extends \PHPUnit\Framework\TestCase
{
public function testException() : void
diff --git a/tests/Math/Functions/FibunacciTest.php b/tests/Math/Functions/FibunacciTest.php
index ab58df811..14430aecb 100644
--- a/tests/Math/Functions/FibunacciTest.php
+++ b/tests/Math/Functions/FibunacciTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Functions;
use phpOMS\Math\Functions\Fibunacci;
+/**
+ * @internal
+ */
class FibunacciTest extends \PHPUnit\Framework\TestCase
{
public function testFibunacci() : void
diff --git a/tests/Math/Functions/FunctionsTest.php b/tests/Math/Functions/FunctionsTest.php
index beff62c6d..57ae8bacc 100644
--- a/tests/Math/Functions/FunctionsTest.php
+++ b/tests/Math/Functions/FunctionsTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Functions;
use phpOMS\Math\Functions\Functions;
+/**
+ * @internal
+ */
class FunctionsTest extends \PHPUnit\Framework\TestCase
{
public function testFactorial() : void
diff --git a/tests/Math/Functions/GammaTest.php b/tests/Math/Functions/GammaTest.php
index 6c447e07b..90f272243 100644
--- a/tests/Math/Functions/GammaTest.php
+++ b/tests/Math/Functions/GammaTest.php
@@ -10,12 +10,16 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Functions;
use phpOMS\Math\Functions\Functions;
use phpOMS\Math\Functions\Gamma;
+/**
+ * @internal
+ */
class GammaTest extends \PHPUnit\Framework\TestCase
{
public function testFactorial() : void
@@ -37,7 +41,7 @@ class GammaTest extends \PHPUnit\Framework\TestCase
2.67893853, 1.35411794, 1.00000000, 0.89297951, 0.90274529, 1.00000000, 1.19063935, 1.50457549, 2.00000000, 2.77815848,
];
- for ($i = 1; $i <= 10; $i++) {
+ for ($i = 1; $i <= 10; ++$i) {
self::assertEqualsWithDelta($stirling[$i - 1], Gamma::stirlingApproximation($i / 3), 0.01);
self::assertEqualsWithDelta($spouge[$i - 1], Gamma::spougeApproximation($i / 3), 0.01);
self::assertEqualsWithDelta($gsl[$i - 1], Gamma::lanczosApproximationReal($i / 3), 0.01);
diff --git a/tests/Math/Geometry/ConvexHull/MonotoneChainTest.php b/tests/Math/Geometry/ConvexHull/MonotoneChainTest.php
index 268fceb69..ef1d10186 100644
--- a/tests/Math/Geometry/ConvexHull/MonotoneChainTest.php
+++ b/tests/Math/Geometry/ConvexHull/MonotoneChainTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Geometry\ConvexHull;
use phpOMS\Math\Geometry\ConvexHull\MonotoneChain;
+/**
+ * @internal
+ */
class MonotoneChainTest extends \PHPUnit\Framework\TestCase
{
public function testMonotoneChain() : void
diff --git a/tests/Math/Geometry/Shape/D2/CircleTest.php b/tests/Math/Geometry/Shape/D2/CircleTest.php
index 39c6d1101..f0ab82934 100644
--- a/tests/Math/Geometry/Shape/D2/CircleTest.php
+++ b/tests/Math/Geometry/Shape/D2/CircleTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Geometry\Shape\D2;
use phpOMS\Math\Geometry\Shape\D2\Circle;
+/**
+ * @internal
+ */
class CircleTest extends \PHPUnit\Framework\TestCase
{
public function testCircle() : void
diff --git a/tests/Math/Geometry/Shape/D2/EllipseTest.php b/tests/Math/Geometry/Shape/D2/EllipseTest.php
index e91f16e97..786daf32a 100644
--- a/tests/Math/Geometry/Shape/D2/EllipseTest.php
+++ b/tests/Math/Geometry/Shape/D2/EllipseTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Geometry\Shape\D2;
use phpOMS\Math\Geometry\Shape\D2\Ellipse;
+/**
+ * @internal
+ */
class EllipseTest extends \PHPUnit\Framework\TestCase
{
public function testEllipse() : void
diff --git a/tests/Math/Geometry/Shape/D2/PolygonTest.php b/tests/Math/Geometry/Shape/D2/PolygonTest.php
index e6ce731e3..4dfa83d0b 100644
--- a/tests/Math/Geometry/Shape/D2/PolygonTest.php
+++ b/tests/Math/Geometry/Shape/D2/PolygonTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Geometry\Shape\D2;
use phpOMS\Math\Geometry\Shape\D2\Polygon;
+/**
+ * @internal
+ */
class PolygonTest extends \PHPUnit\Framework\TestCase
{
public function testPoint() : void
diff --git a/tests/Math/Geometry/Shape/D2/QuadrilateralTest.php b/tests/Math/Geometry/Shape/D2/QuadrilateralTest.php
index 4a17e6557..1b999a30f 100644
--- a/tests/Math/Geometry/Shape/D2/QuadrilateralTest.php
+++ b/tests/Math/Geometry/Shape/D2/QuadrilateralTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Geometry\Shape\D2;
-
+/**
+ * @internal
+ */
class QuadrilateralTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/Math/Geometry/Shape/D2/RectangleTest.php b/tests/Math/Geometry/Shape/D2/RectangleTest.php
index 465096e3d..5fccc88ed 100644
--- a/tests/Math/Geometry/Shape/D2/RectangleTest.php
+++ b/tests/Math/Geometry/Shape/D2/RectangleTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Geometry\Shape\D2;
use phpOMS\Math\Geometry\Shape\D2\Rectangle;
+/**
+ * @internal
+ */
class RectangleTest extends \PHPUnit\Framework\TestCase
{
public function testRectanle() : void
diff --git a/tests/Math/Geometry/Shape/D2/TrapezoidTest.php b/tests/Math/Geometry/Shape/D2/TrapezoidTest.php
index 7f9e9a3db..403ef1166 100644
--- a/tests/Math/Geometry/Shape/D2/TrapezoidTest.php
+++ b/tests/Math/Geometry/Shape/D2/TrapezoidTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Geometry\Shape\D2;
use phpOMS\Math\Geometry\Shape\D2\Trapezoid;
+/**
+ * @internal
+ */
class TrapezoidTest extends \PHPUnit\Framework\TestCase
{
public function testTrapezoid() : void
diff --git a/tests/Math/Geometry/Shape/D2/TriangleTest.php b/tests/Math/Geometry/Shape/D2/TriangleTest.php
index f541ffe1a..4cd7a32d9 100644
--- a/tests/Math/Geometry/Shape/D2/TriangleTest.php
+++ b/tests/Math/Geometry/Shape/D2/TriangleTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Geometry\Shape\D2;
use phpOMS\Math\Geometry\Shape\D2\Triangle;
+/**
+ * @internal
+ */
class TriangleTest extends \PHPUnit\Framework\TestCase
{
public function testTriangle() : void
diff --git a/tests/Math/Geometry/Shape/D3/ConeTest.php b/tests/Math/Geometry/Shape/D3/ConeTest.php
index a27fbc5c4..9fdb69f14 100644
--- a/tests/Math/Geometry/Shape/D3/ConeTest.php
+++ b/tests/Math/Geometry/Shape/D3/ConeTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Geometry\Shape\D3;
use phpOMS\Math\Geometry\Shape\D3\Cone;
+/**
+ * @internal
+ */
class ConeTest extends \PHPUnit\Framework\TestCase
{
public function testCone() : void
diff --git a/tests/Math/Geometry/Shape/D3/CuboidTest.php b/tests/Math/Geometry/Shape/D3/CuboidTest.php
index 47684f439..f5b32cc59 100644
--- a/tests/Math/Geometry/Shape/D3/CuboidTest.php
+++ b/tests/Math/Geometry/Shape/D3/CuboidTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Geometry\Shape\D3;
use phpOMS\Math\Geometry\Shape\D3\Cuboid;
+/**
+ * @internal
+ */
class CuboidTest extends \PHPUnit\Framework\TestCase
{
public function testCuboid() : void
diff --git a/tests/Math/Geometry/Shape/D3/CylinderTest.php b/tests/Math/Geometry/Shape/D3/CylinderTest.php
index d0843d413..92dd97934 100644
--- a/tests/Math/Geometry/Shape/D3/CylinderTest.php
+++ b/tests/Math/Geometry/Shape/D3/CylinderTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Geometry\Shape\D3;
use phpOMS\Math\Geometry\Shape\D3\Cylinder;
+/**
+ * @internal
+ */
class CylinderTest extends \PHPUnit\Framework\TestCase
{
public function testCylinder() : void
diff --git a/tests/Math/Geometry/Shape/D3/PrismTest.php b/tests/Math/Geometry/Shape/D3/PrismTest.php
index 65e97c777..2089b0736 100644
--- a/tests/Math/Geometry/Shape/D3/PrismTest.php
+++ b/tests/Math/Geometry/Shape/D3/PrismTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Geometry\Shape\D3;
-
+/**
+ * @internal
+ */
class PrismTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/Math/Geometry/Shape/D3/RectangularPyramidTest.php b/tests/Math/Geometry/Shape/D3/RectangularPyramidTest.php
index b6f92fe11..a3c12c728 100644
--- a/tests/Math/Geometry/Shape/D3/RectangularPyramidTest.php
+++ b/tests/Math/Geometry/Shape/D3/RectangularPyramidTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Geometry\Shape\D3;
use phpOMS\Math\Geometry\Shape\D3\RectangularPyramid;
+/**
+ * @internal
+ */
class RectangularPyramidTest extends \PHPUnit\Framework\TestCase
{
public function testCylinder() : void
diff --git a/tests/Math/Geometry/Shape/D3/SphereTest.php b/tests/Math/Geometry/Shape/D3/SphereTest.php
index ae12e6613..c7ccb945b 100644
--- a/tests/Math/Geometry/Shape/D3/SphereTest.php
+++ b/tests/Math/Geometry/Shape/D3/SphereTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Geometry\Shape\D3;
use phpOMS\Math\Geometry\Shape\D3\Sphere;
+/**
+ * @internal
+ */
class SphereTest extends \PHPUnit\Framework\TestCase
{
public function testSphere() : void
diff --git a/tests/Math/Geometry/Shape/D3/TetrahedronTest.php b/tests/Math/Geometry/Shape/D3/TetrahedronTest.php
index 35e4122c2..05ee2a1e1 100644
--- a/tests/Math/Geometry/Shape/D3/TetrahedronTest.php
+++ b/tests/Math/Geometry/Shape/D3/TetrahedronTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Geometry\Shape\D3;
use phpOMS\Math\Geometry\Shape\D3\Tetrahedron;
+/**
+ * @internal
+ */
class TetrahedronTest extends \PHPUnit\Framework\TestCase
{
public function testTetrahedron() : void
diff --git a/tests/Math/Integral/GaussTest.php b/tests/Math/Integral/GaussTest.php
index 85bdd7cee..c51828855 100644
--- a/tests/Math/Integral/GaussTest.php
+++ b/tests/Math/Integral/GaussTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Integral;
-
+/**
+ * @internal
+ */
class GaussTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/Math/Matrix/CholeskyDecompositionTest.php b/tests/Math/Matrix/CholeskyDecompositionTest.php
index b0acd75ec..f9bf18558 100644
--- a/tests/Math/Matrix/CholeskyDecompositionTest.php
+++ b/tests/Math/Matrix/CholeskyDecompositionTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Matrix;
@@ -17,6 +18,9 @@ use phpOMS\Math\Matrix\CholeskyDecomposition;
use phpOMS\Math\Matrix\Matrix;
use phpOMS\Math\Matrix\Vector;
+/**
+ * @internal
+ */
class CholeskyDecompositionTest extends \PHPUnit\Framework\TestCase
{
public function testComposition() : void
diff --git a/tests/Math/Matrix/EigenvalueDecompositionTest.php b/tests/Math/Matrix/EigenvalueDecompositionTest.php
index 4b698e9e0..7126225f0 100644
--- a/tests/Math/Matrix/EigenvalueDecompositionTest.php
+++ b/tests/Math/Matrix/EigenvalueDecompositionTest.php
@@ -10,12 +10,16 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Matrix;
use phpOMS\Math\Matrix\EigenvalueDecomposition;
use phpOMS\Math\Matrix\Matrix;
+/**
+ * @internal
+ */
class EigenvalueDecompositionTest extends \PHPUnit\Framework\TestCase
{
public function testSymmetricMatrix() : void
@@ -112,4 +116,4 @@ class EigenvalueDecompositionTest extends \PHPUnit\Framework\TestCase
0.2
);
}
-}
\ No newline at end of file
+}
diff --git a/tests/Math/Matrix/Exception/InvalidDimensionExceptionTest.php b/tests/Math/Matrix/Exception/InvalidDimensionExceptionTest.php
index 951b7416a..c2b3b1208 100644
--- a/tests/Math/Matrix/Exception/InvalidDimensionExceptionTest.php
+++ b/tests/Math/Matrix/Exception/InvalidDimensionExceptionTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Matrix\Exception;
use phpOMS\Math\Matrix\Exception\InvalidDimensionException;
+/**
+ * @internal
+ */
class InvalidDimensionExceptionTest extends \PHPUnit\Framework\TestCase
{
public function testException() : void
diff --git a/tests/Math/Matrix/IdentityMatrixTest.php b/tests/Math/Matrix/IdentityMatrixTest.php
index 730dc2eb0..1743089c3 100644
--- a/tests/Math/Matrix/IdentityMatrixTest.php
+++ b/tests/Math/Matrix/IdentityMatrixTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Matrix;
use phpOMS\Math\Matrix\IdentityMatrix;
+/**
+ * @internal
+ */
class IdentityMatrixTest extends \PHPUnit\Framework\TestCase
{
public function testIdentity() : void
diff --git a/tests/Math/Matrix/LUDecompositionTest.php b/tests/Math/Matrix/LUDecompositionTest.php
index 722455ee5..a4d455ef4 100644
--- a/tests/Math/Matrix/LUDecompositionTest.php
+++ b/tests/Math/Matrix/LUDecompositionTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Matrix;
@@ -17,6 +18,9 @@ use phpOMS\Math\Matrix\LUDecomposition;
use phpOMS\Math\Matrix\Matrix;
use phpOMS\Math\Matrix\Vector;
+/**
+ * @internal
+ */
class LUDecompositionTest extends \PHPUnit\Framework\TestCase
{
public function testDecomposition() : void
diff --git a/tests/Math/Matrix/MatrixTest.php b/tests/Math/Matrix/MatrixTest.php
index d70e7cd2b..99106cd2e 100644
--- a/tests/Math/Matrix/MatrixTest.php
+++ b/tests/Math/Matrix/MatrixTest.php
@@ -10,12 +10,16 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Matrix;
use phpOMS\Math\Matrix\Matrix;
use phpOMS\Math\Matrix\Vector;
+/**
+ * @internal
+ */
class MatrixTest extends \PHPUnit\Framework\TestCase
{
protected $A = null;
diff --git a/tests/Math/Matrix/QRDecompositionTest.php b/tests/Math/Matrix/QRDecompositionTest.php
index e8728d774..ec4f9bfe0 100644
--- a/tests/Math/Matrix/QRDecompositionTest.php
+++ b/tests/Math/Matrix/QRDecompositionTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Matrix;
@@ -17,6 +18,9 @@ use phpOMS\Math\Matrix\Matrix;
use phpOMS\Math\Matrix\QRDecomposition;
use phpOMS\Math\Matrix\Vector;
+/**
+ * @internal
+ */
class QRDecompositionTest extends \PHPUnit\Framework\TestCase
{
public function testDecomposition() : void
diff --git a/tests/Math/Matrix/SingularValueDecompositionTest.php b/tests/Math/Matrix/SingularValueDecompositionTest.php
index cb6a78dac..8bc7f02cf 100644
--- a/tests/Math/Matrix/SingularValueDecompositionTest.php
+++ b/tests/Math/Matrix/SingularValueDecompositionTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Matrix;
@@ -18,6 +19,8 @@ use phpOMS\Math\Matrix\SingularValueDecomposition;
/**
* @testdox phpOMS\tests\Math\Matrix\SingularValueDecompositionTest: Singular Value Decomposition
+ *
+ * @internal
*/
class SingularValueDecompositionTest extends \PHPUnit\Framework\TestCase
{
diff --git a/tests/Math/Matrix/VectorTest.php b/tests/Math/Matrix/VectorTest.php
index 2e348da2f..0290aec0c 100644
--- a/tests/Math/Matrix/VectorTest.php
+++ b/tests/Math/Matrix/VectorTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Matrix;
use phpOMS\Math\Matrix\Vector;
+/**
+ * @internal
+ */
class VectorTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
@@ -22,6 +26,6 @@ class VectorTest extends \PHPUnit\Framework\TestCase
self::assertInstanceOf('\phpOMS\Math\Matrix\Vector', new Vector());
$vec = new Vector(5);
- self::assertEquals(5, \count($vec->toArray()));
+ self::assertCount(5, $vec->toArray());
}
}
diff --git a/tests/Math/Number/ComplexTest.php b/tests/Math/Number/ComplexTest.php
index fa749de4c..d29096ce8 100644
--- a/tests/Math/Number/ComplexTest.php
+++ b/tests/Math/Number/ComplexTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Number;
use phpOMS\Math\Number\Complex;
+/**
+ * @internal
+ */
class ComplexTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
diff --git a/tests/Math/Number/IntegerTest.php b/tests/Math/Number/IntegerTest.php
index 0c31f1998..f7a759d66 100644
--- a/tests/Math/Number/IntegerTest.php
+++ b/tests/Math/Number/IntegerTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Number;
use phpOMS\Math\Number\Integer;
+/**
+ * @internal
+ */
class IntegerTest extends \PHPUnit\Framework\TestCase
{
public function testIsInteger() : void
diff --git a/tests/Math/Number/NaturalTest.php b/tests/Math/Number/NaturalTest.php
index d730499c8..bb4b49d01 100644
--- a/tests/Math/Number/NaturalTest.php
+++ b/tests/Math/Number/NaturalTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Number;
use phpOMS\Math\Number\Natural;
+/**
+ * @internal
+ */
class NaturalTest extends \PHPUnit\Framework\TestCase
{
public function testIsNatural() : void
diff --git a/tests/Math/Number/NumberTypeTest.php b/tests/Math/Number/NumberTypeTest.php
index da7e2b9b6..07a5cdf82 100644
--- a/tests/Math/Number/NumberTypeTest.php
+++ b/tests/Math/Number/NumberTypeTest.php
@@ -10,16 +10,20 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Number;
use phpOMS\Math\Number\NumberType;
+/**
+ * @internal
+ */
class NumberTypeTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(9, \count(NumberType::getConstants()));
+ self::assertCount(9, NumberType::getConstants());
self::assertEquals(NumberType::getConstants(), \array_unique(NumberType::getConstants()));
self::assertEquals(0, NumberType::N_INTEGER);
diff --git a/tests/Math/Number/NumbersTest.php b/tests/Math/Number/NumbersTest.php
index 7884ba952..49d69a57d 100644
--- a/tests/Math/Number/NumbersTest.php
+++ b/tests/Math/Number/NumbersTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Number;
use phpOMS\Math\Number\Numbers;
+/**
+ * @internal
+ */
class NumbersTest extends \PHPUnit\Framework\TestCase
{
public function testPerfect() : void
diff --git a/tests/Math/Number/PrimeTest.php b/tests/Math/Number/PrimeTest.php
index b2b63053f..2b2aeb9de 100644
--- a/tests/Math/Number/PrimeTest.php
+++ b/tests/Math/Number/PrimeTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Number;
use phpOMS\Math\Number\Prime;
+/**
+ * @internal
+ */
class PrimeTest extends \PHPUnit\Framework\TestCase
{
public function testPrime() : void
diff --git a/tests/Math/Numerics/Interpolation/CubicSplineInterpolationTest.php b/tests/Math/Numerics/Interpolation/CubicSplineInterpolationTest.php
index 57f12fc64..b82bb507b 100644
--- a/tests/Math/Numerics/Interpolation/CubicSplineInterpolationTest.php
+++ b/tests/Math/Numerics/Interpolation/CubicSplineInterpolationTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Numerics\Interpolation;
-
+/**
+ * @internal
+ */
class CubicSplineInterpolationTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/Math/Numerics/Interpolation/LinearInterpolationTest.php b/tests/Math/Numerics/Interpolation/LinearInterpolationTest.php
index e11b0c6bf..ef312fe07 100644
--- a/tests/Math/Numerics/Interpolation/LinearInterpolationTest.php
+++ b/tests/Math/Numerics/Interpolation/LinearInterpolationTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Numerics\Interpolation;
-
+/**
+ * @internal
+ */
class LinearInterpolationTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/Math/Numerics/Interpolation/PolynomialInterpolationTest.php b/tests/Math/Numerics/Interpolation/PolynomialInterpolationTest.php
index 13aa0d0c8..5c3a1b1e9 100644
--- a/tests/Math/Numerics/Interpolation/PolynomialInterpolationTest.php
+++ b/tests/Math/Numerics/Interpolation/PolynomialInterpolationTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Numerics\Interpolation;
-
+/**
+ * @internal
+ */
class PolynomialInterpolationTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/Math/Parser/EvaluatorTest.php b/tests/Math/Parser/EvaluatorTest.php
index ec19beefe..3eda377a3 100644
--- a/tests/Math/Parser/EvaluatorTest.php
+++ b/tests/Math/Parser/EvaluatorTest.php
@@ -10,18 +10,22 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Parser;
use phpOMS\Math\Parser\Evaluator;
+/**
+ * @internal
+ */
class EvaluatorTest extends \PHPUnit\Framework\TestCase
{
public function testBasicEvaluation() : void
{
self::assertEqualsWithDelta(4.5, Evaluator::evaluate('3 + 4 * 2 / ( 1 - 5 ) ^ 2 ^ 3 + 1.5'), 2);
self::assertEqualsWithDelta(4.5, Evaluator::evaluate('3+4*2/(1-5)^2^3+1.5'), 2);
- self::assertEquals(null, Evaluator::evaluate('invalid'));
- self::assertEquals(null, Evaluator::evaluate('3+4*2/(1-5^2^3+1.5'));
+ self::assertNull(Evaluator::evaluate('invalid'));
+ self::assertNull(Evaluator::evaluate('3+4*2/(1-5^2^3+1.5'));
}
}
diff --git a/tests/Math/Statistic/AverageTest.php b/tests/Math/Statistic/AverageTest.php
index d8794b58f..348526b19 100644
--- a/tests/Math/Statistic/AverageTest.php
+++ b/tests/Math/Statistic/AverageTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Statistic;
use phpOMS\Math\Statistic\Average;
+/**
+ * @internal
+ */
class AverageTest extends \PHPUnit\Framework\TestCase
{
public function testAverage() : void
diff --git a/tests/Math/Statistic/BasicTest.php b/tests/Math/Statistic/BasicTest.php
index 2e34d3fcc..29ae7e3b6 100644
--- a/tests/Math/Statistic/BasicTest.php
+++ b/tests/Math/Statistic/BasicTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Statistic;
use phpOMS\Math\Statistic\Basic;
+/**
+ * @internal
+ */
class BasicTest extends \PHPUnit\Framework\TestCase
{
public function testFrequency() : void
diff --git a/tests/Math/Statistic/CorrelationTest.php b/tests/Math/Statistic/CorrelationTest.php
index eb5c6a4d2..493a9bf82 100644
--- a/tests/Math/Statistic/CorrelationTest.php
+++ b/tests/Math/Statistic/CorrelationTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Statistic;
use phpOMS\Math\Statistic\Correlation;
+/**
+ * @internal
+ */
class CorrelationTest extends \PHPUnit\Framework\TestCase
{
public function testBravisPersonCorrelationCoefficient() : void
@@ -34,7 +38,7 @@ class CorrelationTest extends \PHPUnit\Framework\TestCase
1, 20, 31, 8, 40, 41, 46, 89, 72, 45, 81, 93,
41, 63, 17, 96, 68, 27, 41, 17, 26, 75, 63, 93,
18, 93, 80, 36, 4, 23, 81, 47, 61, 27, 13, 25,
- 51, 20, 65, 45, 87, 68, 36, 31, 79, 7, 95, 37
+ 51, 20, 65, 45, 87, 68, 36, 31, 79, 7, 95, 37,
];
self::assertEqualsWithDelta(0.022, Correlation::autocorrelationCoefficient($data, 1), 0.01);
@@ -47,11 +51,11 @@ class CorrelationTest extends \PHPUnit\Framework\TestCase
1, 20, 31, 8, 40, 41, 46, 89, 72, 45, 81, 93,
41, 63, 17, 96, 68, 27, 41, 17, 26, 75, 63, 93,
18, 93, 80, 36, 4, 23, 81, 47, 61, 27, 13, 25,
- 51, 20, 65, 45, 87, 68, 36, 31, 79, 7, 95, 37
+ 51, 20, 65, 45, 87, 68, 36, 31, 79, 7, 95, 37,
];
$correlations = [];
- for ($i = 0; $i < 24; $i++) {
+ for ($i = 0; $i < 24; ++$i) {
$correlations[] = Correlation::autocorrelationCoefficient($data, $i + 1);
}
diff --git a/tests/Math/Statistic/Forecast/ErrorTest.php b/tests/Math/Statistic/Forecast/ErrorTest.php
index 85abc71ed..08340266c 100644
--- a/tests/Math/Statistic/Forecast/ErrorTest.php
+++ b/tests/Math/Statistic/Forecast/ErrorTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Statistic\Forecast;
use phpOMS\Math\Statistic\Forecast\Error;
+/**
+ * @internal
+ */
class ErrorTest extends \PHPUnit\Framework\TestCase
{
public function testForecastError() : void
@@ -25,7 +29,7 @@ class ErrorTest extends \PHPUnit\Framework\TestCase
400 - 300,
600 - 700,
200 - 200,
- 500 - -300
+ 500 - -300,
],
Error::getForecastErrorArray(
[400, 600, 200, 500],
@@ -44,7 +48,7 @@ class ErrorTest extends \PHPUnit\Framework\TestCase
(400 - 300) / 400,
(600 - 700) / 600,
(200 - 200) / 200,
- (500 - -300) / 500
+ (500 - -300) / 500,
],
Error::getPercentageErrorArray(
Error::getForecastErrorArray(
@@ -62,7 +66,7 @@ class ErrorTest extends \PHPUnit\Framework\TestCase
400 - 300,
600 - 700,
200 - 200,
- 500 - -300
+ 500 - -300,
];
self::assertEqualsWithDelta(300, Error::getMeanAbsoulteError($errors), 0.01);
@@ -74,12 +78,12 @@ class ErrorTest extends \PHPUnit\Framework\TestCase
{
$observed = [
-2.9, -2.83, -0.95, -0.88, 1.21, -1.67, 0.83, -0.27, 1.36,
- -0.34, 0.48, -2.83, -0.95, -0.88, 1.21, -1.67, -2.99, 1.24, 0.64
+ -0.34, 0.48, -2.83, -0.95, -0.88, 1.21, -1.67, -2.99, 1.24, 0.64,
];
$forecast = [
-2.95, -2.7, -1.00, -0.68, 1.50, -1.00, 0.90, -0.37, 1.26,
- -0.54, 0.58, -2.13, -0.75, -0.89, 1.25, -1.65, -3.20, 1.29, 0.60
+ -0.54, 0.58, -2.13, -0.75, -0.89, 1.25, -1.65, -3.20, 1.29, 0.60,
];
$errors = Error::getForecastErrorArray($observed, $forecast);
diff --git a/tests/Math/Statistic/Forecast/Regression/LevelLevelRegressionTest.php b/tests/Math/Statistic/Forecast/Regression/LevelLevelRegressionTest.php
index 55aa658ee..241edc4f8 100644
--- a/tests/Math/Statistic/Forecast/Regression/LevelLevelRegressionTest.php
+++ b/tests/Math/Statistic/Forecast/Regression/LevelLevelRegressionTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Statistic\Forecast\Regression;
use phpOMS\Math\Statistic\Forecast\Regression\LevelLevelRegression;
+/**
+ * @internal
+ */
class LevelLevelRegressionTest extends \PHPUnit\Framework\TestCase
{
protected $reg = null;
diff --git a/tests/Math/Statistic/Forecast/Regression/LevelLogRegressionTest.php b/tests/Math/Statistic/Forecast/Regression/LevelLogRegressionTest.php
index 8b1f8daf3..71f7703df 100644
--- a/tests/Math/Statistic/Forecast/Regression/LevelLogRegressionTest.php
+++ b/tests/Math/Statistic/Forecast/Regression/LevelLogRegressionTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Statistic\Forecast\Regression;
use phpOMS\Math\Statistic\Forecast\Regression\LevelLogRegression;
+/**
+ * @internal
+ */
class LevelLogRegressionTest extends \PHPUnit\Framework\TestCase
{
protected $reg = null;
diff --git a/tests/Math/Statistic/Forecast/Regression/LogLevelRegressionTest.php b/tests/Math/Statistic/Forecast/Regression/LogLevelRegressionTest.php
index de4957e45..40897f4b6 100644
--- a/tests/Math/Statistic/Forecast/Regression/LogLevelRegressionTest.php
+++ b/tests/Math/Statistic/Forecast/Regression/LogLevelRegressionTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Statistic\Forecast\Regression;
use phpOMS\Math\Statistic\Forecast\Regression\LogLevelRegression;
+/**
+ * @internal
+ */
class LogLevelRegressionTest extends \PHPUnit\Framework\TestCase
{
protected $reg = null;
diff --git a/tests/Math/Statistic/Forecast/Regression/LogLogRegressionTest.php b/tests/Math/Statistic/Forecast/Regression/LogLogRegressionTest.php
index d83ecdb93..d42cce411 100644
--- a/tests/Math/Statistic/Forecast/Regression/LogLogRegressionTest.php
+++ b/tests/Math/Statistic/Forecast/Regression/LogLogRegressionTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Statistic\Forecast\Regression;
use phpOMS\Math\Statistic\Forecast\Regression\LogLogRegression;
+/**
+ * @internal
+ */
class LogLogRegressionTest extends \PHPUnit\Framework\TestCase
{
protected $reg = null;
diff --git a/tests/Math/Statistic/MeasureOfDispersionTest.php b/tests/Math/Statistic/MeasureOfDispersionTest.php
index dc1ca7ce7..a06a95a1e 100644
--- a/tests/Math/Statistic/MeasureOfDispersionTest.php
+++ b/tests/Math/Statistic/MeasureOfDispersionTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Statistic;
use phpOMS\Math\Statistic\MeasureOfDispersion;
+/**
+ * @internal
+ */
class MeasureOfDispersionTest extends \PHPUnit\Framework\TestCase
{
public function testRange() : void
diff --git a/tests/Math/Stochastic/Distribution/BernoulliDistributionTest.php b/tests/Math/Stochastic/Distribution/BernoulliDistributionTest.php
index 18d2f778b..0a71c479d 100644
--- a/tests/Math/Stochastic/Distribution/BernoulliDistributionTest.php
+++ b/tests/Math/Stochastic/Distribution/BernoulliDistributionTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Stochastic\Distribution;
use phpOMS\Math\Stochastic\Distribution\BernoulliDistribution;
+/**
+ * @internal
+ */
class BernoulliDistributionTest extends \PHPUnit\Framework\TestCase
{
public function testPmf() : void
diff --git a/tests/Math/Stochastic/Distribution/BetaDistributionTest.php b/tests/Math/Stochastic/Distribution/BetaDistributionTest.php
index 958453135..e157befb4 100644
--- a/tests/Math/Stochastic/Distribution/BetaDistributionTest.php
+++ b/tests/Math/Stochastic/Distribution/BetaDistributionTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Stochastic\Distribution;
-
+/**
+ * @internal
+ */
class BetaDistributionTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/Math/Stochastic/Distribution/BinomialDistributionTest.php b/tests/Math/Stochastic/Distribution/BinomialDistributionTest.php
index 12c61da7e..a1bee75c0 100644
--- a/tests/Math/Stochastic/Distribution/BinomialDistributionTest.php
+++ b/tests/Math/Stochastic/Distribution/BinomialDistributionTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Stochastic\Distribution;
use phpOMS\Math\Stochastic\Distribution\BinomialDistribution;
+/**
+ * @internal
+ */
class BinomialDistributionTest extends \PHPUnit\Framework\TestCase
{
public function testPmf() : void
diff --git a/tests/Math/Stochastic/Distribution/CauchyDistributionTest.php b/tests/Math/Stochastic/Distribution/CauchyDistributionTest.php
index 6542a5a6f..ff0794510 100644
--- a/tests/Math/Stochastic/Distribution/CauchyDistributionTest.php
+++ b/tests/Math/Stochastic/Distribution/CauchyDistributionTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Stochastic\Distribution;
use phpOMS\Math\Stochastic\Distribution\CauchyDistribution;
+/**
+ * @internal
+ */
class CauchyDistributionTest extends \PHPUnit\Framework\TestCase
{
public function testMedianMode() : void
@@ -45,6 +49,6 @@ class CauchyDistributionTest extends \PHPUnit\Framework\TestCase
{
$gamma = 1.5;
- self::assertEqualsWithDelta(\log(4 * M_PI * $gamma), CauchyDistribution::getEntropy($gamma), 0.01);
+ self::assertEqualsWithDelta(\log(4 * \M_PI * $gamma), CauchyDistribution::getEntropy($gamma), 0.01);
}
}
diff --git a/tests/Math/Stochastic/Distribution/ChiSquaredDistributionTest.php b/tests/Math/Stochastic/Distribution/ChiSquaredDistributionTest.php
index 965e74b2e..e87bbbb4d 100644
--- a/tests/Math/Stochastic/Distribution/ChiSquaredDistributionTest.php
+++ b/tests/Math/Stochastic/Distribution/ChiSquaredDistributionTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Stochastic\Distribution;
use phpOMS\Math\Stochastic\Distribution\ChiSquaredDistribution;
+/**
+ * @internal
+ */
class ChiSquaredDistributionTest extends \PHPUnit\Framework\TestCase
{
public function testHypothesisFalse() : void
diff --git a/tests/Math/Stochastic/Distribution/ExponentialDistributionTest.php b/tests/Math/Stochastic/Distribution/ExponentialDistributionTest.php
index 7533da21a..0d8fa9044 100644
--- a/tests/Math/Stochastic/Distribution/ExponentialDistributionTest.php
+++ b/tests/Math/Stochastic/Distribution/ExponentialDistributionTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Stochastic\Distribution;
use phpOMS\Math\Stochastic\Distribution\ExponentialDistribution;
+/**
+ * @internal
+ */
class ExponentialDistributionTest extends \PHPUnit\Framework\TestCase
{
public function testPdf() : void
diff --git a/tests/Math/Stochastic/Distribution/FDistributionTest.php b/tests/Math/Stochastic/Distribution/FDistributionTest.php
index 6100f0411..e5b7492b6 100644
--- a/tests/Math/Stochastic/Distribution/FDistributionTest.php
+++ b/tests/Math/Stochastic/Distribution/FDistributionTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Stochastic\Distribution;
-
+/**
+ * @internal
+ */
class FDistributionTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/Math/Stochastic/Distribution/GammaDistributionTest.php b/tests/Math/Stochastic/Distribution/GammaDistributionTest.php
index ab5b11e70..eaec61a27 100644
--- a/tests/Math/Stochastic/Distribution/GammaDistributionTest.php
+++ b/tests/Math/Stochastic/Distribution/GammaDistributionTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Stochastic\Distribution;
-
+/**
+ * @internal
+ */
class GammaDistributionTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/Math/Stochastic/Distribution/GeometricDistributionTest.php b/tests/Math/Stochastic/Distribution/GeometricDistributionTest.php
index e6997ffcd..b464237c6 100644
--- a/tests/Math/Stochastic/Distribution/GeometricDistributionTest.php
+++ b/tests/Math/Stochastic/Distribution/GeometricDistributionTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Stochastic\Distribution;
use phpOMS\Math\Stochastic\Distribution\GeometricDistribution;
+/**
+ * @internal
+ */
class GeometricDistributionTest extends \PHPUnit\Framework\TestCase
{
public function testPmf() : void
diff --git a/tests/Math/Stochastic/Distribution/HypergeometricDistributionTest.php b/tests/Math/Stochastic/Distribution/HypergeometricDistributionTest.php
index ca6653609..8acc98e03 100644
--- a/tests/Math/Stochastic/Distribution/HypergeometricDistributionTest.php
+++ b/tests/Math/Stochastic/Distribution/HypergeometricDistributionTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Stochastic\Distribution;
-
+/**
+ * @internal
+ */
class HypergeometricDistributionTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/Math/Stochastic/Distribution/LaplaceDistributionTest.php b/tests/Math/Stochastic/Distribution/LaplaceDistributionTest.php
index 04d0dff03..87b19fdda 100644
--- a/tests/Math/Stochastic/Distribution/LaplaceDistributionTest.php
+++ b/tests/Math/Stochastic/Distribution/LaplaceDistributionTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Stochastic\Distribution;
use phpOMS\Math\Stochastic\Distribution\LaplaceDistribution;
+/**
+ * @internal
+ */
class LaplaceDistributionTest extends \PHPUnit\Framework\TestCase
{
public function testPdf() : void
diff --git a/tests/Math/Stochastic/Distribution/LogDistributionTest.php b/tests/Math/Stochastic/Distribution/LogDistributionTest.php
index 628750a96..9a1302f74 100644
--- a/tests/Math/Stochastic/Distribution/LogDistributionTest.php
+++ b/tests/Math/Stochastic/Distribution/LogDistributionTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Stochastic\Distribution;
-
+/**
+ * @internal
+ */
class LogDistributionTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/Math/Stochastic/Distribution/LogNormalDistributionTest.php b/tests/Math/Stochastic/Distribution/LogNormalDistributionTest.php
index c627c8e96..95434e1f3 100644
--- a/tests/Math/Stochastic/Distribution/LogNormalDistributionTest.php
+++ b/tests/Math/Stochastic/Distribution/LogNormalDistributionTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Stochastic\Distribution;
-
+/**
+ * @internal
+ */
class LogNormalDistributionTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/Math/Stochastic/Distribution/LogisticDistributionTest.php b/tests/Math/Stochastic/Distribution/LogisticDistributionTest.php
index c3a5003a0..7b5870a3a 100644
--- a/tests/Math/Stochastic/Distribution/LogisticDistributionTest.php
+++ b/tests/Math/Stochastic/Distribution/LogisticDistributionTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Stochastic\Distribution;
-
+/**
+ * @internal
+ */
class LogisticDistributionTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/Math/Stochastic/Distribution/NormalDistributionTest.php b/tests/Math/Stochastic/Distribution/NormalDistributionTest.php
index 39f59c8f3..962e3890f 100644
--- a/tests/Math/Stochastic/Distribution/NormalDistributionTest.php
+++ b/tests/Math/Stochastic/Distribution/NormalDistributionTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Stochastic\Distribution;
use phpOMS\Math\Stochastic\Distribution\NormalDistribution;
+/**
+ * @internal
+ */
class NormalDistributionTest extends \PHPUnit\Framework\TestCase
{
public function testPdf() : void
diff --git a/tests/Math/Stochastic/Distribution/ParetoDistributionTest.php b/tests/Math/Stochastic/Distribution/ParetoDistributionTest.php
index e2530b2cb..16b8440c8 100644
--- a/tests/Math/Stochastic/Distribution/ParetoDistributionTest.php
+++ b/tests/Math/Stochastic/Distribution/ParetoDistributionTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Stochastic\Distribution;
-
+/**
+ * @internal
+ */
class ParetoDistributionTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/Math/Stochastic/Distribution/PoissonDistributionTest.php b/tests/Math/Stochastic/Distribution/PoissonDistributionTest.php
index 7729c8d60..f63758d69 100644
--- a/tests/Math/Stochastic/Distribution/PoissonDistributionTest.php
+++ b/tests/Math/Stochastic/Distribution/PoissonDistributionTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Stochastic\Distribution;
use phpOMS\Math\Stochastic\Distribution\PoissonDistribution;
+/**
+ * @internal
+ */
class PoissonDistributionTest extends \PHPUnit\Framework\TestCase
{
public function testPmf() : void
diff --git a/tests/Math/Stochastic/Distribution/TDistributionTest.php b/tests/Math/Stochastic/Distribution/TDistributionTest.php
index 8943b4934..361f40618 100644
--- a/tests/Math/Stochastic/Distribution/TDistributionTest.php
+++ b/tests/Math/Stochastic/Distribution/TDistributionTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Stochastic\Distribution;
-
+/**
+ * @internal
+ */
class TDistributionTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/Math/Stochastic/Distribution/UniformDistributionContinuousTest.php b/tests/Math/Stochastic/Distribution/UniformDistributionContinuousTest.php
index 946b6f1b7..5a683e15e 100644
--- a/tests/Math/Stochastic/Distribution/UniformDistributionContinuousTest.php
+++ b/tests/Math/Stochastic/Distribution/UniformDistributionContinuousTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Stochastic\Distribution;
use phpOMS\Math\Stochastic\Distribution\UniformDistributionContinuous;
+/**
+ * @internal
+ */
class UniformDistributionContinuousTest extends \PHPUnit\Framework\TestCase
{
public function testPdf() : void
diff --git a/tests/Math/Stochastic/Distribution/UniformDistributionDiscreteTest.php b/tests/Math/Stochastic/Distribution/UniformDistributionDiscreteTest.php
index 818aee6e9..bb4e51e60 100644
--- a/tests/Math/Stochastic/Distribution/UniformDistributionDiscreteTest.php
+++ b/tests/Math/Stochastic/Distribution/UniformDistributionDiscreteTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Stochastic\Distribution;
use phpOMS\Math\Stochastic\Distribution\UniformDistributionDiscrete;
+/**
+ * @internal
+ */
class UniformDistributionDiscreteTest extends \PHPUnit\Framework\TestCase
{
public function testPmf() : void
diff --git a/tests/Math/Stochastic/Distribution/WeibullDistributionTest.php b/tests/Math/Stochastic/Distribution/WeibullDistributionTest.php
index 48d904610..3e55dd64b 100644
--- a/tests/Math/Stochastic/Distribution/WeibullDistributionTest.php
+++ b/tests/Math/Stochastic/Distribution/WeibullDistributionTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Stochastic\Distribution;
-
+/**
+ * @internal
+ */
class WeibullDistributionTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/Math/Stochastic/Distribution/ZTestTest.php b/tests/Math/Stochastic/Distribution/ZTestTest.php
index bb50e8496..3831945c4 100644
--- a/tests/Math/Stochastic/Distribution/ZTestTest.php
+++ b/tests/Math/Stochastic/Distribution/ZTestTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Stochastic\Distribution;
use phpOMS\Math\Stochastic\Distribution\ZTest;
+/**
+ * @internal
+ */
class ZTestTest extends \PHPUnit\Framework\TestCase
{
// http://sphweb.bumc.bu.edu/otlt/MPH-Modules/BS/BS704_HypothesisTesting-ChiSquare/BS704_HypothesisTesting-ChiSquare_print.html
@@ -27,4 +31,4 @@ class ZTestTest extends \PHPUnit\Framework\TestCase
self::assertFalse(ZTest::testHypothesis($observed, $expected, $total, $a));
}
-}
\ No newline at end of file
+}
diff --git a/tests/Math/Stochastic/NaiveBayesFilterTest.php b/tests/Math/Stochastic/NaiveBayesFilterTest.php
index 8b94de6e3..ae3a4d711 100644
--- a/tests/Math/Stochastic/NaiveBayesFilterTest.php
+++ b/tests/Math/Stochastic/NaiveBayesFilterTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Math\Stochastic;
-
+/**
+ * @internal
+ */
class NaiveBayesFilterTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/Message/Console/HeaderTest.php b/tests/Message/Console/HeaderTest.php
index a4a4d6941..dc2aa2737 100644
--- a/tests/Message/Console/HeaderTest.php
+++ b/tests/Message/Console/HeaderTest.php
@@ -10,12 +10,16 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Message\Console;
use phpOMS\Localization\Localization;
use phpOMS\Message\Console\Header;
+/**
+ * @internal
+ */
class HeaderTest extends \PHPUnit\Framework\TestCase
{
public function testDefaults() : void
diff --git a/tests/Message/Console/RequestTest.php b/tests/Message/Console/RequestTest.php
index 468b2b064..7d596be65 100644
--- a/tests/Message/Console/RequestTest.php
+++ b/tests/Message/Console/RequestTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Message\Console;
@@ -20,6 +21,9 @@ use phpOMS\Message\Http\RequestMethod;
use phpOMS\Router\RouteVerb;
use phpOMS\Uri\Argument;
+/**
+ * @internal
+ */
class RequestTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
@@ -36,7 +40,7 @@ class RequestTest extends \PHPUnit\Framework\TestCase
self::assertInstanceOf('\phpOMS\Message\Console\Header', $request->getHeader());
self::assertEquals('', $request->__toString());
self::assertFalse($request->hasData('key'));
- self::assertEquals(null, $request->getData('key'));
+ self::assertNull($request->getData('key'));
}
public function testSetGet() : void
diff --git a/tests/Message/Console/ResponseTest.php b/tests/Message/Console/ResponseTest.php
index 5e0505579..651333885 100644
--- a/tests/Message/Console/ResponseTest.php
+++ b/tests/Message/Console/ResponseTest.php
@@ -10,12 +10,16 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Message\Console;
use phpOMS\Localization\Localization;
use phpOMS\Message\Console\Response;
+/**
+ * @internal
+ */
class ResponseTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
diff --git a/tests/Message/HeaderAbstractTest.php b/tests/Message/HeaderAbstractTest.php
index dde15f111..93c7313e7 100644
--- a/tests/Message/HeaderAbstractTest.php
+++ b/tests/Message/HeaderAbstractTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Message;
@@ -17,13 +18,16 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Message\HeaderAbstract;
+/**
+ * @internal
+ */
class HeaderAbstractTest extends \PHPUnit\Framework\TestCase
{
protected $header = null;
protected function setUp() : void
{
- $this->header = new class extends HeaderAbstract
+ $this->header = new class() extends HeaderAbstract
{
public function generate(int $statusCode) : void
{
diff --git a/tests/Message/Http/BrowserTypeTest.php b/tests/Message/Http/BrowserTypeTest.php
index 2d113d196..ddd75b24b 100644
--- a/tests/Message/Http/BrowserTypeTest.php
+++ b/tests/Message/Http/BrowserTypeTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Message\Http;
use phpOMS\Message\Http\BrowserType;
+/**
+ * @internal
+ */
class BrowserTypeTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
diff --git a/tests/Message/Http/HeaderTest.php b/tests/Message/Http/HeaderTest.php
index 534a612ec..641e4a120 100644
--- a/tests/Message/Http/HeaderTest.php
+++ b/tests/Message/Http/HeaderTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Message\Http;
@@ -17,6 +18,9 @@ use phpOMS\Localization\Localization;
use phpOMS\Message\Http\Header;
use phpOMS\Message\Http\RequestStatusCode;
+/**
+ * @internal
+ */
class HeaderTest extends \PHPUnit\Framework\TestCase
{
public function testDefaults() : void
diff --git a/tests/Message/Http/OSTypeTest.php b/tests/Message/Http/OSTypeTest.php
index 2acf5c20a..0ca26ee09 100644
--- a/tests/Message/Http/OSTypeTest.php
+++ b/tests/Message/Http/OSTypeTest.php
@@ -10,16 +10,20 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Message\Http;
use phpOMS\Message\Http\OSType;
+/**
+ * @internal
+ */
class OSTypeTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(24, \count(OSType::getConstants()));
+ self::assertCount(24, OSType::getConstants());
self::assertEquals(OSType::getConstants(), \array_unique(OSType::getConstants()));
}
}
diff --git a/tests/Message/Http/RequestMethodTest.php b/tests/Message/Http/RequestMethodTest.php
index 2d648ca91..13133777e 100644
--- a/tests/Message/Http/RequestMethodTest.php
+++ b/tests/Message/Http/RequestMethodTest.php
@@ -10,16 +10,20 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Message\Http;
use phpOMS\Message\Http\RequestMethod;
+/**
+ * @internal
+ */
class RequestMethodTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(6, \count(RequestMethod::getConstants()));
+ self::assertCount(6, RequestMethod::getConstants());
self::assertEquals(RequestMethod::getConstants(), \array_unique(RequestMethod::getConstants()));
self::assertEquals('GET', RequestMethod::GET);
diff --git a/tests/Message/Http/RequestStatusCodeTest.php b/tests/Message/Http/RequestStatusCodeTest.php
index ae50e2481..32a39c16f 100644
--- a/tests/Message/Http/RequestStatusCodeTest.php
+++ b/tests/Message/Http/RequestStatusCodeTest.php
@@ -10,16 +10,20 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Message\Http;
use phpOMS\Message\Http\RequestStatusCode;
+/**
+ * @internal
+ */
class RequestStatusCodeTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(55, \count(RequestStatusCode::getConstants()));
+ self::assertCount(55, RequestStatusCode::getConstants());
self::assertEquals(RequestStatusCode::getConstants(), \array_unique(RequestStatusCode::getConstants()));
self::assertEquals(100, RequestStatusCode::R_100);
diff --git a/tests/Message/Http/RequestStatusTest.php b/tests/Message/Http/RequestStatusTest.php
index 8ada35285..35bec42f5 100644
--- a/tests/Message/Http/RequestStatusTest.php
+++ b/tests/Message/Http/RequestStatusTest.php
@@ -10,16 +10,20 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Message\Http;
use phpOMS\Message\Http\RequestStatus;
+/**
+ * @internal
+ */
class RequestStatusTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(55, \count(RequestStatus::getConstants()));
+ self::assertCount(55, RequestStatus::getConstants());
self::assertEquals(RequestStatus::getConstants(), \array_unique(RequestStatus::getConstants()));
self::assertEquals('Continue', RequestStatus::R_100);
diff --git a/tests/Message/Http/RequestTest.php b/tests/Message/Http/RequestTest.php
index 4dcbe3851..ce139a248 100644
--- a/tests/Message/Http/RequestTest.php
+++ b/tests/Message/Http/RequestTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Message\Http;
@@ -21,6 +22,9 @@ use phpOMS\Message\Http\RequestMethod;
use phpOMS\Router\RouteVerb;
use phpOMS\Uri\Http;
+/**
+ * @internal
+ */
class RequestTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
@@ -44,7 +48,7 @@ class RequestTest extends \PHPUnit\Framework\TestCase
self::assertInstanceOf('\phpOMS\Message\Http\Request', Request::createFromSuperglobals());
self::assertEquals('http://', $request->__toString());
self::assertFalse($request->hasData('key'));
- self::assertEquals(null, $request->getData('key'));
+ self::assertNull($request->getData('key'));
self::assertEquals('en', $request->getRequestLanguage());
self::assertEquals('en_US', $request->getLocale());
}
@@ -78,7 +82,7 @@ class RequestTest extends \PHPUnit\Framework\TestCase
self::assertEquals([
'da39a3ee5e6b4b0d3255bfef95601890afd80709',
'a94a8fe5ccb19ba61c4c0873d391e987982fbbd3',
- '328413d996ab9b79af9d4098af3a65b885c4ca64'
+ '328413d996ab9b79af9d4098af3a65b885c4ca64',
], $request->getHash());
self::assertEquals($l11n, $request->getHeader()->getL11n());
diff --git a/tests/Message/Http/ResponseTest.php b/tests/Message/Http/ResponseTest.php
index 7567a1595..232029260 100644
--- a/tests/Message/Http/ResponseTest.php
+++ b/tests/Message/Http/ResponseTest.php
@@ -10,13 +10,16 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Message\Http;
-use phpOMS\Localization\Localization;
use phpOMS\Message\Http\Response;
use phpOMS\System\MimeType;
+/**
+ * @internal
+ */
class ResponseTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
@@ -49,10 +52,10 @@ class ResponseTest extends \PHPUnit\Framework\TestCase
6,
false,
1.13,
- 'json_string'
+ 'json_string',
];
- $response->set('view', new class extends \phpOMS\Views\View {
+ $response->set('view', new class() extends \phpOMS\Views\View {
public function toArray() : array
{
return ['view_string'];
@@ -63,7 +66,7 @@ class ResponseTest extends \PHPUnit\Framework\TestCase
$response->set('int', $data[3]);
$response->set('bool', $data[4]);
$response->set('float', $data[5]);
- $response->set('jsonSerializable', new class implements \JsonSerializable {
+ $response->set('jsonSerializable', new class() implements \JsonSerializable {
public function jsonSerialize()
{
return 'json_string';
@@ -80,7 +83,7 @@ class ResponseTest extends \PHPUnit\Framework\TestCase
public function testInvalidResponseData() : void
{
$response = new Response();
- $response->set('invalid', new class {});
+ $response->set('invalid', new class() {});
self::assertEquals([], $response->toArray());
}
}
diff --git a/tests/Message/Http/RestTest.php b/tests/Message/Http/RestTest.php
index e1c29cec4..19f76d934 100644
--- a/tests/Message/Http/RestTest.php
+++ b/tests/Message/Http/RestTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Message\Http;
@@ -18,6 +19,9 @@ use phpOMS\Message\Http\RequestMethod;
use phpOMS\Message\Http\Rest;
use phpOMS\Uri\Http;
+/**
+ * @internal
+ */
class RestTest extends \PHPUnit\Framework\TestCase
{
public function testRequest() : void
diff --git a/tests/Message/Mail/ImapTest.php b/tests/Message/Mail/ImapTest.php
index 87a2f1fa2..1130ba262 100644
--- a/tests/Message/Mail/ImapTest.php
+++ b/tests/Message/Mail/ImapTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Message\Mail;
use phpOMS\Message\Mail\Imap;
+/**
+ * @internal
+ */
class ImapTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
diff --git a/tests/Message/Mail/MailTest.php b/tests/Message/Mail/MailTest.php
index e3ded7be8..60875a6f5 100644
--- a/tests/Message/Mail/MailTest.php
+++ b/tests/Message/Mail/MailTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Message\Mail;
-
+/**
+ * @internal
+ */
class MailTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/Message/Mail/NntpTest.php b/tests/Message/Mail/NntpTest.php
index 0abc8d17d..07a69d2e3 100644
--- a/tests/Message/Mail/NntpTest.php
+++ b/tests/Message/Mail/NntpTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Message\Mail;
-
+/**
+ * @internal
+ */
class NntpTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/Message/Mail/Pop3Test.php b/tests/Message/Mail/Pop3Test.php
index 3047145c5..7e590923c 100644
--- a/tests/Message/Mail/Pop3Test.php
+++ b/tests/Message/Mail/Pop3Test.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Message\Mail;
-
+/**
+ * @internal
+ */
class Pop3Test extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/Message/RequestSourceTest.php b/tests/Message/RequestSourceTest.php
index 006fc6d27..b3a390c40 100644
--- a/tests/Message/RequestSourceTest.php
+++ b/tests/Message/RequestSourceTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Message;
@@ -17,11 +18,14 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Message\RequestSource;
+/**
+ * @internal
+ */
class RequestSourceTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(4, \count(RequestSource::getConstants()));
+ self::assertCount(4, RequestSource::getConstants());
self::assertEquals(0, RequestSource::WEB);
self::assertEquals(1, RequestSource::CONSOLE);
self::assertEquals(2, RequestSource::SOCKET);
diff --git a/tests/Message/ResponseAbstractTest.php b/tests/Message/ResponseAbstractTest.php
index b3e668b1a..67e06fd04 100644
--- a/tests/Message/ResponseAbstractTest.php
+++ b/tests/Message/ResponseAbstractTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Message;
@@ -17,13 +18,16 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Message\ResponseAbstract;
+/**
+ * @internal
+ */
class ResponseAbstractTest extends \PHPUnit\Framework\TestCase
{
protected $response = null;
protected function setUp() : void
{
- $this->response = new class extends ResponseAbstract
+ $this->response = new class() extends ResponseAbstract
{
public function toArray() : array
{
@@ -39,7 +43,7 @@ class ResponseAbstractTest extends \PHPUnit\Framework\TestCase
public function testDefault() : void
{
- self::assertEquals(null, $this->response->get('asdf'));
+ self::assertNull($this->response->get('asdf'));
self::assertEquals('', $this->response->getBody());
}
@@ -48,6 +52,6 @@ class ResponseAbstractTest extends \PHPUnit\Framework\TestCase
self::assertEquals([1], $this->response->jsonSerialize());
$this->response->set('asdf', false);
- self::assertEquals(false, $this->response->get('asdf'));
+ self::assertFalse($this->response->get('asdf'));
}
}
diff --git a/tests/Message/ResponseTypeTest.php b/tests/Message/ResponseTypeTest.php
index 1396e1e02..0ef514ab4 100644
--- a/tests/Message/ResponseTypeTest.php
+++ b/tests/Message/ResponseTypeTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Message;
@@ -17,11 +18,14 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Message\ResponseType;
+/**
+ * @internal
+ */
class ResponseTypeTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(3, \count(ResponseType::getConstants()));
+ self::assertCount(3, ResponseType::getConstants());
self::assertEquals(0, ResponseType::HTTP);
self::assertEquals(1, ResponseType::SOCKET);
self::assertEquals(2, ResponseType::CONSOLE);
diff --git a/tests/Message/Socket/RequestTest.php b/tests/Message/Socket/RequestTest.php
index 956c7fab0..46b256e29 100644
--- a/tests/Message/Socket/RequestTest.php
+++ b/tests/Message/Socket/RequestTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Message\Socket;
-
+/**
+ * @internal
+ */
class RequestTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/Message/Socket/ResponseTest.php b/tests/Message/Socket/ResponseTest.php
index 44ab1031c..2b21b4342 100644
--- a/tests/Message/Socket/ResponseTest.php
+++ b/tests/Message/Socket/ResponseTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Message\Socket;
-
+/**
+ * @internal
+ */
class ResponseTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/Model/Html/HeadTest.php b/tests/Model/Html/HeadTest.php
index 78fa5b408..0956b3b87 100644
--- a/tests/Model/Html/HeadTest.php
+++ b/tests/Model/Html/HeadTest.php
@@ -10,12 +10,16 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Model\Html;
use phpOMS\Asset\AssetType;
use phpOMS\Model\Html\Head;
+/**
+ * @internal
+ */
class HeadTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
diff --git a/tests/Model/Html/MetaTest.php b/tests/Model/Html/MetaTest.php
index b2807b412..3219271b1 100644
--- a/tests/Model/Html/MetaTest.php
+++ b/tests/Model/Html/MetaTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Model\Html;
use phpOMS\Model\Html\Meta;
+/**
+ * @internal
+ */
class MetaTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
diff --git a/tests/Model/Message/DomActionTest.php b/tests/Model/Message/DomActionTest.php
index a4c4a31b3..8210bf6dd 100644
--- a/tests/Model/Message/DomActionTest.php
+++ b/tests/Model/Message/DomActionTest.php
@@ -10,16 +10,20 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\phpOMS\Model\Message;
use phpOMS\Model\Message\DomAction;
+/**
+ * @internal
+ */
class DomActionTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(9, \count(DomAction::getConstants()));
+ self::assertCount(9, DomAction::getConstants());
self::assertEquals(DomAction::getConstants(), \array_unique(DomAction::getConstants()));
self::assertEquals(0, DomAction::CREATE_BEFORE);
diff --git a/tests/Model/Message/DomTest.php b/tests/Model/Message/DomTest.php
index cbf23fdeb..a3dea12f0 100644
--- a/tests/Model/Message/DomTest.php
+++ b/tests/Model/Message/DomTest.php
@@ -1,4 +1,4 @@
- 5,
'msg' => 'msg',
'title' => 'title',
- 'level' => NotifyType::ERROR
+ 'level' => NotifyType::ERROR,
], $obj->toArray());
self::assertEquals(\json_encode([
@@ -68,7 +71,7 @@ class NotifyTest extends \PHPUnit\Framework\TestCase
'stay' => 5,
'msg' => 'msg',
'title' => 'title',
- 'level' => NotifyType::ERROR
+ 'level' => NotifyType::ERROR,
]), $obj->serialize());
self::assertEquals([
@@ -77,7 +80,7 @@ class NotifyTest extends \PHPUnit\Framework\TestCase
'stay' => 5,
'msg' => 'msg',
'title' => 'title',
- 'level' => NotifyType::ERROR
+ 'level' => NotifyType::ERROR,
], $obj->jsonSerialize());
$obj2 = new Notify();
diff --git a/tests/Model/Message/NotifyTypeTest.php b/tests/Model/Message/NotifyTypeTest.php
index 2e14d87ae..a60a21395 100644
--- a/tests/Model/Message/NotifyTypeTest.php
+++ b/tests/Model/Message/NotifyTypeTest.php
@@ -10,16 +10,20 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\phpOMS\Model\Message;
use phpOMS\Model\Message\NotifyType;
+/**
+ * @internal
+ */
class NotifyTypeTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(5, \count(NotifyType::getConstants()));
+ self::assertCount(5, NotifyType::getConstants());
self::assertEquals(NotifyType::getConstants(), \array_unique(NotifyType::getConstants()));
self::assertEquals(0, NotifyType::BINARY);
diff --git a/tests/Model/Message/RedirectTest.php b/tests/Model/Message/RedirectTest.php
index 501217f9b..218f9974c 100644
--- a/tests/Model/Message/RedirectTest.php
+++ b/tests/Model/Message/RedirectTest.php
@@ -1,4 +1,4 @@
-toArray()['uri']);
self::assertEquals(0, $obj->toArray()['time']);
- self::assertEquals(false, $obj->toArray()['new']);
+ self::assertFalse($obj->toArray()['new']);
}
public function testSetGet() : void
diff --git a/tests/Model/Message/ReloadTest.php b/tests/Model/Message/ReloadTest.php
index dd176ce70..2444a57f3 100644
--- a/tests/Model/Message/ReloadTest.php
+++ b/tests/Model/Message/ReloadTest.php
@@ -1,4 +1,4 @@
-load();
- $testObj = new class {
+ $testObj = new class() {
public $test = 1;
public function test() : void
diff --git a/tests/Module/ModuleAbstractTest.php b/tests/Module/ModuleAbstractTest.php
index ca2713cb8..2f5c88aa9 100644
--- a/tests/Module/ModuleAbstractTest.php
+++ b/tests/Module/ModuleAbstractTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Module;
@@ -17,6 +18,9 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Module\ModuleAbstract;
+/**
+ * @internal
+ */
class ModuleAbstractTest extends \PHPUnit\Framework\TestCase
{
public function testModuleAbstract() : void
diff --git a/tests/Module/ModuleManagerTest.php b/tests/Module/ModuleManagerTest.php
index 426f4d4f1..d005365f4 100644
--- a/tests/Module/ModuleManagerTest.php
+++ b/tests/Module/ModuleManagerTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Module;
@@ -20,13 +21,16 @@ use phpOMS\Router\Router;
require_once __DIR__ . '/../Autoloader.php';
+/**
+ * @internal
+ */
class ModuleManagerTest extends \PHPUnit\Framework\TestCase
{
protected $app = null;
protected function setUp() : void
{
- $this->app = new class extends ApplicationAbstract { protected $appName = 'Api'; };
+ $this->app = new class() extends ApplicationAbstract { protected $appName = 'Api'; };
$this->app->appName = 'Api';
$this->app->dbPool = $GLOBALS['dbpool'];
$this->app->dispatcher = new Dispatcher($this->app);
diff --git a/tests/Module/NullModuleTest.php b/tests/Module/NullModuleTest.php
index 9bde20f66..b2cc23f8c 100644
--- a/tests/Module/NullModuleTest.php
+++ b/tests/Module/NullModuleTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Module;
@@ -18,11 +19,14 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\ApplicationAbstract;
use phpOMS\Module\NullModule;
+/**
+ * @internal
+ */
class NullModuleTest extends \PHPUnit\Framework\TestCase
{
public function testModule() : void
{
- $app = new class extends ApplicationAbstract
+ $app = new class() extends ApplicationAbstract
{
};
diff --git a/tests/Module/PackageManagerTest.php b/tests/Module/PackageManagerTest.php
index 1ee4087f2..b71d02a6f 100644
--- a/tests/Module/PackageManagerTest.php
+++ b/tests/Module/PackageManagerTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Module;
@@ -19,6 +20,9 @@ use phpOMS\Module\PackageManager;
use phpOMS\System\File\Local\Directory;
use phpOMS\Utils\IO\Zip\Zip;
+/**
+ * @internal
+ */
class PackageManagerTest extends \PHPUnit\Framework\TestCase
{
public static function setUpBeforeClass() : void
@@ -110,7 +114,7 @@ class PackageManagerTest extends \PHPUnit\Framework\TestCase
);
$package->extract(__DIR__ . '/testPackageExtracted');
- \file_put_contents(__DIR__ . '/testPackageExtracted/info.json', ' ', FILE_APPEND);
+ \file_put_contents(__DIR__ . '/testPackageExtracted/info.json', ' ', \FILE_APPEND);
self::assertFalse($package->isValid());
}
@@ -126,8 +130,8 @@ class PackageManagerTest extends \PHPUnit\Framework\TestCase
$package->extract(__DIR__ . '/testPackageExtracted');
$package->cleanup();
- self::assertFalse(\file_exists(__DIR__ . '/testPackage.zip'));
- self::assertFalse(\file_exists(__DIR__ . '/testPackageExtracted'));
+ self::assertFileNotExists(__DIR__ . '/testPackage.zip');
+ self::assertFileNotExists(__DIR__ . '/testPackageExtracted');
}
public static function tearDownAfterClass() : void
diff --git a/tests/Router/RouteVerbTest.php b/tests/Router/RouteVerbTest.php
index 8273eb51f..6ed9f5179 100644
--- a/tests/Router/RouteVerbTest.php
+++ b/tests/Router/RouteVerbTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Router;
@@ -17,6 +18,9 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Router\RouteVerb;
+/**
+ * @internal
+ */
class RouteVerbTest extends \PHPUnit\Framework\TestCase
{
public function testEnum() : void
diff --git a/tests/Router/RouterTest.php b/tests/Router/RouterTest.php
index 2bf109a40..aa5621679 100644
--- a/tests/Router/RouterTest.php
+++ b/tests/Router/RouterTest.php
@@ -10,21 +10,25 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Router;
-use phpOMS\Message\Http\Request;
-use phpOMS\Router\Router;
-use phpOMS\Account\Account;
use Modules\Admin\Controller\BackendController;
use Modules\Admin\Models\PermissionState;
-use phpOMS\Account\PermissionType;
+use phpOMS\Account\Account;
use phpOMS\Account\PermissionAbstract;
+use phpOMS\Account\PermissionType;
+use phpOMS\Message\Http\Request;
+use phpOMS\Router\Router;
use phpOMS\Router\RouteVerb;
use phpOMS\Uri\Http;
require_once __DIR__ . '/../Autoloader.php';
+/**
+ * @internal
+ */
class RouterTest extends \PHPUnit\Framework\TestCase
{
public function testAttributes() : void
diff --git a/tests/Router/routerTestFile.php b/tests/Router/routerTestFile.php
index 3387f798d..71703ccf7 100644
--- a/tests/Router/routerTestFile.php
+++ b/tests/Router/routerTestFile.php
@@ -1,9 +1,9 @@
- [
0 => [
"dest" => "\Modules\Admin\Controller:viewSettingsGeneral",
"verb" => 1,
- ]
- ]
+ ],
+ ],
];
diff --git a/tests/Router/routerTestFilePermission.php b/tests/Router/routerTestFilePermission.php
index fa13038d8..5e2a02c2d 100644
--- a/tests/Router/routerTestFilePermission.php
+++ b/tests/Router/routerTestFilePermission.php
@@ -1,4 +1,4 @@
- PermissionType::READ,
'state' => PermissionState::SETTINGS,
],
- ]
- ]
+ ],
+ ],
];
diff --git a/tests/Security/PhpCodeTest.php b/tests/Security/PhpCodeTest.php
index f03784bb6..5e4646611 100644
--- a/tests/Security/PhpCodeTest.php
+++ b/tests/Security/PhpCodeTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Security;
@@ -17,6 +18,9 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Security\PhpCode;
+/**
+ * @internal
+ */
class RouteVerbTest extends \PHPUnit\Framework\TestCase
{
public function testHasUnicode() : void
diff --git a/tests/Security/Sample/hasDeprecated.php b/tests/Security/Sample/hasDeprecated.php
index 76b58d259..a85bcb96c 100644
--- a/tests/Security/Sample/hasDeprecated.php
+++ b/tests/Security/Sample/hasDeprecated.php
@@ -1,4 +1,4 @@
- '',
'geo' => [
'lat' => 0,
- 'long' => 0
+ 'long' => 0,
],
- ]
+ ],
];
$address = new Address();
@@ -65,9 +69,9 @@ class AddressTest extends \PHPUnit\Framework\TestCase
'state' => '',
'geo' => [
'lat' => 0,
- 'long' => 0
+ 'long' => 0,
],
- ]
+ ],
];
$address = new Address();
diff --git a/tests/Stdlib/Base/AddressTypeTest.php b/tests/Stdlib/Base/AddressTypeTest.php
index 5dcc75b5e..e2fed7d67 100644
--- a/tests/Stdlib/Base/AddressTypeTest.php
+++ b/tests/Stdlib/Base/AddressTypeTest.php
@@ -10,16 +10,20 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Stdlib\Base;
use phpOMS\Stdlib\Base\AddressType;
+/**
+ * @internal
+ */
class AddressTypeTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(7, \count(AddressType::getconstants()));
+ self::assertCount(7, AddressType::getconstants());
self::assertEquals(1, AddressType::HOME);
self::assertEquals(2, AddressType::BUSINESS);
self::assertEquals(3, AddressType::SHIPPING);
diff --git a/tests/Stdlib/Base/EnumArrayDemo.php b/tests/Stdlib/Base/EnumArrayDemo.php
index 42e1c2cb3..7058adc04 100644
--- a/tests/Stdlib/Base/EnumArrayDemo.php
+++ b/tests/Stdlib/Base/EnumArrayDemo.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Stdlib\Base;
diff --git a/tests/Stdlib/Base/EnumArrayTest.php b/tests/Stdlib/Base/EnumArrayTest.php
index 1433285cb..eb2e96e38 100644
--- a/tests/Stdlib/Base/EnumArrayTest.php
+++ b/tests/Stdlib/Base/EnumArrayTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Stdlib\Base;
-
+/**
+ * @internal
+ */
class EnumArrayTest extends \PHPUnit\Framework\TestCase
{
public function testGetSet() : void
@@ -24,7 +27,7 @@ class EnumArrayTest extends \PHPUnit\Framework\TestCase
self::assertTrue(EnumArrayDemo::isValidName('ENUM1'));
self::assertFalse(EnumArrayDemo::isValidName('enum1'));
- self::assertEquals(['ENUM1' => 1, 'ENUM2' => 'abc'], EnumArrayDemo::getConstants(), true);
+ self::assertEquals(['ENUM1' => 1, 'ENUM2' => 'abc'], EnumArrayDemo::getConstants());
self::assertTrue(EnumArrayDemo::isValidValue(1));
self::assertTrue(EnumArrayDemo::isValidValue('abc'));
diff --git a/tests/Stdlib/Base/EnumDemo.php b/tests/Stdlib/Base/EnumDemo.php
index c8e36eb79..a49f98e93 100644
--- a/tests/Stdlib/Base/EnumDemo.php
+++ b/tests/Stdlib/Base/EnumDemo.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Stdlib\Base;
diff --git a/tests/Stdlib/Base/EnumTest.php b/tests/Stdlib/Base/EnumTest.php
index 62f943fb6..8a050525e 100644
--- a/tests/Stdlib/Base/EnumTest.php
+++ b/tests/Stdlib/Base/EnumTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Stdlib\Base;
-
+/**
+ * @internal
+ */
class EnumTest extends \PHPUnit\Framework\TestCase
{
public function testGetSet() : void
@@ -21,7 +24,7 @@ class EnumTest extends \PHPUnit\Framework\TestCase
self::assertTrue(EnumDemo::isValidName('ENUM1'));
self::assertFalse(EnumDemo::isValidName('enum1'));
- self::assertEquals(['ENUM1' => 1, 'ENUM2' => ';l'], EnumDemo::getConstants(), true);
+ self::assertEquals(['ENUM1' => 1, 'ENUM2' => ';l'], EnumDemo::getConstants());
self::assertTrue(EnumDemo::isValidValue(1));
self::assertTrue(EnumDemo::isValidValue(';l'));
diff --git a/tests/Stdlib/Base/Exception/InvalidEnumNameTest.php b/tests/Stdlib/Base/Exception/InvalidEnumNameTest.php
index 67a9b76f9..489f4a481 100644
--- a/tests/Stdlib/Base/Exception/InvalidEnumNameTest.php
+++ b/tests/Stdlib/Base/Exception/InvalidEnumNameTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Stdlib\Base\Exception;
use phpOMS\Stdlib\Base\Exception\InvalidEnumName;
+/**
+ * @internal
+ */
class InvalidEnumNameTest extends \PHPUnit\Framework\TestCase
{
public function testException() : void
diff --git a/tests/Stdlib/Base/Exception/InvalidEnumValueTest.php b/tests/Stdlib/Base/Exception/InvalidEnumValueTest.php
index 327668654..8469e3fde 100644
--- a/tests/Stdlib/Base/Exception/InvalidEnumValueTest.php
+++ b/tests/Stdlib/Base/Exception/InvalidEnumValueTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Stdlib\Base\Exception;
use phpOMS\Stdlib\Base\Exception\InvalidEnumValue;
+/**
+ * @internal
+ */
class InvalidEnumValueTest extends \PHPUnit\Framework\TestCase
{
public function testException() : void
diff --git a/tests/Stdlib/Base/IbanTest.php b/tests/Stdlib/Base/IbanTest.php
index b5fb77381..d8a2f20c1 100644
--- a/tests/Stdlib/Base/IbanTest.php
+++ b/tests/Stdlib/Base/IbanTest.php
@@ -10,12 +10,16 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Stdlib\Base;
use phpOMS\Localization\ISO3166TwoEnum;
use phpOMS\Stdlib\Base\Iban;
+/**
+ * @internal
+ */
class IbanTest extends \PHPUnit\Framework\TestCase
{
public function testAttributes() : void
diff --git a/tests/Stdlib/Base/LocationTest.php b/tests/Stdlib/Base/LocationTest.php
index 1385b783f..f840c8810 100644
--- a/tests/Stdlib/Base/LocationTest.php
+++ b/tests/Stdlib/Base/LocationTest.php
@@ -10,12 +10,16 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Stdlib\Base;
use phpOMS\Stdlib\Base\AddressType;
use phpOMS\Stdlib\Base\Location;
+/**
+ * @internal
+ */
class LocationTest extends \PHPUnit\Framework\TestCase
{
public function testAttributes() : void
diff --git a/tests/Stdlib/Base/NullLocationTest.php b/tests/Stdlib/Base/NullLocationTest.php
index d8403b18e..a86939205 100644
--- a/tests/Stdlib/Base/NullLocationTest.php
+++ b/tests/Stdlib/Base/NullLocationTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Stdlib\Base;
-
+/**
+ * @internal
+ */
class NullLocationTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/Stdlib/Base/PhoneTypeTest.php b/tests/Stdlib/Base/PhoneTypeTest.php
index 90ea961ac..3851e3c26 100644
--- a/tests/Stdlib/Base/PhoneTypeTest.php
+++ b/tests/Stdlib/Base/PhoneTypeTest.php
@@ -10,16 +10,20 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Stdlib\Base;
use phpOMS\Stdlib\Base\PhoneType;
+/**
+ * @internal
+ */
class PhoneTypeTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(4, \count(PhoneType::getConstants()));
+ self::assertCount(4, PhoneType::getConstants());
self::assertEquals(1, PhoneType::HOME);
self::assertEquals(2, PhoneType::BUSINESS);
self::assertEquals(3, PhoneType::MOBILE);
diff --git a/tests/Stdlib/Base/SmartDateTimeTest.php b/tests/Stdlib/Base/SmartDateTimeTest.php
index 7864d606a..363be99db 100644
--- a/tests/Stdlib/Base/SmartDateTimeTest.php
+++ b/tests/Stdlib/Base/SmartDateTimeTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Stdlib\Base;
use phpOMS\Stdlib\Base\SmartDateTime;
+/**
+ * @internal
+ */
class SmartDateTimeTest extends \PHPUnit\Framework\TestCase
{
public function testAttributes() : void
@@ -57,7 +61,7 @@ class SmartDateTimeTest extends \PHPUnit\Framework\TestCase
self::assertEquals(\date('w', $expected->getTimestamp()), SmartDateTime::getDayOfWeek((int) $expected->format('Y'), (int) $expected->format('m'), (int) $expected->format('d')));
self::assertEquals(\date('w', $expected->getTimestamp()), $obj->getFirstDayOfWeek());
- self::assertEquals(42, \count($obj->getMonthCalendar()));
- self::assertEquals(42, \count($obj->getMonthCalendar(1)));
+ self::assertCount(42, $obj->getMonthCalendar());
+ self::assertCount(42, $obj->getMonthCalendar(1));
}
}
diff --git a/tests/Stdlib/Graph/BinaryTreeTest.php b/tests/Stdlib/Graph/BinaryTreeTest.php
index 02fe1a459..d2b84b156 100644
--- a/tests/Stdlib/Graph/BinaryTreeTest.php
+++ b/tests/Stdlib/Graph/BinaryTreeTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Stdlib\Graph;
-
+/**
+ * @internal
+ */
class BinaryTreeTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/Stdlib/Graph/EdgeTest.php b/tests/Stdlib/Graph/EdgeTest.php
index e548ee535..77ee57f67 100644
--- a/tests/Stdlib/Graph/EdgeTest.php
+++ b/tests/Stdlib/Graph/EdgeTest.php
@@ -10,12 +10,16 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Stdlib\Graph;
use phpOMS\Stdlib\Graph\Edge;
use phpOMS\Stdlib\Graph\Node;
+/**
+ * @internal
+ */
class EdgeTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
diff --git a/tests/Stdlib/Graph/GraphTest.php b/tests/Stdlib/Graph/GraphTest.php
index e479d1e4d..ce3644781 100644
--- a/tests/Stdlib/Graph/GraphTest.php
+++ b/tests/Stdlib/Graph/GraphTest.php
@@ -10,21 +10,25 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Stdlib\Graph;
use phpOMS\Stdlib\Graph\Graph;
+/**
+ * @internal
+ */
class GraphTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
{
$graph = new Graph();
- self::assertEquals(null, $graph->getNode('invalid'));
+ self::assertNull($graph->getNode('invalid'));
self::assertEquals([], $graph->getNodes());
- self::assertEquals(null, $graph->getEdge('invalid'));
+ self::assertNull($graph->getEdge('invalid'));
self::assertEquals([], $graph->getEdges());
self::assertEquals([], $graph->getEdgesOfNode('invalid'));
diff --git a/tests/Stdlib/Graph/NodeTest.php b/tests/Stdlib/Graph/NodeTest.php
index bc5dbe807..4c4434955 100644
--- a/tests/Stdlib/Graph/NodeTest.php
+++ b/tests/Stdlib/Graph/NodeTest.php
@@ -10,17 +10,21 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Stdlib\Graph;
use phpOMS\Stdlib\Graph\Node;
+/**
+ * @internal
+ */
class NodeTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
{
$node = new Node();
- self::assertEquals(null, $node->getData());
+ self::assertNull($node->getData());
}
public function testGetSet() : void
@@ -29,6 +33,6 @@ class NodeTest extends \PHPUnit\Framework\TestCase
self::assertEquals(1, $node->getData());
$node->setData(false);
- self::assertEquals(false, $node->getData());
+ self::assertFalse($node->getData());
}
}
diff --git a/tests/Stdlib/Graph/TreeTest.php b/tests/Stdlib/Graph/TreeTest.php
index 2509ac7a8..1f91bcee0 100644
--- a/tests/Stdlib/Graph/TreeTest.php
+++ b/tests/Stdlib/Graph/TreeTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Stdlib\Graph;
-
+/**
+ * @internal
+ */
class TreeTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/Stdlib/Map/KeyTypeTest.php b/tests/Stdlib/Map/KeyTypeTest.php
index 79bd5275d..c5ec14fe6 100644
--- a/tests/Stdlib/Map/KeyTypeTest.php
+++ b/tests/Stdlib/Map/KeyTypeTest.php
@@ -10,16 +10,20 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Stdlib\Map;
use phpOMS\Stdlib\Map\KeyType;
+/**
+ * @internal
+ */
class KeyTypeTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(2, \count(KeyType::getConstants()));
+ self::assertCount(2, KeyType::getConstants());
self::assertEquals(0, KeyType::SINGLE);
self::assertEquals(1, KeyType::MULTIPLE);
}
diff --git a/tests/Stdlib/Map/MultiMapTest.php b/tests/Stdlib/Map/MultiMapTest.php
index e94672bf9..938bf1e5d 100644
--- a/tests/Stdlib/Map/MultiMapTest.php
+++ b/tests/Stdlib/Map/MultiMapTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Stdlib\Map;
@@ -17,6 +18,9 @@ use phpOMS\Stdlib\Map\KeyType;
use phpOMS\Stdlib\Map\MultiMap;
use phpOMS\Stdlib\Map\OrderType;
+/**
+ * @internal
+ */
class MultiMapTest extends \PHPUnit\Framework\TestCase
{
public function testAttributes() : void
@@ -154,11 +158,11 @@ class MultiMapTest extends \PHPUnit\Framework\TestCase
$set = $map->set('d', 'val4');
$set = $map->set('b', 'val4');
- self::assertEquals(3, \count($map->keys()));
- self::assertEquals(2, \count($map->values()));
+ self::assertCount(3, $map->keys());
+ self::assertCount(2, $map->values());
- self::assertTrue(\is_array($map->keys()));
- self::assertTrue(\is_array($map->values()));
+ self::assertIsArray($map->keys());
+ self::assertIsArray($map->values());
}
public function testSiblingsAny() : void
@@ -172,10 +176,10 @@ class MultiMapTest extends \PHPUnit\Framework\TestCase
$siblings = $map->getSiblings('d');
self::assertEmpty($siblings);
- self::assertEquals(0, \count($siblings));
+ self::assertCount(0, $siblings);
$siblings = $map->getSiblings('b');
- self::assertEquals(1, \count($siblings));
+ self::assertCount(1, $siblings);
self::assertEquals(['a'], $siblings);
}
@@ -194,16 +198,16 @@ class MultiMapTest extends \PHPUnit\Framework\TestCase
$removed = $map->remove('c');
self::assertTrue($removed);
- self::assertEquals(2, \count($map->keys()));
- self::assertEquals(1, \count($map->values()));
+ self::assertCount(2, $map->keys());
+ self::assertCount(1, $map->values());
$removed = $map->removeKey('d');
self::assertFalse($removed);
$removed = $map->removeKey('a');
self::assertTrue($removed);
- self::assertEquals(1, \count($map->keys()));
- self::assertEquals(1, \count($map->values()));
+ self::assertCount(1, $map->keys());
+ self::assertCount(1, $map->values());
}
public function testBasicAddExact() : void
@@ -225,7 +229,7 @@ class MultiMapTest extends \PHPUnit\Framework\TestCase
self::assertEquals(1, $map->count());
self::assertTrue($inserted);
self::assertEquals('val1', $map->get(['a', 'b']));
- self::assertEquals(null, $map->get(['b', 'a']));
+ self::assertNull($map->get(['b', 'a']));
}
public function testOverwriteExact() : void
@@ -336,16 +340,16 @@ class MultiMapTest extends \PHPUnit\Framework\TestCase
$inserted = $map->add(['a', 'b'], 'val2');
$inserted = $map->add(['a', 'c'], 'val3', false);
- self::assertEquals(2, \count($map->keys()));
- self::assertEquals(2, \count($map->values()));
+ self::assertCount(2, $map->keys());
+ self::assertCount(2, $map->values());
$removed = $map->remove('d');
self::assertFalse($removed);
$removed = $map->remove(['a', 'b']);
self::assertTrue($removed);
- self::assertEquals(1, \count($map->keys()));
- self::assertEquals(1, \count($map->values()));
+ self::assertCount(1, $map->keys());
+ self::assertCount(1, $map->values());
self::assertFalse($map->removeKey(['a', 'b']));
}
@@ -357,16 +361,16 @@ class MultiMapTest extends \PHPUnit\Framework\TestCase
$inserted = $map->add(['a', 'b'], 'val2');
$inserted = $map->add(['a', 'c'], 'val3', false);
- self::assertEquals(2, \count($map->keys()));
- self::assertEquals(2, \count($map->values()));
+ self::assertCount(2, $map->keys());
+ self::assertCount(2, $map->values());
$removed = $map->remove(['b', 'a']);
self::assertFalse($removed);
$removed = $map->remove(['a', 'b']);
self::assertTrue($removed);
- self::assertEquals(1, \count($map->keys()));
- self::assertEquals(1, \count($map->values()));
+ self::assertCount(1, $map->keys());
+ self::assertCount(1, $map->values());
self::assertFalse($map->removeKey(['a', 'b']));
}
diff --git a/tests/Stdlib/Map/OrderTypeTest.php b/tests/Stdlib/Map/OrderTypeTest.php
index 8d3580861..8241578c9 100644
--- a/tests/Stdlib/Map/OrderTypeTest.php
+++ b/tests/Stdlib/Map/OrderTypeTest.php
@@ -10,16 +10,20 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Stdlib\Map;
use phpOMS\Stdlib\Map\OrderType;
+/**
+ * @internal
+ */
class OrderTypeTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(2, \count(OrderType::getConstants()));
+ self::assertCount(2, OrderType::getConstants());
self::assertEquals(0, OrderType::LOOSE);
self::assertEquals(1, OrderType::STRICT);
}
diff --git a/tests/Stdlib/Queue/PriorityModeTest.php b/tests/Stdlib/Queue/PriorityModeTest.php
index 121b28838..1ccedd6fe 100644
--- a/tests/Stdlib/Queue/PriorityModeTest.php
+++ b/tests/Stdlib/Queue/PriorityModeTest.php
@@ -10,16 +10,20 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Stdlib\Queue;
use phpOMS\Stdlib\Queue\PriorityMode;
+/**
+ * @internal
+ */
class PriorityModeTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(4, \count(PriorityMode::getConstants()));
+ self::assertCount(4, PriorityMode::getConstants());
self::assertEquals(1, PriorityMode::FIFO);
self::assertEquals(2, PriorityMode::LIFO);
self::assertEquals(4, PriorityMode::HIGHEST);
diff --git a/tests/Stdlib/Queue/PriorityQueueTest.php b/tests/Stdlib/Queue/PriorityQueueTest.php
index 0dce0a0fa..5b2452858 100644
--- a/tests/Stdlib/Queue/PriorityQueueTest.php
+++ b/tests/Stdlib/Queue/PriorityQueueTest.php
@@ -10,12 +10,16 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Stdlib\Queue;
use phpOMS\Stdlib\Queue\PriorityMode;
use phpOMS\Stdlib\Queue\PriorityQueue;
+/**
+ * @internal
+ */
class PriorityQueueTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
diff --git a/tests/System/File/ContentPutModeTest.php b/tests/System/File/ContentPutModeTest.php
index 12c2ee95d..7028b1905 100644
--- a/tests/System/File/ContentPutModeTest.php
+++ b/tests/System/File/ContentPutModeTest.php
@@ -10,16 +10,20 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\System\File;
use phpOMS\System\File\ContentPutMode;
+/**
+ * @internal
+ */
class ContentPutModeTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(4, \count(ContentPutMode::getConstants()));
+ self::assertCount(4, ContentPutMode::getConstants());
self::assertEquals(ContentPutMode::getConstants(), \array_unique(ContentPutMode::getConstants()));
self::assertEquals(1, ContentPutMode::APPEND);
diff --git a/tests/System/File/ExtensionTypeTest.php b/tests/System/File/ExtensionTypeTest.php
index f945877a6..234a76e4b 100644
--- a/tests/System/File/ExtensionTypeTest.php
+++ b/tests/System/File/ExtensionTypeTest.php
@@ -10,16 +10,20 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\System\File;
use phpOMS\System\File\ExtensionType;
+/**
+ * @internal
+ */
class ExtensionTypeTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(11, \count(ExtensionType::getConstants()));
+ self::assertCount(11, ExtensionType::getConstants());
self::assertEquals(ExtensionType::getConstants(), \array_unique(ExtensionType::getConstants()));
self::assertEquals(1, ExtensionType::UNKNOWN);
diff --git a/tests/System/File/FileUtilsTest.php b/tests/System/File/FileUtilsTest.php
index 2f748a226..c5a7b0b2a 100644
--- a/tests/System/File/FileUtilsTest.php
+++ b/tests/System/File/FileUtilsTest.php
@@ -10,12 +10,16 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\System\File;
use phpOMS\System\File\ExtensionType;
use phpOMS\System\File\FileUtils;
+/**
+ * @internal
+ */
class FileUtilsTest extends \PHPUnit\Framework\TestCase
{
public function testExtension() : void
diff --git a/tests/System/File/Ftp/DirectoryTest.php b/tests/System/File/Ftp/DirectoryTest.php
index 9afef4ed1..7a75c24df 100644
--- a/tests/System/File/Ftp/DirectoryTest.php
+++ b/tests/System/File/Ftp/DirectoryTest.php
@@ -10,13 +10,16 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\System\File\Ftp;
use phpOMS\System\File\Ftp\Directory;
-use phpOMS\System\File\PathException;
use phpOMS\Uri\Http;
+/**
+ * @internal
+ */
class DirectoryTest extends \PHPUnit\Framework\TestCase
{
const BASE = 'ftp://test:123456@127.0.0.1:20';
@@ -68,18 +71,18 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase
$dirTestPath = __DIR__ . '/dirtest';
self::assertTrue(Directory::copy($this->con, $dirTestPath, __DIR__ . '/newdirtest'));
- self::assertTrue(\file_exists(__DIR__ . '/newdirtest/sub/path/test3.txt'));
+ self::assertFileExists(__DIR__ . '/newdirtest/sub/path/test3.txt');
self::assertTrue(Directory::delete($this->con, $dirTestPath));
self::assertFalse(Directory::exists($this->con, $dirTestPath));
self::assertTrue(Directory::move($this->con, __DIR__ . '/newdirtest', $dirTestPath));
- self::assertTrue(\file_exists($dirTestPath . '/sub/path/test3.txt'));
+ self::assertFileExists($dirTestPath . '/sub/path/test3.txt');
self::assertEquals(4, Directory::count($this->con, $dirTestPath));
self::assertEquals(1, Directory::count($this->con, $dirTestPath, false));
- self::assertEquals(6, \count(Directory::list($this->con, $dirTestPath)));
+ self::assertCount(6, Directory::list($this->con, $dirTestPath));
}
public function testInvalidListPath() : void
diff --git a/tests/System/File/Ftp/FileTest.php b/tests/System/File/Ftp/FileTest.php
index 6439321ba..35dd2ec71 100644
--- a/tests/System/File/Ftp/FileTest.php
+++ b/tests/System/File/Ftp/FileTest.php
@@ -10,15 +10,18 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\System\File\Ftp;
use phpOMS\System\File\ContentPutMode;
use phpOMS\System\File\Ftp\Directory;
use phpOMS\System\File\Ftp\File;
-use phpOMS\System\File\PathException;
use phpOMS\Uri\Http;
+/**
+ * @internal
+ */
class FileTest extends \PHPUnit\Framework\TestCase
{
const BASE = 'ftp://test:123456@127.0.0.1:20';
diff --git a/tests/System/File/Ftp/test.txt b/tests/System/File/Ftp/test.txt
deleted file mode 100644
index 4aa80c5f0..000000000
--- a/tests/System/File/Ftp/test.txt
+++ /dev/null
@@ -1 +0,0 @@
-test5test3test4
\ No newline at end of file
diff --git a/tests/System/File/Local/DirectoryTest.php b/tests/System/File/Local/DirectoryTest.php
index 20821463e..ed26a8009 100644
--- a/tests/System/File/Local/DirectoryTest.php
+++ b/tests/System/File/Local/DirectoryTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\System\File\Local;
use phpOMS\System\File\Local\Directory;
+/**
+ * @internal
+ */
class DirectoryTest extends \PHPUnit\Framework\TestCase
{
public function testStatic() : void
@@ -51,19 +55,19 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase
{
$dirTestPath = __DIR__ . '/dirtest';
self::assertTrue(Directory::copy($dirTestPath, __DIR__ . '/newdirtest'));
- self::assertTrue(\file_exists(__DIR__ . '/newdirtest/sub/path/test3.txt'));
+ self::assertFileExists(__DIR__ . '/newdirtest/sub/path/test3.txt');
self::assertTrue(Directory::delete($dirTestPath));
self::assertFalse(Directory::exists($dirTestPath));
self::assertTrue(Directory::move(__DIR__ . '/newdirtest', $dirTestPath));
- self::assertTrue(\file_exists($dirTestPath . '/sub/path/test3.txt'));
+ self::assertFileExists($dirTestPath . '/sub/path/test3.txt');
self::assertEquals(4, Directory::count($dirTestPath));
self::assertEquals(1, Directory::count($dirTestPath, false));
- self::assertEquals(6, \count(Directory::list($dirTestPath)));
- self::assertEquals(3, \count(Directory::listByExtension($dirTestPath, 'txt')));
+ self::assertCount(6, Directory::list($dirTestPath));
+ self::assertCount(3, Directory::listByExtension($dirTestPath, 'txt'));
}
public function testInvalidListPath() : void
diff --git a/tests/System/File/Local/FileTest.php b/tests/System/File/Local/FileTest.php
index ae6932ebc..362530d16 100644
--- a/tests/System/File/Local/FileTest.php
+++ b/tests/System/File/Local/FileTest.php
@@ -10,12 +10,16 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\System\File\Local;
use phpOMS\System\File\ContentPutMode;
use phpOMS\System\File\Local\File;
+/**
+ * @internal
+ */
class FileTest extends \PHPUnit\Framework\TestCase
{
public function testStatic() : void
diff --git a/tests/System/File/Local/LocalStorageTest.php b/tests/System/File/Local/LocalStorageTest.php
index bf33c97e0..245a68341 100644
--- a/tests/System/File/Local/LocalStorageTest.php
+++ b/tests/System/File/Local/LocalStorageTest.php
@@ -10,12 +10,16 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\System\File\Local;
use phpOMS\System\File\ContentPutMode;
use phpOMS\System\File\Local\LocalStorage;
+/**
+ * @internal
+ */
class LocalStorageTest extends \PHPUnit\Framework\TestCase
{
public function testFile() : void
@@ -111,18 +115,18 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase
{
$dirTestPath = __DIR__ . '/dirtest';
self::assertTrue(LocalStorage::copy($dirTestPath, __DIR__ . '/newdirtest'));
- self::assertTrue(\file_exists(__DIR__ . '/newdirtest/sub/path/test3.txt'));
+ self::assertFileExists(__DIR__ . '/newdirtest/sub/path/test3.txt');
self::assertTrue(LocalStorage::delete($dirTestPath));
self::assertFalse(LocalStorage::exists($dirTestPath));
self::assertTrue(LocalStorage::move(__DIR__ . '/newdirtest', $dirTestPath));
- self::assertTrue(\file_exists($dirTestPath . '/sub/path/test3.txt'));
+ self::assertFileExists($dirTestPath . '/sub/path/test3.txt');
self::assertEquals(4, LocalStorage::count($dirTestPath));
self::assertEquals(1, LocalStorage::count($dirTestPath, false));
- self::assertEquals(6, \count(LocalStorage::list($dirTestPath)));
+ self::assertCount(6, LocalStorage::list($dirTestPath));
}
public function testInvalidPutPath() : void
diff --git a/tests/System/File/PathExceptionTest.php b/tests/System/File/PathExceptionTest.php
index 8cc72f019..3cf9895db 100644
--- a/tests/System/File/PathExceptionTest.php
+++ b/tests/System/File/PathExceptionTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\System\File;
use phpOMS\System\File\PathException;
+/**
+ * @internal
+ */
class PathExceptionTest extends \PHPUnit\Framework\TestCase
{
public function testConstructor() : void
diff --git a/tests/System/File/PermissionExceptionTest.php b/tests/System/File/PermissionExceptionTest.php
index 5d052a74d..1f7fe6d39 100644
--- a/tests/System/File/PermissionExceptionTest.php
+++ b/tests/System/File/PermissionExceptionTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\System\File;
use phpOMS\System\File\PermissionException;
+/**
+ * @internal
+ */
class PermissionExceptionTest extends \PHPUnit\Framework\TestCase
{
public function testConstructor() : void
diff --git a/tests/System/File/StorageTest.php b/tests/System/File/StorageTest.php
index 9fd71b53d..12a0b06ab 100644
--- a/tests/System/File/StorageTest.php
+++ b/tests/System/File/StorageTest.php
@@ -10,12 +10,16 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\System\File;
use phpOMS\System\File\Local\LocalStorage;
use phpOMS\System\File\Storage;
+/**
+ * @internal
+ */
class StorageTest extends \PHPUnit\Framework\TestCase
{
public function testStorage() : void
diff --git a/tests/System/MimeTypeTest.php b/tests/System/MimeTypeTest.php
index af00ce374..45e45d0da 100644
--- a/tests/System/MimeTypeTest.php
+++ b/tests/System/MimeTypeTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\System;
@@ -17,6 +18,9 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\System\MimeType;
+/**
+ * @internal
+ */
class MimeTypeTest extends \PHPUnit\Framework\TestCase
{
public function testEnum() : void
diff --git a/tests/System/OperatingSystemTest.php b/tests/System/OperatingSystemTest.php
index 795edc1ab..9f7f6f0a4 100644
--- a/tests/System/OperatingSystemTest.php
+++ b/tests/System/OperatingSystemTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\System;
@@ -18,6 +19,9 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\System\OperatingSystem;
use phpOMS\System\SystemType;
+/**
+ * @internal
+ */
class OperatingSystemTest extends \PHPUnit\Framework\TestCase
{
public function testSystem() : void
diff --git a/tests/System/SystemTypeTest.php b/tests/System/SystemTypeTest.php
index 13879224b..d50bbb655 100644
--- a/tests/System/SystemTypeTest.php
+++ b/tests/System/SystemTypeTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\System;
@@ -17,11 +18,14 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\System\SystemType;
+/**
+ * @internal
+ */
class SystemTypeTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(4, \count(SystemType::getConstants()));
+ self::assertCount(4, SystemType::getConstants());
self::assertEquals(1, SystemType::UNKNOWN);
self::assertEquals(2, SystemType::WIN);
self::assertEquals(3, SystemType::LINUX);
diff --git a/tests/System/SystemUtilsTest.php b/tests/System/SystemUtilsTest.php
index 3b478bd2d..c62e3c368 100644
--- a/tests/System/SystemUtilsTest.php
+++ b/tests/System/SystemUtilsTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\System;
@@ -19,6 +20,8 @@ require_once __DIR__ . '/../Autoloader.php';
/**
* @testdox phpOMS\System\SystemUtils: System information
+ *
+ * @internal
*/
class SystemUtilsTest extends \PHPUnit\Framework\TestCase
{
@@ -29,11 +32,11 @@ class SystemUtilsTest extends \PHPUnit\Framework\TestCase
{
self::assertGreaterThan(0, SystemUtils::getRAM());
- if (\stristr(PHP_OS, 'WIN')) {
+ if (\stristr(\PHP_OS, 'WIN')) {
self::assertEquals(0, SystemUtils::getRAMUsage());
}
- if (!\stristr(PHP_OS, 'WIN')) {
+ if (!\stristr(\PHP_OS, 'WIN')) {
self::assertGreaterThan(0, SystemUtils::getRAMUsage());
}
}
diff --git a/tests/UnhandledHandlerTest.php b/tests/UnhandledHandlerTest.php
index 4399895b7..23ae4e221 100644
--- a/tests/UnhandledHandlerTest.php
+++ b/tests/UnhandledHandlerTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests;
use phpOMS\UnhandledHandler;
+/**
+ * @internal
+ */
class UnhandledHandlerTest extends \PHPUnit\Framework\TestCase
{
public function testErrorHandling() : void
@@ -23,7 +27,7 @@ class UnhandledHandlerTest extends \PHPUnit\Framework\TestCase
\set_error_handler(['\phpOMS\UnhandledHandler', 'errorHandler']);
\register_shutdown_function(['\phpOMS\UnhandledHandler', 'shutdownHandler']);
- \trigger_error('', E_USER_ERROR);
+ \trigger_error('', \E_USER_ERROR);
UnhandledHandler::shutdownHandler();
diff --git a/tests/Uri/ArgumentTest.php b/tests/Uri/ArgumentTest.php
index 78e5f44a3..15783416d 100644
--- a/tests/Uri/ArgumentTest.php
+++ b/tests/Uri/ArgumentTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Uri;
@@ -17,6 +18,9 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Uri\Argument;
+/**
+ * @internal
+ */
class ArgumentTest extends \PHPUnit\Framework\TestCase
{
public function testAttributes() : void
@@ -73,4 +77,4 @@ class ArgumentTest extends \PHPUnit\Framework\TestCase
$obj->setRootPath('a');
self::assertEquals('a', $obj->getRootPath());
}
-}
\ No newline at end of file
+}
diff --git a/tests/Uri/HttpTest.php b/tests/Uri/HttpTest.php
index fbc346e38..44ef359fd 100644
--- a/tests/Uri/HttpTest.php
+++ b/tests/Uri/HttpTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Uri;
@@ -17,6 +18,9 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Uri\Http;
+/**
+ * @internal
+ */
class HttpTest extends \PHPUnit\Framework\TestCase
{
public function testAttributes() : void
diff --git a/tests/Uri/InvalidUriExceptionTest.php b/tests/Uri/InvalidUriExceptionTest.php
index 2b666d047..7af5bdfc1 100644
--- a/tests/Uri/InvalidUriExceptionTest.php
+++ b/tests/Uri/InvalidUriExceptionTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Uri;
@@ -17,6 +18,9 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Uri\InvalidUriException;
+/**
+ * @internal
+ */
class InvalidUriExceptionTest extends \PHPUnit\Framework\TestCase
{
public function testException() : void
diff --git a/tests/Uri/UriFactoryTest.php b/tests/Uri/UriFactoryTest.php
index ad27986bf..be0a73cda 100644
--- a/tests/Uri/UriFactoryTest.php
+++ b/tests/Uri/UriFactoryTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Uri;
@@ -18,6 +19,9 @@ use phpOMS\Uri\UriFactory;
require_once __DIR__ . '/../Autoloader.php';
+/**
+ * @internal
+ */
class UriFactoryTest extends \PHPUnit\Framework\TestCase
{
diff --git a/tests/Uri/UriSchemeTest.php b/tests/Uri/UriSchemeTest.php
index e5627eabf..226da4d9e 100644
--- a/tests/Uri/UriSchemeTest.php
+++ b/tests/Uri/UriSchemeTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Uri;
@@ -17,6 +18,9 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Uri\UriScheme;
+/**
+ * @internal
+ */
class UriSchemeTest extends \PHPUnit\Framework\TestCase
{
public function testEnum() : void
diff --git a/tests/Utils/ArrayUtilsTest.php b/tests/Utils/ArrayUtilsTest.php
index f3f3702b4..bd6d52cf3 100644
--- a/tests/Utils/ArrayUtilsTest.php
+++ b/tests/Utils/ArrayUtilsTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils;
@@ -17,6 +18,9 @@ use phpOMS\Utils\ArrayUtils;
require_once __DIR__ . '/../Autoloader.php';
+/**
+ * @internal
+ */
class ArrayUtilsTest extends \PHPUnit\Framework\TestCase
{
public function testArrayGetSet() : void
@@ -82,7 +86,7 @@ class ArrayUtilsTest extends \PHPUnit\Framework\TestCase
],
2 => '2a',
3 => false,
- 'c' => null
+ 'c' => null,
];
$expected_str = "['a' => ['aa' => 1, 'ab' => [0 => 'aba', 1 => 'ab0', ], ], 2 => '2a', 3 => false, 'c' => null, ]";
@@ -125,8 +129,8 @@ class ArrayUtilsTest extends \PHPUnit\Framework\TestCase
public function testArg() : void
{
- self::assertEquals(null, ArrayUtils::hasArg('--testNull', $_SERVER['argv']));
- self::assertEquals(null, ArrayUtils::getArg('--testNull', $_SERVER['argv']));
+ self::assertNull(ArrayUtils::hasArg('--testNull', $_SERVER['argv']));
+ self::assertNull(ArrayUtils::getArg('--testNull', $_SERVER['argv']));
if (ArrayUtils::getArg('--configuration', $_SERVER['argv']) !== null) {
self::assertGreaterThan(0, ArrayUtils::hasArg('--configuration', $_SERVER['argv']));
@@ -138,6 +142,6 @@ class ArrayUtilsTest extends \PHPUnit\Framework\TestCase
{
self::expectException(\InvalidArgumentException::class);
- ArrayUtils::stringify([new class {}]);
+ ArrayUtils::stringify([new class() {}]);
}
}
diff --git a/tests/Utils/Barcode/AztecTest.php b/tests/Utils/Barcode/AztecTest.php
index a011d816e..3ec02ad90 100644
--- a/tests/Utils/Barcode/AztecTest.php
+++ b/tests/Utils/Barcode/AztecTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Barcode;
-
+/**
+ * @internal
+ */
class AztecTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/Utils/Barcode/C128AbstractTest.php b/tests/Utils/Barcode/C128AbstractTest.php
index 31798ce09..776db8923 100644
--- a/tests/Utils/Barcode/C128AbstractTest.php
+++ b/tests/Utils/Barcode/C128AbstractTest.php
@@ -10,18 +10,22 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Barcode;
use phpOMS\Utils\Barcode\C128Abstract;
+/**
+ * @internal
+ */
class C128AbstractTest extends \PHPUnit\Framework\TestCase
{
protected $obj = null;
protected function setUp() : void
{
- $this->obj = new class extends C128Abstract {};
+ $this->obj = new class() extends C128Abstract {};
}
public function testSetGet() : void
diff --git a/tests/Utils/Barcode/C128aTest.php b/tests/Utils/Barcode/C128aTest.php
index 0b8c15c67..7c62dc20c 100644
--- a/tests/Utils/Barcode/C128aTest.php
+++ b/tests/Utils/Barcode/C128aTest.php
@@ -10,12 +10,16 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Barcode;
use phpOMS\Utils\Barcode\C128a;
use phpOMS\Utils\Barcode\OrientationType;
+/**
+ * @internal
+ */
class C128aTest extends \PHPUnit\Framework\TestCase
{
protected function setUp() : void
@@ -37,7 +41,7 @@ class C128aTest extends \PHPUnit\Framework\TestCase
$img = new C128a('ABCDEFG0123()+-', 200, 50);
$img->saveToPngFile($path);
- self::assertTrue(\file_exists($path));
+ self::assertFileExists($path);
}
public function testImageJpg() : void
@@ -50,7 +54,7 @@ class C128aTest extends \PHPUnit\Framework\TestCase
$img = new C128a('ABCDEFG0123()+-', 200, 50);
$img->saveToJpgFile($path);
- self::assertTrue(\file_exists($path));
+ self::assertFileExists($path);
}
public function testOrientationAndMargin() : void
@@ -64,7 +68,7 @@ class C128aTest extends \PHPUnit\Framework\TestCase
$img->setMargin(2);
$img->saveToPngFile($path);
- self::assertTrue(\file_exists($path));
+ self::assertFileExists($path);
}
public function testValidString() : void
diff --git a/tests/Utils/Barcode/C128bTest.php b/tests/Utils/Barcode/C128bTest.php
index 33c332c88..c79a84943 100644
--- a/tests/Utils/Barcode/C128bTest.php
+++ b/tests/Utils/Barcode/C128bTest.php
@@ -10,12 +10,16 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Barcode;
use phpOMS\Utils\Barcode\C128b;
use phpOMS\Utils\Barcode\OrientationType;
+/**
+ * @internal
+ */
class C128bTest extends \PHPUnit\Framework\TestCase
{
protected function setUp() : void
@@ -37,7 +41,7 @@ class C128bTest extends \PHPUnit\Framework\TestCase
$img = new C128b('ABcdeFG0123+-!@?', 200, 50);
$img->saveToPngFile($path);
- self::assertTrue(\file_exists($path));
+ self::assertFileExists($path);
}
public function testImageJpg() : void
@@ -50,7 +54,7 @@ class C128bTest extends \PHPUnit\Framework\TestCase
$img = new C128b('ABcdeFG0123+-!@?', 200, 50);
$img->saveToJpgFile($path);
- self::assertTrue(\file_exists($path));
+ self::assertFileExists($path);
}
public function testOrientationAndMargin() : void
@@ -64,7 +68,7 @@ class C128bTest extends \PHPUnit\Framework\TestCase
$img->setMargin(2);
$img->saveToPngFile($path);
- self::assertTrue(\file_exists($path));
+ self::assertFileExists($path);
}
public function testValidString() : void
diff --git a/tests/Utils/Barcode/C128cTest.php b/tests/Utils/Barcode/C128cTest.php
index 8f4989cf6..730d0c282 100644
--- a/tests/Utils/Barcode/C128cTest.php
+++ b/tests/Utils/Barcode/C128cTest.php
@@ -10,12 +10,16 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Barcode;
use phpOMS\Utils\Barcode\C128c;
use phpOMS\Utils\Barcode\OrientationType;
+/**
+ * @internal
+ */
class C128cTest extends \PHPUnit\Framework\TestCase
{
protected function setUp() : void
@@ -37,7 +41,7 @@ class C128cTest extends \PHPUnit\Framework\TestCase
$img = new C128c('412163', 200, 50);
$img->saveToPngFile($path);
- self::assertTrue(\file_exists($path));
+ self::assertFileExists($path);
}
public function testImageJpg() : void
@@ -50,7 +54,7 @@ class C128cTest extends \PHPUnit\Framework\TestCase
$img = new C128c('412163', 200, 50);
$img->saveToJpgFile($path);
- self::assertTrue(\file_exists($path));
+ self::assertFileExists($path);
}
public function testOrientationAndMargin() : void
@@ -64,6 +68,6 @@ class C128cTest extends \PHPUnit\Framework\TestCase
$img->setMargin(2);
$img->saveToPngFile($path);
- self::assertTrue(\file_exists($path));
+ self::assertFileExists($path);
}
}
diff --git a/tests/Utils/Barcode/C25Test.php b/tests/Utils/Barcode/C25Test.php
index bd9121cf1..85505ac3a 100644
--- a/tests/Utils/Barcode/C25Test.php
+++ b/tests/Utils/Barcode/C25Test.php
@@ -10,12 +10,16 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Barcode;
use phpOMS\Utils\Barcode\C25;
use phpOMS\Utils\Barcode\OrientationType;
+/**
+ * @internal
+ */
class C25Test extends \PHPUnit\Framework\TestCase
{
protected function setUp() : void
@@ -37,7 +41,7 @@ class C25Test extends \PHPUnit\Framework\TestCase
$img = new C25('1234567890', 150, 50);
$img->saveToPngFile($path);
- self::assertTrue(\file_exists($path));
+ self::assertFileExists($path);
}
public function testImageJpg() : void
@@ -50,7 +54,7 @@ class C25Test extends \PHPUnit\Framework\TestCase
$img = new C25('1234567890', 150, 50);
$img->saveToJpgFile($path);
- self::assertTrue(\file_exists($path));
+ self::assertFileExists($path);
}
public function testOrientationAndMargin() : void
@@ -64,7 +68,7 @@ class C25Test extends \PHPUnit\Framework\TestCase
$img->setMargin(2);
$img->saveToPngFile($path);
- self::assertTrue(\file_exists($path));
+ self::assertFileExists($path);
}
public function testValidString() : void
diff --git a/tests/Utils/Barcode/C39Test.php b/tests/Utils/Barcode/C39Test.php
index 460e80c94..93edfebd7 100644
--- a/tests/Utils/Barcode/C39Test.php
+++ b/tests/Utils/Barcode/C39Test.php
@@ -10,12 +10,16 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Barcode;
use phpOMS\Utils\Barcode\C39;
use phpOMS\Utils\Barcode\OrientationType;
+/**
+ * @internal
+ */
class C39Test extends \PHPUnit\Framework\TestCase
{
protected function setUp() : void
@@ -37,7 +41,7 @@ class C39Test extends \PHPUnit\Framework\TestCase
$img = new C39('ABCDEFG0123+-', 150, 50);
$img->saveToPngFile($path);
- self::assertTrue(\file_exists($path));
+ self::assertFileExists($path);
}
public function testImageJpg() : void
@@ -50,7 +54,7 @@ class C39Test extends \PHPUnit\Framework\TestCase
$img = new C39('ABCDEFG0123+-', 150, 50);
$img->saveToJpgFile($path);
- self::assertTrue(\file_exists($path));
+ self::assertFileExists($path);
}
public function testOrientationAndMargin() : void
@@ -64,7 +68,7 @@ class C39Test extends \PHPUnit\Framework\TestCase
$img->setMargin(2);
$img->saveToPngFile($path);
- self::assertTrue(\file_exists($path));
+ self::assertFileExists($path);
}
public function testValidString() : void
diff --git a/tests/Utils/Barcode/CodebarTest.php b/tests/Utils/Barcode/CodebarTest.php
index 28e0ce346..5a3a1f981 100644
--- a/tests/Utils/Barcode/CodebarTest.php
+++ b/tests/Utils/Barcode/CodebarTest.php
@@ -10,12 +10,16 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Barcode;
use phpOMS\Utils\Barcode\Codebar;
use phpOMS\Utils\Barcode\OrientationType;
+/**
+ * @internal
+ */
class CodebarTest extends \PHPUnit\Framework\TestCase
{
protected function setUp() : void
@@ -37,7 +41,7 @@ class CodebarTest extends \PHPUnit\Framework\TestCase
$img = new Codebar('412163', 200, 50);
$img->saveToPngFile($path);
- self::assertTrue(\file_exists($path));
+ self::assertFileExists($path);
}
public function testImageJpg() : void
@@ -50,7 +54,7 @@ class CodebarTest extends \PHPUnit\Framework\TestCase
$img = new Codebar('412163', 200, 50);
$img->saveToJpgFile($path);
- self::assertTrue(\file_exists($path));
+ self::assertFileExists($path);
}
public function testOrientationAndMargin() : void
@@ -64,7 +68,7 @@ class CodebarTest extends \PHPUnit\Framework\TestCase
$img->setMargin(2);
$img->saveToPngFile($path);
- self::assertTrue(\file_exists($path));
+ self::assertFileExists($path);
}
public function testValidString() : void
diff --git a/tests/Utils/Barcode/DatamatrixTest.php b/tests/Utils/Barcode/DatamatrixTest.php
index 100b0e9cb..f8f0e6216 100644
--- a/tests/Utils/Barcode/DatamatrixTest.php
+++ b/tests/Utils/Barcode/DatamatrixTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Barcode;
-
+/**
+ * @internal
+ */
class DatamatrixTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/Utils/Barcode/HIBCCTest.php b/tests/Utils/Barcode/HIBCCTest.php
index c4ba06c1a..31617c0d8 100644
--- a/tests/Utils/Barcode/HIBCCTest.php
+++ b/tests/Utils/Barcode/HIBCCTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Barcode;
-
+/**
+ * @internal
+ */
class HIBCCTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/Utils/Barcode/OrientationTypeTest.php b/tests/Utils/Barcode/OrientationTypeTest.php
index e52c4a68c..2fc18342b 100644
--- a/tests/Utils/Barcode/OrientationTypeTest.php
+++ b/tests/Utils/Barcode/OrientationTypeTest.php
@@ -10,16 +10,20 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Barcode;
use phpOMS\Utils\Barcode\OrientationType;
+/**
+ * @internal
+ */
class OrientationTypeTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(2, \count(OrientationType::getConstants()));
+ self::assertCount(2, OrientationType::getConstants());
self::assertEquals(OrientationType::getConstants(), \array_unique(OrientationType::getConstants()));
self::assertEquals(0, OrientationType::HORIZONTAL);
diff --git a/tests/Utils/Barcode/QRTest.php b/tests/Utils/Barcode/QRTest.php
index 97b766948..9e5510c4b 100644
--- a/tests/Utils/Barcode/QRTest.php
+++ b/tests/Utils/Barcode/QRTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Barcode;
-
+/**
+ * @internal
+ */
class QRTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/Utils/ColorUtilsTest.php b/tests/Utils/ColorUtilsTest.php
index 15d978684..0680e054c 100644
--- a/tests/Utils/ColorUtilsTest.php
+++ b/tests/Utils/ColorUtilsTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils;
@@ -17,6 +18,9 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Utils\ColorUtils;
+/**
+ * @internal
+ */
class ColorUtilsTest extends \PHPUnit\Framework\TestCase
{
public function testColor() : void
diff --git a/tests/Utils/Compression/LZWTest.php b/tests/Utils/Compression/LZWTest.php
index fe1073d30..a6b76a1a6 100644
--- a/tests/Utils/Compression/LZWTest.php
+++ b/tests/Utils/Compression/LZWTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Compression;
use phpOMS\Utils\Compression\LZW;
+/**
+ * @internal
+ */
class LZWTest extends \PHPUnit\Framework\TestCase
{
public function testLZW() : void
diff --git a/tests/Utils/Converter/AngleTypeTest.php b/tests/Utils/Converter/AngleTypeTest.php
index 18477216b..2aba638e9 100644
--- a/tests/Utils/Converter/AngleTypeTest.php
+++ b/tests/Utils/Converter/AngleTypeTest.php
@@ -10,16 +10,20 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Converter;
use phpOMS\Utils\Converter\AngleType;
+/**
+ * @internal
+ */
class AngleTypeTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(10, \count(AngleType::getConstants()));
+ self::assertCount(10, AngleType::getConstants());
self::assertEquals(AngleType::getConstants(), \array_unique(AngleType::getConstants()));
self::assertEquals('deg', AngleType::DEGREE);
diff --git a/tests/Utils/Converter/AreaTypeTest.php b/tests/Utils/Converter/AreaTypeTest.php
index 7e60caad9..246a649c5 100644
--- a/tests/Utils/Converter/AreaTypeTest.php
+++ b/tests/Utils/Converter/AreaTypeTest.php
@@ -10,16 +10,20 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Converter;
use phpOMS\Utils\Converter\AreaType;
+/**
+ * @internal
+ */
class AreaTypeTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(13, \count(AreaType::getConstants()));
+ self::assertCount(13, AreaType::getConstants());
self::assertEquals(AreaType::getConstants(), \array_unique(AreaType::getConstants()));
self::assertEquals('ft', AreaType::SQUARE_FEET);
diff --git a/tests/Utils/Converter/CurrencyTest.php b/tests/Utils/Converter/CurrencyTest.php
index 947d298df..66316fc8f 100644
--- a/tests/Utils/Converter/CurrencyTest.php
+++ b/tests/Utils/Converter/CurrencyTest.php
@@ -10,12 +10,16 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Converter;
use phpOMS\Localization\ISO4217CharEnum;
use phpOMS\Utils\Converter\Currency;
+/**
+ * @internal
+ */
class CurrencyTest extends \PHPUnit\Framework\TestCase
{
public function testCurrency() : void
diff --git a/tests/Utils/Converter/EnergyPowerTypeTest.php b/tests/Utils/Converter/EnergyPowerTypeTest.php
index 6dbf54753..4230038dd 100644
--- a/tests/Utils/Converter/EnergyPowerTypeTest.php
+++ b/tests/Utils/Converter/EnergyPowerTypeTest.php
@@ -10,16 +10,20 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Converter;
use phpOMS\Utils\Converter\EnergyPowerType;
+/**
+ * @internal
+ */
class EnergyPowerTypeTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(9, \count(EnergyPowerType::getConstants()));
+ self::assertCount(9, EnergyPowerType::getConstants());
self::assertEquals(EnergyPowerType::getConstants(), \array_unique(EnergyPowerType::getConstants()));
self::assertEquals('kWh', EnergyPowerType::KILOWATT_HOUERS);
diff --git a/tests/Utils/Converter/FileSizeTypeTest.php b/tests/Utils/Converter/FileSizeTypeTest.php
index 07003b801..061ff17ce 100644
--- a/tests/Utils/Converter/FileSizeTypeTest.php
+++ b/tests/Utils/Converter/FileSizeTypeTest.php
@@ -10,16 +10,20 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Converter;
use phpOMS\Utils\Converter\FileSizeType;
+/**
+ * @internal
+ */
class FileSizeTypeTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(10, \count(FileSizeType::getConstants()));
+ self::assertCount(10, FileSizeType::getConstants());
self::assertEquals('TB', FileSizeType::TERRABYTE);
self::assertEquals('GB', FileSizeType::GIGABYTE);
self::assertEquals('MB', FileSizeType::MEGABYTE);
diff --git a/tests/Utils/Converter/FileTest.php b/tests/Utils/Converter/FileTest.php
index c2b04dc85..28be2f592 100644
--- a/tests/Utils/Converter/FileTest.php
+++ b/tests/Utils/Converter/FileTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Converter;
use phpOMS\Utils\Converter\File;
+/**
+ * @internal
+ */
class FileTest extends \PHPUnit\Framework\TestCase
{
public function testByteSizeToString() : void
diff --git a/tests/Utils/Converter/IpTest.php b/tests/Utils/Converter/IpTest.php
index 45a4579c4..cab1cd395 100644
--- a/tests/Utils/Converter/IpTest.php
+++ b/tests/Utils/Converter/IpTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Converter;
use phpOMS\Utils\Converter\Ip;
+/**
+ * @internal
+ */
class IpTest extends \PHPUnit\Framework\TestCase
{
public function testIp() : void
diff --git a/tests/Utils/Converter/LengthTypeTest.php b/tests/Utils/Converter/LengthTypeTest.php
index 9e7a9dbfb..ce90b2c8e 100644
--- a/tests/Utils/Converter/LengthTypeTest.php
+++ b/tests/Utils/Converter/LengthTypeTest.php
@@ -10,16 +10,20 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Converter;
use phpOMS\Utils\Converter\LengthType;
+/**
+ * @internal
+ */
class LengthTypeTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(21, \count(LengthType::getConstants()));
+ self::assertCount(21, LengthType::getConstants());
self::assertEquals(LengthType::getConstants(), \array_unique(LengthType::getConstants()));
self::assertEquals('mi', LengthType::MILES);
diff --git a/tests/Utils/Converter/MeasurementTest.php b/tests/Utils/Converter/MeasurementTest.php
index e19516f76..d5bc19729 100644
--- a/tests/Utils/Converter/MeasurementTest.php
+++ b/tests/Utils/Converter/MeasurementTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Converter;
@@ -26,6 +27,9 @@ use phpOMS\Utils\Converter\TimeType;
use phpOMS\Utils\Converter\VolumeType;
use phpOMS\Utils\Converter\WeightType;
+/**
+ * @internal
+ */
class MeasurementTest extends \PHPUnit\Framework\TestCase
{
public function testTemperature() : void
diff --git a/tests/Utils/Converter/NumericTest.php b/tests/Utils/Converter/NumericTest.php
index 508966a63..00fcd36e2 100644
--- a/tests/Utils/Converter/NumericTest.php
+++ b/tests/Utils/Converter/NumericTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Converter;
use phpOMS\Utils\Converter\Numeric;
+/**
+ * @internal
+ */
class NumericTest extends \PHPUnit\Framework\TestCase
{
public function testArabicRoman() : void
diff --git a/tests/Utils/Converter/PressureTypeTest.php b/tests/Utils/Converter/PressureTypeTest.php
index cc7234bd2..5bce64667 100644
--- a/tests/Utils/Converter/PressureTypeTest.php
+++ b/tests/Utils/Converter/PressureTypeTest.php
@@ -10,16 +10,20 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Converter;
use phpOMS\Utils\Converter\PressureType;
+/**
+ * @internal
+ */
class PressureTypeTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(13, \count(PressureType::getConstants()));
+ self::assertCount(13, PressureType::getConstants());
self::assertEquals(PressureType::getConstants(), \array_unique(PressureType::getConstants()));
self::assertEquals('Pa', PressureType::PASCALS);
diff --git a/tests/Utils/Converter/SpeedTypeTest.php b/tests/Utils/Converter/SpeedTypeTest.php
index 44d28a251..3effc45d1 100644
--- a/tests/Utils/Converter/SpeedTypeTest.php
+++ b/tests/Utils/Converter/SpeedTypeTest.php
@@ -10,16 +10,20 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Converter;
use phpOMS\Utils\Converter\SpeedType;
+/**
+ * @internal
+ */
class SpeedTypeTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(34, \count(SpeedType::getConstants()));
+ self::assertCount(34, SpeedType::getConstants());
self::assertEquals(SpeedType::getConstants(), \array_unique(SpeedType::getConstants()));
self::assertEquals('mpd', SpeedType::MILES_PER_DAY);
diff --git a/tests/Utils/Converter/TemperatureTypeTest.php b/tests/Utils/Converter/TemperatureTypeTest.php
index b094420b5..a8652cd22 100644
--- a/tests/Utils/Converter/TemperatureTypeTest.php
+++ b/tests/Utils/Converter/TemperatureTypeTest.php
@@ -10,16 +10,20 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Converter;
use phpOMS\Utils\Converter\TemperatureType;
+/**
+ * @internal
+ */
class TemperatureTypeTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(8, \count(TemperatureType::getConstants()));
+ self::assertCount(8, TemperatureType::getConstants());
self::assertEquals(TemperatureType::getConstants(), \array_unique(TemperatureType::getConstants()));
self::assertEquals('celsius', TemperatureType::CELSIUS);
diff --git a/tests/Utils/Converter/TimeTypeTest.php b/tests/Utils/Converter/TimeTypeTest.php
index ef799b171..802e78f61 100644
--- a/tests/Utils/Converter/TimeTypeTest.php
+++ b/tests/Utils/Converter/TimeTypeTest.php
@@ -10,16 +10,20 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Converter;
use phpOMS\Utils\Converter\TimeType;
+/**
+ * @internal
+ */
class TimeTypeTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(9, \count(TimeType::getConstants()));
+ self::assertCount(9, TimeType::getConstants());
self::assertEquals(TimeType::getConstants(), \array_unique(TimeType::getConstants()));
self::assertEquals('ms', TimeType::MILLISECONDS);
diff --git a/tests/Utils/Converter/VolumeTypeTest.php b/tests/Utils/Converter/VolumeTypeTest.php
index ab645c4d7..a7379be02 100644
--- a/tests/Utils/Converter/VolumeTypeTest.php
+++ b/tests/Utils/Converter/VolumeTypeTest.php
@@ -10,16 +10,20 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Converter;
use phpOMS\Utils\Converter\VolumeType;
+/**
+ * @internal
+ */
class VolumeTypeTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(38, \count(VolumeType::getConstants()));
+ self::assertCount(38, VolumeType::getConstants());
self::assertEquals(VolumeType::getConstants(), \array_unique(VolumeType::getConstants()));
self::assertEquals('UK gal', VolumeType::UK_GALLON);
diff --git a/tests/Utils/Converter/WeightTypeTest.php b/tests/Utils/Converter/WeightTypeTest.php
index cc396e198..14db6ba09 100644
--- a/tests/Utils/Converter/WeightTypeTest.php
+++ b/tests/Utils/Converter/WeightTypeTest.php
@@ -10,16 +10,20 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Converter;
use phpOMS\Utils\Converter\WeightType;
+/**
+ * @internal
+ */
class WeightTypeTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(14, \count(WeightType::getConstants()));
+ self::assertCount(14, WeightType::getConstants());
self::assertEquals(WeightType::getConstants(), \array_unique(WeightType::getConstants()));
self::assertEquals('mg', WeightType::MICROGRAM);
diff --git a/tests/Utils/Encoding/CaesarTest.php b/tests/Utils/Encoding/CaesarTest.php
index bdfcb70f4..3e1bdd89d 100644
--- a/tests/Utils/Encoding/CaesarTest.php
+++ b/tests/Utils/Encoding/CaesarTest.php
@@ -10,12 +10,16 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Encoding;
use phpOMS\Utils\Encoding\Caesar;
use phpOMS\Utils\RnG\StringUtils;
+/**
+ * @internal
+ */
class CaesarTest extends \PHPUnit\Framework\TestCase
{
public function testVolume() : void
diff --git a/tests/Utils/Encoding/GrayTest.php b/tests/Utils/Encoding/GrayTest.php
index b4f7aa6ee..64a2c4e38 100644
--- a/tests/Utils/Encoding/GrayTest.php
+++ b/tests/Utils/Encoding/GrayTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Encoding;
use phpOMS\Utils\Encoding\Gray;
+/**
+ * @internal
+ */
class GrayTest extends \PHPUnit\Framework\TestCase
{
public function testEncoding() : void
diff --git a/tests/Utils/Encoding/Huffman/DictionaryTest.php b/tests/Utils/Encoding/Huffman/DictionaryTest.php
index f3468181c..565c6da58 100644
--- a/tests/Utils/Encoding/Huffman/DictionaryTest.php
+++ b/tests/Utils/Encoding/Huffman/DictionaryTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Encoding\Huffman;
use phpOMS\Utils\Encoding\Huffman\Dictionary;
+/**
+ * @internal
+ */
class DictionaryTest extends \PHPUnit\Framework\TestCase
{
public function testInvalidGetCharacter() : void
diff --git a/tests/Utils/Encoding/Huffman/HuffmanTest.php b/tests/Utils/Encoding/Huffman/HuffmanTest.php
index 9732ff61a..3cd57d189 100644
--- a/tests/Utils/Encoding/Huffman/HuffmanTest.php
+++ b/tests/Utils/Encoding/Huffman/HuffmanTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Encoding\Huffman;
use phpOMS\Utils\Encoding\Huffman\Huffman;
+/**
+ * @internal
+ */
class HuffmanTest extends \PHPUnit\Framework\TestCase
{
public function testHuffman() : void
diff --git a/tests/Utils/Encoding/XorEncodingTest.php b/tests/Utils/Encoding/XorEncodingTest.php
index 7dac05411..f3f96d83d 100644
--- a/tests/Utils/Encoding/XorEncodingTest.php
+++ b/tests/Utils/Encoding/XorEncodingTest.php
@@ -10,12 +10,16 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Encoding;
use phpOMS\Utils\Encoding\XorEncoding;
use phpOMS\Utils\RnG\StringUtils;
+/**
+ * @internal
+ */
class XorEncodingTest extends \PHPUnit\Framework\TestCase
{
public function testEncoding() : void
diff --git a/tests/Utils/Excel/ExcelTest.php b/tests/Utils/Excel/ExcelTest.php
index 55aab36c1..ab97c7ac2 100644
--- a/tests/Utils/Excel/ExcelTest.php
+++ b/tests/Utils/Excel/ExcelTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Excel;
-
+/**
+ * @internal
+ */
class ExcelTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/Utils/Git/AuthorTest.php b/tests/Utils/Git/AuthorTest.php
index c6ea58aa5..b797c29a9 100644
--- a/tests/Utils/Git/AuthorTest.php
+++ b/tests/Utils/Git/AuthorTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Git;
use phpOMS\Utils\Git\Author;
+/**
+ * @internal
+ */
class AuthorTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
diff --git a/tests/Utils/Git/BranchTest.php b/tests/Utils/Git/BranchTest.php
index 08207b9ba..3561160ba 100644
--- a/tests/Utils/Git/BranchTest.php
+++ b/tests/Utils/Git/BranchTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Git;
use phpOMS\Utils\Git\Branch;
+/**
+ * @internal
+ */
class BranchTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
diff --git a/tests/Utils/Git/CommitTest.php b/tests/Utils/Git/CommitTest.php
index 47f0c7dce..539b1718b 100644
--- a/tests/Utils/Git/CommitTest.php
+++ b/tests/Utils/Git/CommitTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Git;
@@ -19,6 +20,9 @@ use phpOMS\Utils\Git\Commit;
use phpOMS\Utils\Git\Repository;
use phpOMS\Utils\Git\Tag;
+/**
+ * @internal
+ */
class CommitTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
@@ -43,13 +47,13 @@ class CommitTest extends \PHPUnit\Framework\TestCase
self::assertTrue($commit->addFile('/some/file/path2'));
self::assertEquals([
'/some/file/path' => [],
- '/some/file/path2' => []
+ '/some/file/path2' => [],
], $commit->getFiles());
self::assertFalse($commit->removeFile('/some/file/path3'));
self::assertTrue($commit->removeFile('/some/file/path'));
self::assertEquals([
- '/some/file/path2' => []
+ '/some/file/path2' => [],
], $commit->getFiles());
}
@@ -63,9 +67,9 @@ class CommitTest extends \PHPUnit\Framework\TestCase
__DIR__ . '/CommitTest.php' => [
1 => [
'old' => ' 'test'
- ]
- ]
+ 'new' => 'test',
+ ],
+ ],
], $commit->getFiles());
}
diff --git a/tests/Utils/Git/GitTest.php b/tests/Utils/Git/GitTest.php
index 79280100d..58c3aa6dc 100644
--- a/tests/Utils/Git/GitTest.php
+++ b/tests/Utils/Git/GitTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Git;
use phpOMS\Utils\Git\Git;
+/**
+ * @internal
+ */
class GitTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
diff --git a/tests/Utils/Git/RepositoryTest.php b/tests/Utils/Git/RepositoryTest.php
index 8b80963dd..d5fedca60 100644
--- a/tests/Utils/Git/RepositoryTest.php
+++ b/tests/Utils/Git/RepositoryTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Git;
use phpOMS\Utils\Git\Repository;
+/**
+ * @internal
+ */
class RepositoryTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
diff --git a/tests/Utils/Git/TagTest.php b/tests/Utils/Git/TagTest.php
index c688cfd74..3d605116e 100644
--- a/tests/Utils/Git/TagTest.php
+++ b/tests/Utils/Git/TagTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Git;
use phpOMS\Utils\Git\Tag;
+/**
+ * @internal
+ */
class TagTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
diff --git a/tests/Utils/IO/Csv/CsvSettingsTest.php b/tests/Utils/IO/Csv/CsvSettingsTest.php
index 12ff86974..d8189fd5c 100644
--- a/tests/Utils/IO/Csv/CsvSettingsTest.php
+++ b/tests/Utils/IO/Csv/CsvSettingsTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\IO\Csv;
-
+/**
+ * @internal
+ */
class CsvSettingsTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/Utils/IO/Excel/ExcelDatabaseMapperTest.php b/tests/Utils/IO/Excel/ExcelDatabaseMapperTest.php
index e40a3a8b1..350fe0823 100644
--- a/tests/Utils/IO/Excel/ExcelDatabaseMapperTest.php
+++ b/tests/Utils/IO/Excel/ExcelDatabaseMapperTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\IO\Excel;
-
+/**
+ * @internal
+ */
class ExcelDatabaseMapperTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/Utils/IO/IODatabaseMapperTest.php b/tests/Utils/IO/IODatabaseMapperTest.php
index e66964054..1b1608a2a 100644
--- a/tests/Utils/IO/IODatabaseMapperTest.php
+++ b/tests/Utils/IO/IODatabaseMapperTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\IO;
-
+/**
+ * @internal
+ */
class IODatabaseMapperTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/Utils/IO/Json/InvalidJsonExceptionTest.php b/tests/Utils/IO/Json/InvalidJsonExceptionTest.php
index 3e6ed29ba..ccdb0ee76 100644
--- a/tests/Utils/IO/Json/InvalidJsonExceptionTest.php
+++ b/tests/Utils/IO/Json/InvalidJsonExceptionTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\IO\Json;
use phpOMS\Utils\IO\Json\InvalidJsonException;
+/**
+ * @internal
+ */
class InvalidJsonExceptionTest extends \PHPUnit\Framework\TestCase
{
public function testException() : void
diff --git a/tests/Utils/IO/Zip/GzTest.php b/tests/Utils/IO/Zip/GzTest.php
index 68e6db2db..c709a8049 100644
--- a/tests/Utils/IO/Zip/GzTest.php
+++ b/tests/Utils/IO/Zip/GzTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\IO\Gz;
use phpOMS\Utils\IO\Zip\Gz;
+/**
+ * @internal
+ */
class GzTest extends \PHPUnit\Framework\TestCase
{
public function testGz() : void
@@ -24,19 +28,19 @@ class GzTest extends \PHPUnit\Framework\TestCase
__DIR__ . '/test.gz'
));
- self::assertTrue(\file_exists(__DIR__ . '/test.gz'));
+ self::assertFileExists(__DIR__ . '/test.gz');
$a = \file_get_contents(__DIR__ . '/test a.txt');
\unlink(__DIR__ . '/test a.txt');
- self::assertFalse(\file_exists(__DIR__ . '/test a.txt'));
+ self::assertFileNotExists(__DIR__ . '/test a.txt');
self::assertTrue(Gz::unpack(__DIR__ . '/test.gz', __DIR__ . '/test a.txt'));
- self::assertTrue(\file_exists(__DIR__ . '/test a.txt'));
+ self::assertFileExists(__DIR__ . '/test a.txt');
self::assertEquals($a, \file_get_contents(__DIR__ . '/test a.txt'));
\unlink(__DIR__ . '/test.gz');
- self::assertFalse(\file_exists(__DIR__ . '/test.gz'));
+ self::assertFileNotExists(__DIR__ . '/test.gz');
self::assertFalse(Gz::unpack(__DIR__ . '/test.gz', __DIR__ . '/test a.txt'));
}
}
diff --git a/tests/Utils/IO/Zip/TarGzTest.php b/tests/Utils/IO/Zip/TarGzTest.php
index 13ede538c..fd53d7393 100644
--- a/tests/Utils/IO/Zip/TarGzTest.php
+++ b/tests/Utils/IO/Zip/TarGzTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\IO\TarGz;
use phpOMS\Utils\IO\Zip\TarGz;
+/**
+ * @internal
+ */
class TarGzTest extends \PHPUnit\Framework\TestCase
{
protected function setUp() : void
@@ -37,7 +41,7 @@ class TarGzTest extends \PHPUnit\Framework\TestCase
__DIR__ . '/test.tar.gz'
));
- self::assertTrue(\file_exists(__DIR__ . '/test.tar.gz'));
+ self::assertFileExists(__DIR__ . '/test.tar.gz');
self::assertFalse(TarGz::pack(
[
@@ -62,23 +66,23 @@ class TarGzTest extends \PHPUnit\Framework\TestCase
\rmdir(__DIR__ . '/test/sub');
\rmdir(__DIR__ . '/test');
- self::assertFalse(\file_exists(__DIR__ . '/test a.txt'));
- self::assertFalse(\file_exists(__DIR__ . '/test b.md'));
- self::assertFalse(\file_exists(__DIR__ . '/test/test c.txt'));
- self::assertFalse(\file_exists(__DIR__ . '/test/test d.txt'));
- self::assertFalse(\file_exists(__DIR__ . '/test/sub/test e.txt'));
- self::assertFalse(\file_exists(__DIR__ . '/test/sub'));
- self::assertFalse(\file_exists(__DIR__ . '/test'));
+ self::assertFileNotExists(__DIR__ . '/test a.txt');
+ self::assertFileNotExists(__DIR__ . '/test b.md');
+ self::assertFileNotExists(__DIR__ . '/test/test c.txt');
+ self::assertFileNotExists(__DIR__ . '/test/test d.txt');
+ self::assertFileNotExists(__DIR__ . '/test/sub/test e.txt');
+ self::assertFileNotExists(__DIR__ . '/test/sub');
+ self::assertFileNotExists(__DIR__ . '/test');
self::assertTrue(TarGz::unpack(__DIR__ . '/test.tar.gz', __DIR__));
- self::assertTrue(\file_exists(__DIR__ . '/test a.txt'));
- self::assertTrue(\file_exists(__DIR__ . '/test b.md'));
- self::assertTrue(\file_exists(__DIR__ . '/test/test c.txt'));
- self::assertTrue(\file_exists(__DIR__ . '/test/test d.txt'));
- self::assertTrue(\file_exists(__DIR__ . '/test/sub/test e.txt'));
- self::assertTrue(\file_exists(__DIR__ . '/test/sub'));
- self::assertTrue(\file_exists(__DIR__ . '/test'));
+ self::assertFileExists(__DIR__ . '/test a.txt');
+ self::assertFileExists(__DIR__ . '/test b.md');
+ self::assertFileExists(__DIR__ . '/test/test c.txt');
+ self::assertFileExists(__DIR__ . '/test/test d.txt');
+ self::assertFileExists(__DIR__ . '/test/sub/test e.txt');
+ self::assertFileExists(__DIR__ . '/test/sub');
+ self::assertFileExists(__DIR__ . '/test');
self::assertEquals($a, \file_get_contents(__DIR__ . '/test a.txt'));
self::assertEquals($b, \file_get_contents(__DIR__ . '/test b.md'));
@@ -87,7 +91,7 @@ class TarGzTest extends \PHPUnit\Framework\TestCase
self::assertEquals($e, \file_get_contents(__DIR__ . '/test/sub/test e.txt'));
\unlink(__DIR__ . '/test.tar.gz');
- self::assertFalse(\file_exists(__DIR__ . '/test.tar.gz'));
+ self::assertFileNotExists(__DIR__ . '/test.tar.gz');
self::assertFalse(TarGz::unpack(__DIR__ . '/test.tar.gz', __DIR__));
}
}
diff --git a/tests/Utils/IO/Zip/TarTest.php b/tests/Utils/IO/Zip/TarTest.php
index 15acbbc86..b19c2411a 100644
--- a/tests/Utils/IO/Zip/TarTest.php
+++ b/tests/Utils/IO/Zip/TarTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\IO\Tar;
use phpOMS\Utils\IO\Zip\Tar;
+/**
+ * @internal
+ */
class TarTest extends \PHPUnit\Framework\TestCase
{
protected function setUp() : void
@@ -37,7 +41,7 @@ class TarTest extends \PHPUnit\Framework\TestCase
__DIR__ . '/test.tar'
));
- self::assertTrue(\file_exists(__DIR__ . '/test.tar'));
+ self::assertFileExists(__DIR__ . '/test.tar');
self::assertFalse(Tar::pack(
[
@@ -62,23 +66,23 @@ class TarTest extends \PHPUnit\Framework\TestCase
\rmdir(__DIR__ . '/test/sub');
\rmdir(__DIR__ . '/test');
- self::assertFalse(\file_exists(__DIR__ . '/test a.txt'));
- self::assertFalse(\file_exists(__DIR__ . '/test b.md'));
- self::assertFalse(\file_exists(__DIR__ . '/test/test c.txt'));
- self::assertFalse(\file_exists(__DIR__ . '/test/test d.txt'));
- self::assertFalse(\file_exists(__DIR__ . '/test/sub/test e.txt'));
- self::assertFalse(\file_exists(__DIR__ . '/test/sub'));
- self::assertFalse(\file_exists(__DIR__ . '/test'));
+ self::assertFileNotExists(__DIR__ . '/test a.txt');
+ self::assertFileNotExists(__DIR__ . '/test b.md');
+ self::assertFileNotExists(__DIR__ . '/test/test c.txt');
+ self::assertFileNotExists(__DIR__ . '/test/test d.txt');
+ self::assertFileNotExists(__DIR__ . '/test/sub/test e.txt');
+ self::assertFileNotExists(__DIR__ . '/test/sub');
+ self::assertFileNotExists(__DIR__ . '/test');
self::assertTrue(Tar::unpack(__DIR__ . '/test.tar', __DIR__));
- self::assertTrue(\file_exists(__DIR__ . '/test a.txt'));
- self::assertTrue(\file_exists(__DIR__ . '/test b.md'));
- self::assertTrue(\file_exists(__DIR__ . '/test/test c.txt'));
- self::assertTrue(\file_exists(__DIR__ . '/test/test d.txt'));
- self::assertTrue(\file_exists(__DIR__ . '/test/sub/test e.txt'));
- self::assertTrue(\file_exists(__DIR__ . '/test/sub'));
- self::assertTrue(\file_exists(__DIR__ . '/test'));
+ self::assertFileExists(__DIR__ . '/test a.txt');
+ self::assertFileExists(__DIR__ . '/test b.md');
+ self::assertFileExists(__DIR__ . '/test/test c.txt');
+ self::assertFileExists(__DIR__ . '/test/test d.txt');
+ self::assertFileExists(__DIR__ . '/test/sub/test e.txt');
+ self::assertFileExists(__DIR__ . '/test/sub');
+ self::assertFileExists(__DIR__ . '/test');
self::assertEquals($a, \file_get_contents(__DIR__ . '/test a.txt'));
self::assertEquals($b, \file_get_contents(__DIR__ . '/test b.md'));
@@ -87,7 +91,7 @@ class TarTest extends \PHPUnit\Framework\TestCase
self::assertEquals($e, \file_get_contents(__DIR__ . '/test/sub/test e.txt'));
\unlink(__DIR__ . '/test.tar');
- self::assertFalse(\file_exists(__DIR__ . '/test.tar'));
+ self::assertFileNotExists(__DIR__ . '/test.tar');
self::assertFalse(Tar::unpack(__DIR__ . '/test.tar', __DIR__));
}
}
diff --git a/tests/Utils/IO/Zip/ZipTest.php b/tests/Utils/IO/Zip/ZipTest.php
index 877616022..c2820fd6e 100644
--- a/tests/Utils/IO/Zip/ZipTest.php
+++ b/tests/Utils/IO/Zip/ZipTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\IO\Zip;
use phpOMS\Utils\IO\Zip\Zip;
+/**
+ * @internal
+ */
class ZipTest extends \PHPUnit\Framework\TestCase
{
protected function setUp() : void
@@ -37,7 +41,7 @@ class ZipTest extends \PHPUnit\Framework\TestCase
__DIR__ . '/test.zip'
));
- self::assertTrue(\file_exists(__DIR__ . '/test.zip'));
+ self::assertFileExists(__DIR__ . '/test.zip');
self::assertFalse(Zip::pack(
[
@@ -62,23 +66,23 @@ class ZipTest extends \PHPUnit\Framework\TestCase
\rmdir(__DIR__ . '/test/sub');
\rmdir(__DIR__ . '/test');
- self::assertFalse(\file_exists(__DIR__ . '/test a.txt'));
- self::assertFalse(\file_exists(__DIR__ . '/test b.md'));
- self::assertFalse(\file_exists(__DIR__ . '/test/test c.txt'));
- self::assertFalse(\file_exists(__DIR__ . '/test/test d.txt'));
- self::assertFalse(\file_exists(__DIR__ . '/test/sub/test e.txt'));
- self::assertFalse(\file_exists(__DIR__ . '/test/sub'));
- self::assertFalse(\file_exists(__DIR__ . '/test'));
+ self::assertFileNotExists(__DIR__ . '/test a.txt');
+ self::assertFileNotExists(__DIR__ . '/test b.md');
+ self::assertFileNotExists(__DIR__ . '/test/test c.txt');
+ self::assertFileNotExists(__DIR__ . '/test/test d.txt');
+ self::assertFileNotExists(__DIR__ . '/test/sub/test e.txt');
+ self::assertFileNotExists(__DIR__ . '/test/sub');
+ self::assertFileNotExists(__DIR__ . '/test');
self::assertTrue(Zip::unpack(__DIR__ . '/test.zip', __DIR__));
- self::assertTrue(\file_exists(__DIR__ . '/test a.txt'));
- self::assertTrue(\file_exists(__DIR__ . '/test b.md'));
- self::assertTrue(\file_exists(__DIR__ . '/test/test c.txt'));
- self::assertTrue(\file_exists(__DIR__ . '/test/test d.txt'));
- self::assertTrue(\file_exists(__DIR__ . '/test/sub/test e.txt'));
- self::assertTrue(\file_exists(__DIR__ . '/test/sub'));
- self::assertTrue(\file_exists(__DIR__ . '/test'));
+ self::assertFileExists(__DIR__ . '/test a.txt');
+ self::assertFileExists(__DIR__ . '/test b.md');
+ self::assertFileExists(__DIR__ . '/test/test c.txt');
+ self::assertFileExists(__DIR__ . '/test/test d.txt');
+ self::assertFileExists(__DIR__ . '/test/sub/test e.txt');
+ self::assertFileExists(__DIR__ . '/test/sub');
+ self::assertFileExists(__DIR__ . '/test');
self::assertEquals($a, \file_get_contents(__DIR__ . '/test a.txt'));
self::assertEquals($b, \file_get_contents(__DIR__ . '/test b.md'));
@@ -87,7 +91,7 @@ class ZipTest extends \PHPUnit\Framework\TestCase
self::assertEquals($e, \file_get_contents(__DIR__ . '/test/sub/test e.txt'));
\unlink(__DIR__ . '/test.zip');
- self::assertFalse(\file_exists(__DIR__ . '/test.zip'));
+ self::assertFileNotExists(__DIR__ . '/test.zip');
self::assertFalse(Zip::unpack(__DIR__ . '/test.zip', __DIR__));
}
}
diff --git a/tests/Utils/ImageUtilsTest.php b/tests/Utils/ImageUtilsTest.php
index 6a2af784e..055f5f8a8 100644
--- a/tests/Utils/ImageUtilsTest.php
+++ b/tests/Utils/ImageUtilsTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils;
@@ -17,6 +18,9 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Utils\ImageUtils;
+/**
+ * @internal
+ */
class ImageUtilsTest extends \PHPUnit\Framework\TestCase
{
public function testImage() : void
diff --git a/tests/Utils/JsonBuilderTest.php b/tests/Utils/JsonBuilderTest.php
index c3c85bafb..09851703c 100644
--- a/tests/Utils/JsonBuilderTest.php
+++ b/tests/Utils/JsonBuilderTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils;
@@ -17,6 +18,9 @@ use phpOMS\Utils\JsonBuilder;
require_once __DIR__ . '/../Autoloader.php';
+/**
+ * @internal
+ */
class JsonBuilderTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
diff --git a/tests/Utils/PDF/PdfTest.php b/tests/Utils/PDF/PdfTest.php
index 44f1338a7..7203a4f27 100644
--- a/tests/Utils/PDF/PdfTest.php
+++ b/tests/Utils/PDF/PdfTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\PDF;
-
+/**
+ * @internal
+ */
class PdfTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/Utils/Parser/Markdown/MarkdownTest.php b/tests/Utils/Parser/Markdown/MarkdownTest.php
index b98eec906..7070a4430 100644
--- a/tests/Utils/Parser/Markdown/MarkdownTest.php
+++ b/tests/Utils/Parser/Markdown/MarkdownTest.php
@@ -10,12 +10,16 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Parser\Markdown;
use phpOMS\System\File\Local\Directory;
use phpOMS\Utils\Parser\Markdown\Markdown;
+/**
+ * @internal
+ */
class MarkdownTest extends \PHPUnit\Framework\TestCase
{
public function testParsing() : void
diff --git a/tests/Utils/Parser/Php/ArrayParserTest.php b/tests/Utils/Parser/Php/ArrayParserTest.php
index 53cfe1dce..d4ede5d93 100644
--- a/tests/Utils/Parser/Php/ArrayParserTest.php
+++ b/tests/Utils/Parser/Php/ArrayParserTest.php
@@ -10,21 +10,25 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\Parser\Php;
use phpOMS\Utils\Parser\Php\ArrayParser;
+/**
+ * @internal
+ */
class ArrayParserTest extends \PHPUnit\Framework\TestCase
{
public function testParser() : void
{
- $serializable = new class implements \Serializable {
+ $serializable = new class() implements \Serializable {
public function serialize() { return 2; }
public function unserialize($raw) : void {}
};
- $jsonSerialize = new class implements \JsonSerializable {
+ $jsonSerialize = new class() implements \JsonSerializable {
public function jsonSerialize() { return [6, 7]; }
};
@@ -63,6 +67,6 @@ class ArrayParserTest extends \PHPUnit\Framework\TestCase
{
self::expectException(\UnexpectedValueException::class);
- ArrayParser::parseVariable(new class {});
+ ArrayParser::parseVariable(new class() {});
}
}
diff --git a/tests/Utils/PermutationTest.php b/tests/Utils/PermutationTest.php
index 5eb80dd00..839ab4bd6 100644
--- a/tests/Utils/PermutationTest.php
+++ b/tests/Utils/PermutationTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils;
@@ -17,6 +18,9 @@ use phpOMS\Utils\Permutation;
require_once __DIR__ . '/../Autoloader.php';
+/**
+ * @internal
+ */
class PermutationTest extends \PHPUnit\Framework\TestCase
{
public function testPermute() : void
diff --git a/tests/Utils/RnG/AddressTest.php b/tests/Utils/RnG/AddressTest.php
index c0677d24c..b47e7c3db 100644
--- a/tests/Utils/RnG/AddressTest.php
+++ b/tests/Utils/RnG/AddressTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\RnG;
-
+/**
+ * @internal
+ */
class AddressTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/Utils/RnG/ArrayRandomizeTest.php b/tests/Utils/RnG/ArrayRandomizeTest.php
index ca15b5f92..380c909bd 100644
--- a/tests/Utils/RnG/ArrayRandomizeTest.php
+++ b/tests/Utils/RnG/ArrayRandomizeTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\RnG;
use phpOMS\Utils\RnG\ArrayRandomize;
+/**
+ * @internal
+ */
class ArrayRandomizeTest extends \PHPUnit\Framework\TestCase
{
public function testRandomize() : void
diff --git a/tests/Utils/RnG/CityTest.php b/tests/Utils/RnG/CityTest.php
index 6f8897a19..c9836e530 100644
--- a/tests/Utils/RnG/CityTest.php
+++ b/tests/Utils/RnG/CityTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\RnG;
-
+/**
+ * @internal
+ */
class CityTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/Utils/RnG/DateTimeTest.php b/tests/Utils/RnG/DateTimeTest.php
index ae4d7356b..61f2caae4 100644
--- a/tests/Utils/RnG/DateTimeTest.php
+++ b/tests/Utils/RnG/DateTimeTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\RnG;
use phpOMS\Utils\RnG\DateTime;
+/**
+ * @internal
+ */
class DateTimeTest extends \PHPUnit\Framework\TestCase
{
public function testRnG() : void
@@ -23,8 +27,8 @@ class DateTimeTest extends \PHPUnit\Framework\TestCase
$dateMin = new \DateTime();
$dateMax = new \DateTime();
- $min = \mt_rand(0, PHP_INT_MAX - 2);
- $max = \mt_rand($min + 1, PHP_INT_MAX);
+ $min = \mt_rand(0, \PHP_INT_MAX - 2);
+ $max = \mt_rand($min + 1, \PHP_INT_MAX);
$dateMin->setTimestamp($min);
$dateMax->setTimestamp($max);
diff --git a/tests/Utils/RnG/DistributionTypeTest.php b/tests/Utils/RnG/DistributionTypeTest.php
index f0a5d354d..a310a6b7c 100644
--- a/tests/Utils/RnG/DistributionTypeTest.php
+++ b/tests/Utils/RnG/DistributionTypeTest.php
@@ -10,16 +10,20 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\RnG;
use phpOMS\Utils\RnG\DistributionType;
+/**
+ * @internal
+ */
class DistributionTypeTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(2, \count(DistributionType::getConstants()));
+ self::assertCount(2, DistributionType::getConstants());
self::assertEquals(DistributionType::getConstants(), \array_unique(DistributionType::getConstants()));
self::assertEquals(0, DistributionType::UNIFORM);
diff --git a/tests/Utils/RnG/EmailTest.php b/tests/Utils/RnG/EmailTest.php
index c1a289c76..f7ae2e257 100644
--- a/tests/Utils/RnG/EmailTest.php
+++ b/tests/Utils/RnG/EmailTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\RnG;
-
+/**
+ * @internal
+ */
class EmailTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/Utils/RnG/FileTest.php b/tests/Utils/RnG/FileTest.php
index ee713687e..fe0b536cf 100644
--- a/tests/Utils/RnG/FileTest.php
+++ b/tests/Utils/RnG/FileTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\RnG;
use phpOMS\Utils\RnG\File;
+/**
+ * @internal
+ */
class FileTest extends \PHPUnit\Framework\TestCase
{
public function testRnGExtension() : void
diff --git a/tests/Utils/RnG/IBANTest.php b/tests/Utils/RnG/IBANTest.php
index 672ba5a1d..df6bdc21d 100644
--- a/tests/Utils/RnG/IBANTest.php
+++ b/tests/Utils/RnG/IBANTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\RnG;
-
+/**
+ * @internal
+ */
class IBANTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/Utils/RnG/LinearCongruentialGeneratorTest.php b/tests/Utils/RnG/LinearCongruentialGeneratorTest.php
index 69a256c9c..37e3c35ae 100644
--- a/tests/Utils/RnG/LinearCongruentialGeneratorTest.php
+++ b/tests/Utils/RnG/LinearCongruentialGeneratorTest.php
@@ -10,18 +10,22 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\RnG;
use phpOMS\Utils\RnG\LinearCongruentialGenerator;
+/**
+ * @internal
+ */
class LinearCongruentialGeneratorTest extends \PHPUnit\Framework\TestCase
{
public function testBsdRng() : void
{
self::assertEquals(12345, LinearCongruentialGenerator::bsd());
- if (PHP_INT_SIZE > 4) {
+ if (\PHP_INT_SIZE > 4) {
self::assertEquals(1406932606, LinearCongruentialGenerator::bsd());
self::assertEquals(654583775, LinearCongruentialGenerator::bsd());
self::assertEquals(1449466924, LinearCongruentialGenerator::bsd());
@@ -36,7 +40,7 @@ class LinearCongruentialGeneratorTest extends \PHPUnit\Framework\TestCase
self::assertEquals(38, LinearCongruentialGenerator::msvcrt());
self::assertEquals(7719, LinearCongruentialGenerator::msvcrt());
- if (PHP_INT_SIZE > 4) {
+ if (\PHP_INT_SIZE > 4) {
self::assertEquals(21238, LinearCongruentialGenerator::msvcrt());
self::assertEquals(2437, LinearCongruentialGenerator::msvcrt());
}
diff --git a/tests/Utils/RnG/NameTest.php b/tests/Utils/RnG/NameTest.php
index 8e88f7b33..293453ba7 100644
--- a/tests/Utils/RnG/NameTest.php
+++ b/tests/Utils/RnG/NameTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\RnG;
use phpOMS\Utils\RnG\Name;
+/**
+ * @internal
+ */
class NameTest extends \PHPUnit\Framework\TestCase
{
public function testRandom() : void
diff --git a/tests/Utils/RnG/NumericTest.php b/tests/Utils/RnG/NumericTest.php
index f95a9f35b..71a25cac5 100644
--- a/tests/Utils/RnG/NumericTest.php
+++ b/tests/Utils/RnG/NumericTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\RnG;
-
+/**
+ * @internal
+ */
class NumericTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/Utils/RnG/PhoneTest.php b/tests/Utils/RnG/PhoneTest.php
index 63206f4a2..42b9627da 100644
--- a/tests/Utils/RnG/PhoneTest.php
+++ b/tests/Utils/RnG/PhoneTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\RnG;
use phpOMS\Utils\RnG\Phone;
+/**
+ * @internal
+ */
class PhoneTest extends \PHPUnit\Framework\TestCase
{
public function testRnG() : void
diff --git a/tests/Utils/RnG/PostalZipTest.php b/tests/Utils/RnG/PostalZipTest.php
index 9cc51c5df..7c8bf789b 100644
--- a/tests/Utils/RnG/PostalZipTest.php
+++ b/tests/Utils/RnG/PostalZipTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\RnG;
-
+/**
+ * @internal
+ */
class PostalZipTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/Utils/RnG/StringUtilsTest.php b/tests/Utils/RnG/StringUtilsTest.php
index 5824d2b26..b5c0b9f06 100644
--- a/tests/Utils/RnG/StringUtilsTest.php
+++ b/tests/Utils/RnG/StringUtilsTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\RnG;
use phpOMS\Utils\RnG\StringUtils;
+/**
+ * @internal
+ */
class StringUtilsTest extends \PHPUnit\Framework\TestCase
{
/**
@@ -34,7 +38,7 @@ class StringUtilsTest extends \PHPUnit\Framework\TestCase
}
if (\in_array($random, $haystack)) {
- $randomness++;
+ ++$randomness;
}
$haystack[] = $random;
diff --git a/tests/Utils/RnG/TextTest.php b/tests/Utils/RnG/TextTest.php
index 815aae726..922dcb439 100644
--- a/tests/Utils/RnG/TextTest.php
+++ b/tests/Utils/RnG/TextTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\RnG;
use phpOMS\Utils\RnG\Text;
+/**
+ * @internal
+ */
class TextTest extends \PHPUnit\Framework\TestCase
{
public function testRnG() : void
diff --git a/tests/Utils/StringCompareTest.php b/tests/Utils/StringCompareTest.php
index b2375ac29..847919ea0 100644
--- a/tests/Utils/StringCompareTest.php
+++ b/tests/Utils/StringCompareTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils;
@@ -17,6 +18,9 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Utils\StringCompare;
+/**
+ * @internal
+ */
class StringCompareTest extends \PHPUnit\Framework\TestCase
{
public function testDictionary() : void
diff --git a/tests/Utils/StringUtilsTest.php b/tests/Utils/StringUtilsTest.php
index 19780a080..851d904c9 100644
--- a/tests/Utils/StringUtilsTest.php
+++ b/tests/Utils/StringUtilsTest.php
@@ -10,14 +10,18 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils;
-use phpOMS\Utils\StringUtils;
use phpOMS\Contract\RenderableInterface;
+use phpOMS\Utils\StringUtils;
require_once __DIR__ . '/../Autoloader.php';
+/**
+ * @internal
+ */
class StringUtilsTest extends \PHPUnit\Framework\TestCase
{
public function testEvaluation() : void
@@ -83,7 +87,7 @@ class StringUtilsTest extends \PHPUnit\Framework\TestCase
public function testStringify() : void
{
- self::assertEquals('"abc"', StringUtils::stringify(new class implements \JsonSerializable {
+ self::assertEquals('"abc"', StringUtils::stringify(new class() implements \JsonSerializable {
public function jsonSerialize()
{
return 'abc';
@@ -92,7 +96,7 @@ class StringUtilsTest extends \PHPUnit\Framework\TestCase
self::assertEquals('["abc"]', StringUtils::stringify(['abc']));
- self::assertEquals('abc', StringUtils::stringify(new class implements \Serializable {
+ self::assertEquals('abc', StringUtils::stringify(new class() implements \Serializable {
public function serialize()
{
return 'abc';
@@ -108,19 +112,19 @@ class StringUtilsTest extends \PHPUnit\Framework\TestCase
self::assertEquals('1.1', StringUtils::stringify(1.1));
self::assertEquals('1', StringUtils::stringify(true));
self::assertEquals('0', StringUtils::stringify(false));
- self::assertEquals(null, StringUtils::stringify(null));
+ self::assertNull(StringUtils::stringify(null));
$date = new \DateTime('now');
self::assertEquals($date->format('Y-m-d H:i:s'), StringUtils::stringify($date));
- self::assertEquals('abc', StringUtils::stringify(new class {
+ self::assertEquals('abc', StringUtils::stringify(new class() {
public function __toString()
{
return 'abc';
}
}));
- self::assertEquals('abc', StringUtils::stringify(new class implements RenderableInterface {
+ self::assertEquals('abc', StringUtils::stringify(new class() implements RenderableInterface {
public function render() : string
{
return 'abc';
diff --git a/tests/Utils/TaskSchedule/CronJobTest.php b/tests/Utils/TaskSchedule/CronJobTest.php
index 9266abe45..fe73eaf3e 100644
--- a/tests/Utils/TaskSchedule/CronJobTest.php
+++ b/tests/Utils/TaskSchedule/CronJobTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\TaskSchedule;
use phpOMS\Utils\TaskSchedule\CronJob;
+/**
+ * @internal
+ */
class CronJobTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
diff --git a/tests/Utils/TaskSchedule/CronTest.php b/tests/Utils/TaskSchedule/CronTest.php
index 0d0cb804f..0eec6451e 100644
--- a/tests/Utils/TaskSchedule/CronTest.php
+++ b/tests/Utils/TaskSchedule/CronTest.php
@@ -10,12 +10,16 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\TaskSchedule;
use phpOMS\Utils\TaskSchedule\Cron;
use phpOMS\Utils\TaskSchedule\CronJob;
+/**
+ * @internal
+ */
class CronTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
@@ -25,7 +29,7 @@ class CronTest extends \PHPUnit\Framework\TestCase
public function testCRUD() : void
{
- if (\stripos(PHP_OS, 'LINUX') !== false && \stripos(__DIR__, '/travis/') === false) {
+ if (\stripos(\PHP_OS, 'LINUX') !== false && \stripos(__DIR__, '/travis/') === false) {
self::assertTrue(Cron::guessBin());
$cron = new Cron();
diff --git a/tests/Utils/TaskSchedule/IntervalTest.php b/tests/Utils/TaskSchedule/IntervalTest.php
index df03b1eee..2d432b7c7 100644
--- a/tests/Utils/TaskSchedule/IntervalTest.php
+++ b/tests/Utils/TaskSchedule/IntervalTest.php
@@ -10,10 +10,13 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\TaskSchedule;
-
+/**
+ * @internal
+ */
class IntervalTest extends \PHPUnit\Framework\TestCase
{
public function testPlaceholder() : void
diff --git a/tests/Utils/TaskSchedule/ScheduleTest.php b/tests/Utils/TaskSchedule/ScheduleTest.php
index 2542517a0..bd6b03863 100644
--- a/tests/Utils/TaskSchedule/ScheduleTest.php
+++ b/tests/Utils/TaskSchedule/ScheduleTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\TaskSchedule;
use phpOMS\Utils\TaskSchedule\Schedule;
+/**
+ * @internal
+ */
class ScheduleTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
diff --git a/tests/Utils/TaskSchedule/SchedulerAbstractTest.php b/tests/Utils/TaskSchedule/SchedulerAbstractTest.php
index a3a3f3871..189e09338 100644
--- a/tests/Utils/TaskSchedule/SchedulerAbstractTest.php
+++ b/tests/Utils/TaskSchedule/SchedulerAbstractTest.php
@@ -10,15 +10,19 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\TaskSchedule;
use phpOMS\Utils\TaskSchedule\SchedulerAbstract;
+/**
+ * @internal
+ */
class SchedulerAbstractTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
{
- self::assertTrue(SchedulerAbstract::getBin() === '' || \file_exists(SchedulerAbstract::getBin() ));
+ self::assertTrue(SchedulerAbstract::getBin() === '' || \file_exists(SchedulerAbstract::getBin()));
}
}
diff --git a/tests/Utils/TaskSchedule/SchedulerFactoryTest.php b/tests/Utils/TaskSchedule/SchedulerFactoryTest.php
index 742f031a9..0a25a0a3e 100644
--- a/tests/Utils/TaskSchedule/SchedulerFactoryTest.php
+++ b/tests/Utils/TaskSchedule/SchedulerFactoryTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\TaskSchedule;
@@ -17,6 +18,9 @@ use phpOMS\Utils\TaskSchedule\Cron;
use phpOMS\Utils\TaskSchedule\SchedulerFactory;
use phpOMS\Utils\TaskSchedule\TaskScheduler;
+/**
+ * @internal
+ */
class SchedulerFactoryTest extends \PHPUnit\Framework\TestCase
{
public function testFactory() : void
diff --git a/tests/Utils/TaskSchedule/TaskAbstractTest.php b/tests/Utils/TaskSchedule/TaskAbstractTest.php
index 4d7fa5ffa..3657dd5cb 100644
--- a/tests/Utils/TaskSchedule/TaskAbstractTest.php
+++ b/tests/Utils/TaskSchedule/TaskAbstractTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\TaskSchedule;
use phpOMS\Utils\TaskSchedule\TaskAbstract;
+/**
+ * @internal
+ */
class TaskAbstractTest extends \PHPUnit\Framework\TestCase
{
private $class = null;
diff --git a/tests/Utils/TaskSchedule/TaskFactoryTest.php b/tests/Utils/TaskSchedule/TaskFactoryTest.php
index 7bd19c4cc..313acece3 100644
--- a/tests/Utils/TaskSchedule/TaskFactoryTest.php
+++ b/tests/Utils/TaskSchedule/TaskFactoryTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\TaskSchedule;
@@ -17,6 +18,9 @@ use phpOMS\Utils\TaskSchedule\CronJob;
use phpOMS\Utils\TaskSchedule\Schedule;
use phpOMS\Utils\TaskSchedule\TaskFactory;
+/**
+ * @internal
+ */
class TaskFactoryTest extends \PHPUnit\Framework\TestCase
{
public function testFactory() : void
diff --git a/tests/Utils/TaskSchedule/TaskSchedulerTest.php b/tests/Utils/TaskSchedule/TaskSchedulerTest.php
index 5f4247184..9c7dda89f 100644
--- a/tests/Utils/TaskSchedule/TaskSchedulerTest.php
+++ b/tests/Utils/TaskSchedule/TaskSchedulerTest.php
@@ -10,12 +10,16 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils\TaskSchedule;
use phpOMS\Utils\TaskSchedule\Schedule;
use phpOMS\Utils\TaskSchedule\TaskScheduler;
+/**
+ * @internal
+ */
class TaskSchedulerTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
@@ -25,7 +29,7 @@ class TaskSchedulerTest extends \PHPUnit\Framework\TestCase
public function testCRUD() : void
{
- if (\stristr(PHP_OS, 'WIN')) {
+ if (\stristr(\PHP_OS, 'WIN')) {
self::assertTrue(TaskScheduler::guessBin());
$cron = new TaskScheduler();
diff --git a/tests/Utils/TestUtilsClass.php b/tests/Utils/TestUtilsClass.php
index 964696ee9..744138037 100644
--- a/tests/Utils/TestUtilsClass.php
+++ b/tests/Utils/TestUtilsClass.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils;
diff --git a/tests/Utils/TestUtilsTest.php b/tests/Utils/TestUtilsTest.php
index 94c25864d..a328345d8 100644
--- a/tests/Utils/TestUtilsTest.php
+++ b/tests/Utils/TestUtilsTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Utils;
@@ -17,6 +18,9 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Utils\TestUtils;
+/**
+ * @internal
+ */
class TestUtilsTest extends \PHPUnit\Framework\TestCase
{
public function testGet() : void
diff --git a/tests/Validation/Base/DateTimeTest.php b/tests/Validation/Base/DateTimeTest.php
index dabd5a899..67cdeac12 100644
--- a/tests/Validation/Base/DateTimeTest.php
+++ b/tests/Validation/Base/DateTimeTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Validation\Base;
use phpOMS\Validation\Base\DateTime;
+/**
+ * @internal
+ */
class DateTimeTest extends \PHPUnit\Framework\TestCase
{
public function testDateTime() : void
diff --git a/tests/Validation/Base/JsonTest.php b/tests/Validation/Base/JsonTest.php
index eea24c08c..3fed81f1a 100644
--- a/tests/Validation/Base/JsonTest.php
+++ b/tests/Validation/Base/JsonTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Validation\Base;
use phpOMS\Validation\Base\Json;
+/**
+ * @internal
+ */
class JsonTest extends \PHPUnit\Framework\TestCase
{
public function testJson() : void
diff --git a/tests/Validation/Finance/BICTest.php b/tests/Validation/Finance/BICTest.php
index 256922d05..8b0792125 100644
--- a/tests/Validation/Finance/BICTest.php
+++ b/tests/Validation/Finance/BICTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Validation\Finance;
use phpOMS\Validation\Finance\BIC;
+/**
+ * @internal
+ */
class BICTest extends \PHPUnit\Framework\TestCase
{
public function testBic() : void
diff --git a/tests/Validation/Finance/CreditCardTest.php b/tests/Validation/Finance/CreditCardTest.php
index edac194bb..e8c872710 100644
--- a/tests/Validation/Finance/CreditCardTest.php
+++ b/tests/Validation/Finance/CreditCardTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Validation\Finance;
use phpOMS\Validation\Finance\CreditCard;
+/**
+ * @internal
+ */
class CreditCardTest extends \PHPUnit\Framework\TestCase
{
public function testCreditCard() : void
diff --git a/tests/Validation/Finance/IbanEnumTest.php b/tests/Validation/Finance/IbanEnumTest.php
index f3657058d..054f9ab3b 100644
--- a/tests/Validation/Finance/IbanEnumTest.php
+++ b/tests/Validation/Finance/IbanEnumTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Validation\Finance;
use phpOMS\Validation\Finance\IbanEnum;
+/**
+ * @internal
+ */
class IbanEnumTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
diff --git a/tests/Validation/Finance/IbanErrorTypeTest.php b/tests/Validation/Finance/IbanErrorTypeTest.php
index 07946890a..9ecb87996 100644
--- a/tests/Validation/Finance/IbanErrorTypeTest.php
+++ b/tests/Validation/Finance/IbanErrorTypeTest.php
@@ -10,16 +10,20 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Validation\Finance;
use phpOMS\Validation\Finance\IbanErrorType;
+/**
+ * @internal
+ */
class IbanErrorTypeTest extends \PHPUnit\Framework\TestCase
{
public function testEnums() : void
{
- self::assertEquals(5, \count(IbanErrorType::getConstants()));
+ self::assertCount(5, IbanErrorType::getConstants());
self::assertEquals(1, IbanErrorType::INVALID_COUNTRY);
self::assertEquals(2, IbanErrorType::INVALID_LENGTH);
self::assertEquals(4, IbanErrorType::INVALID_CHECKSUM);
diff --git a/tests/Validation/Finance/IbanTest.php b/tests/Validation/Finance/IbanTest.php
index b9f5e11d5..2b6c91d5e 100644
--- a/tests/Validation/Finance/IbanTest.php
+++ b/tests/Validation/Finance/IbanTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Validation\Finance;
use phpOMS\Validation\Finance\Iban;
+/**
+ * @internal
+ */
class IbanTest extends \PHPUnit\Framework\TestCase
{
public function testValid() : void
diff --git a/tests/Validation/Network/EmailTest.php b/tests/Validation/Network/EmailTest.php
index b853ccef3..7ad15d90d 100644
--- a/tests/Validation/Network/EmailTest.php
+++ b/tests/Validation/Network/EmailTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Validation\Network;
use phpOMS\Validation\Network\Email;
+/**
+ * @internal
+ */
class EmailTest extends \PHPUnit\Framework\TestCase
{
public function testValidation() : void
diff --git a/tests/Validation/Network/HostnameTest.php b/tests/Validation/Network/HostnameTest.php
index 4502e64b0..31a23cd72 100644
--- a/tests/Validation/Network/HostnameTest.php
+++ b/tests/Validation/Network/HostnameTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Validation\Network;
use phpOMS\Validation\Network\Hostname;
+/**
+ * @internal
+ */
class HostnameTest extends \PHPUnit\Framework\TestCase
{
public function testHostname() : void
diff --git a/tests/Validation/Network/IpTest.php b/tests/Validation/Network/IpTest.php
index cbe16ee78..43b4922b4 100644
--- a/tests/Validation/Network/IpTest.php
+++ b/tests/Validation/Network/IpTest.php
@@ -10,11 +10,15 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Validation\Network;
use phpOMS\Validation\Network\Ip;
+/**
+ * @internal
+ */
class IpTest extends \PHPUnit\Framework\TestCase
{
public function testValid() : void
diff --git a/tests/Validation/ValidatorTest.php b/tests/Validation/ValidatorTest.php
index 76bde9445..f368d391b 100644
--- a/tests/Validation/ValidatorTest.php
+++ b/tests/Validation/ValidatorTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Validation;
@@ -18,6 +19,9 @@ use phpOMS\Validation\Validator;
require_once __DIR__ . '/../Autoloader.php';
+/**
+ * @internal
+ */
class ValidatorTest extends \PHPUnit\Framework\TestCase
{
public function testValidation() : void
diff --git a/tests/Version/VersionTest.php b/tests/Version/VersionTest.php
index 64b822752..5f4747027 100644
--- a/tests/Version/VersionTest.php
+++ b/tests/Version/VersionTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Version;
@@ -17,6 +18,9 @@ use phpOMS\Version\Version;
require_once __DIR__ . '/../Autoloader.php';
+/**
+ * @internal
+ */
class VersionTest extends \PHPUnit\Framework\TestCase
{
public function testVersionCompare() : void
diff --git a/tests/Views/PaginationViewTest.php b/tests/Views/PaginationViewTest.php
index 830ead24d..9b405b588 100644
--- a/tests/Views/PaginationViewTest.php
+++ b/tests/Views/PaginationViewTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Views;
@@ -17,6 +18,9 @@ require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Views\PaginationView;
+/**
+ * @internal
+ */
class PaginationViewTest extends \PHPUnit\Framework\TestCase
{
public function testDefault() : void
@@ -44,4 +48,4 @@ class PaginationViewTest extends \PHPUnit\Framework\TestCase
$view->setResults(12);
self::assertEquals(12, $view->getResults());
}
-}
\ No newline at end of file
+}
diff --git a/tests/Views/ViewTest.php b/tests/Views/ViewTest.php
index 8e3e867e1..c17552797 100644
--- a/tests/Views/ViewTest.php
+++ b/tests/Views/ViewTest.php
@@ -10,6 +10,7 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
+ declare(strict_types=1);
namespace phpOMS\tests\Views;
@@ -25,19 +26,22 @@ use phpOMS\Uri\Http;
use phpOMS\Views\View;
use phpOMS\Views\ViewAbstract;
+/**
+ * @internal
+ */
class ViewTest extends \PHPUnit\Framework\TestCase
{
protected $dbPool = null;
protected $app = null;
- public function setUp() : void
+ protected function setUp() : void
{
$this->dbPool = new DatabasePool();
/** @var array $CONFIG */
$this->dbPool->create('core', $GLOBALS['CONFIG']['db']['core']['masters']['admin']);
- $this->app = new class extends ApplicationAbstract
+ $this->app = new class() extends ApplicationAbstract
{
protected $appName = 'Api';
};
@@ -52,11 +56,11 @@ class ViewTest extends \PHPUnit\Framework\TestCase
self::assertEmpty($view->getTemplate());
self::assertEmpty($view->getViews());
- self::assertTrue(\is_array($view->getViews()));
- self::assertFalse($view->getView(0));
- self::assertFalse($view->removeView(0));
- self::assertNull($view->getData(0));
- self::assertFalse($view->removeData(0));
+ self::assertIsArray($view->getViews());
+ self::assertFalse($view->getView('0'));
+ self::assertFalse($view->removeView('0'));
+ self::assertNull($view->getData('0'));
+ self::assertFalse($view->removeData('0'));
self::assertEmpty($view->toArray());
}
@@ -68,9 +72,9 @@ class ViewTest extends \PHPUnit\Framework\TestCase
$expected = [
'en' => [
'Admin' => [
- 'Test' => 'Test'
- ]
- ]
+ 'Test' => 'Test',
+ ],
+ ],
];
$this->app->l11nManager = new L11nManager('Api');
@@ -103,7 +107,7 @@ class ViewTest extends \PHPUnit\Framework\TestCase
$tView = new View($this->app, $request, $response);
self::assertTrue($view->addView('test', $tView));
self::assertEquals($tView, $view->getView('test'));
- self::assertEquals(1, \count($view->getViews()));
+ self::assertCount(1, $view->getViews());
self::assertTrue($view->removeView('test'));
self::assertFalse($view->removeView('test'));
self::assertFalse($view->getView('test'));
diff --git a/tests/Views/testArray.tpl.php b/tests/Views/testArray.tpl.php
index 92dd15faa..803203256 100644
--- a/tests/Views/testArray.tpl.php
+++ b/tests/Views/testArray.tpl.php
@@ -1 +1,2 @@
-