diff --git a/DataStorage/Database/Query/Builder.php b/DataStorage/Database/Query/Builder.php
index 3da86dab5..c4333826e 100644
--- a/DataStorage/Database/Query/Builder.php
+++ b/DataStorage/Database/Query/Builder.php
@@ -753,7 +753,7 @@ class Builder extends BuilderAbstract
*
* @since 1.0.0
*/
- public function lock()
+ public function lock() : void
{
}
@@ -764,7 +764,7 @@ class Builder extends BuilderAbstract
*
* @since 1.0.0
*/
- public function lockUpdate()
+ public function lockUpdate() : void
{
}
@@ -787,7 +787,7 @@ class Builder extends BuilderAbstract
*
* @since 1.0.0
*/
- public function find()
+ public function find() : void
{
}
@@ -813,7 +813,7 @@ class Builder extends BuilderAbstract
*
* @since 1.0.0
*/
- public function min()
+ public function min() : void
{
}
@@ -824,7 +824,7 @@ class Builder extends BuilderAbstract
*
* @since 1.0.0
*/
- public function max()
+ public function max() : void
{
}
@@ -835,7 +835,7 @@ class Builder extends BuilderAbstract
*
* @since 1.0.0
*/
- public function sum()
+ public function sum() : void
{
}
@@ -846,7 +846,7 @@ class Builder extends BuilderAbstract
*
* @since 1.0.0
*/
- public function avg()
+ public function avg() : void
{
}
@@ -1032,7 +1032,7 @@ class Builder extends BuilderAbstract
*
* @since 1.0.0
*/
- public function increment()
+ public function increment() : void
{
}
@@ -1043,7 +1043,7 @@ class Builder extends BuilderAbstract
*
* @since 1.0.0
*/
- public function decrement()
+ public function decrement() : void
{
}
diff --git a/DataStorage/Database/Schema/Builder.php b/DataStorage/Database/Schema/Builder.php
index 481da28b2..12e86b14c 100644
--- a/DataStorage/Database/Schema/Builder.php
+++ b/DataStorage/Database/Schema/Builder.php
@@ -104,7 +104,7 @@ class Builder extends QueryBuilder
return $this;
}
- public function alter(array $column)
+ public function alter(array $column) : void
{
}
diff --git a/Event/EventManager.php b/Event/EventManager.php
index c25bf707c..11deb500c 100644
--- a/Event/EventManager.php
+++ b/Event/EventManager.php
@@ -66,7 +66,7 @@ final class EventManager implements \Countable
public function __construct(Dispatcher $dispatcher = null)
{
$this->dispatcher = $dispatcher ?? new class {
- public function dispatch($func, ...$data)
+ public function dispatch($func, ...$data) : void
{
$func(...$data);
}
diff --git a/Math/Matrix/Matrix.php b/Math/Matrix/Matrix.php
index dc5110ca3..6d348f72e 100644
--- a/Math/Matrix/Matrix.php
+++ b/Math/Matrix/Matrix.php
@@ -732,7 +732,7 @@ class Matrix implements \ArrayAccess, \Iterator
/**
* {@inheritdoc}
*/
- public function next()
+ public function next() : void
{
++$this->position;
}
@@ -766,7 +766,7 @@ class Matrix implements \ArrayAccess, \Iterator
/**
* {@inheritdoc}
*/
- public function rewind()
+ public function rewind() : void
{
$this->position = 0;
}
@@ -774,7 +774,7 @@ class Matrix implements \ArrayAccess, \Iterator
/**
* {@inheritdoc}
*/
- public function offsetSet($offset, $value)
+ public function offsetSet($offset, $value) : void
{
$row = (int) ($offset / $this->m);
$this->matrix[$row][$offset - $row * $this->n] = $value;
@@ -783,7 +783,7 @@ class Matrix implements \ArrayAccess, \Iterator
/**
* {@inheritdoc}
*/
- public function offsetUnset($offset)
+ public function offsetUnset($offset) : void
{
$row = (int) ($offset / $this->m);
unset($this->matrix[$row][$offset - $row * $this->n]);
diff --git a/Math/Statistic/Forecast/Regression/MultipleLinearRegression.php b/Math/Statistic/Forecast/Regression/MultipleLinearRegression.php
index 8ed5a374e..41d4fb529 100644
--- a/Math/Statistic/Forecast/Regression/MultipleLinearRegression.php
+++ b/Math/Statistic/Forecast/Regression/MultipleLinearRegression.php
@@ -18,7 +18,7 @@ use phpOMS\Math\Matrix\Matrix;
class MultipleLinearRegression
{
/**
- * {@inheritdoc}
+ *
*/
public static function getRegression(array $x, array $y) : array
{
@@ -33,21 +33,21 @@ class MultipleLinearRegression
}
/**
- * {@inheritdoc}
+ *
*/
public static function getVariance() : float
{
}
/**
- * {@inheritdoc}
+ *
*/
public static function getPredictionInterval() : array
{
}
/**
- * {@inheritdoc}
+ *
*/
public static function getSlope(float $b1, float $y, float $x) : float
{
@@ -55,7 +55,7 @@ class MultipleLinearRegression
}
/**
- * {@inheritdoc}
+ *
*/
public static function getElasticity(float $b1, float $y, float $x): float
{
diff --git a/Math/Statistic/MeasureOfDispersion.php b/Math/Statistic/MeasureOfDispersion.php
index 3b47edbed..c4e5c2f1e 100644
--- a/Math/Statistic/MeasureOfDispersion.php
+++ b/Math/Statistic/MeasureOfDispersion.php
@@ -190,7 +190,7 @@ final class MeasureOfDispersion
*
* @return float
*
- * @throws ZeroDevisionException This exception is thrown if the size of the x array is less than 2
+ * @throws ZeroDevisionException This exception is thrown if the size of the x array is less than 2
* @throws InvalidDimensionException This exception is thrown if x and y have different dimensions
*
* @since 1.0.0
diff --git a/Message/UploadedFileInterface.php b/Message/UploadedFileInterface.php
index 583abc9ac..e5fc68156 100644
--- a/Message/UploadedFileInterface.php
+++ b/Message/UploadedFileInterface.php
@@ -41,7 +41,7 @@ interface UploadedFileInterface
*
* @since 1.0.0
*/
- public function moveTo(string $targetPath);
+ public function moveTo(string $targetPath) : void;
/**
* Retrieve the file size.
diff --git a/Model/Message/Dom.php b/Model/Message/Dom.php
index e40942f3b..be1f5a321 100644
--- a/Model/Message/Dom.php
+++ b/Model/Message/Dom.php
@@ -146,7 +146,7 @@ class Dom implements \Serializable, ArrayableInterface
/**
* {@inheritdoc}
*/
- public function unserialize($raw)
+ public function unserialize($raw) : void
{
$unserialized = \json_decode($raw, true);
diff --git a/Model/Message/FormValidation.php b/Model/Message/FormValidation.php
index f1cea5d14..2cf5bc402 100644
--- a/Model/Message/FormValidation.php
+++ b/Model/Message/FormValidation.php
@@ -82,7 +82,7 @@ class FormValidation implements \Serializable, ArrayableInterface, \JsonSerializ
/**
* {@inheritdoc}
*/
- public function unserialize($raw)
+ public function unserialize($raw) : void
{
$unserialized = \json_decode($raw, true);
diff --git a/Model/Message/Notify.php b/Model/Message/Notify.php
index 7be10d873..502c05720 100644
--- a/Model/Message/Notify.php
+++ b/Model/Message/Notify.php
@@ -186,7 +186,7 @@ class Notify implements \Serializable, ArrayableInterface, \JsonSerializable
/**
* {@inheritdoc}
*/
- public function unserialize($raw)
+ public function unserialize($raw) : void
{
$unserialized = \json_decode($raw, true);
diff --git a/Model/Message/Redirect.php b/Model/Message/Redirect.php
index f85c20e0d..603c75ac4 100644
--- a/Model/Message/Redirect.php
+++ b/Model/Message/Redirect.php
@@ -128,7 +128,7 @@ class Redirect implements \Serializable, ArrayableInterface, \JsonSerializable
/**
* {@inheritdoc}
*/
- public function unserialize($raw)
+ public function unserialize($raw) : void
{
$unserialized = \json_decode($raw, true);
diff --git a/Model/Message/Reload.php b/Model/Message/Reload.php
index 821898918..92e3f11a7 100644
--- a/Model/Message/Reload.php
+++ b/Model/Message/Reload.php
@@ -84,7 +84,7 @@ class Reload implements \Serializable, ArrayableInterface, \JsonSerializable
/**
* {@inheritdoc}
*/
- public function unserialize($raw)
+ public function unserialize($raw) : void
{
$unserialized = \json_decode($raw, true);
diff --git a/Module/ConsoleInterface.php b/Module/ConsoleInterface.php
index 2f0ef87f2..2a27326f4 100644
--- a/Module/ConsoleInterface.php
+++ b/Module/ConsoleInterface.php
@@ -32,5 +32,5 @@ interface ConsoleInterface
*
* @since 1.0.0
*/
- public function callConsole();
+ public function callConsole() : void;
}
diff --git a/Module/SocketInterface.php b/Module/SocketInterface.php
index b6d03e3d7..507f6b535 100644
--- a/Module/SocketInterface.php
+++ b/Module/SocketInterface.php
@@ -32,5 +32,5 @@ interface SocketInterface
*
* @since 1.0.0
*/
- public function callSock();
+ public function callSock() : void;
}
diff --git a/Socket/Client/Client.php b/Socket/Client/Client.php
index e367c8323..8e3c951bd 100644
--- a/Socket/Client/Client.php
+++ b/Socket/Client/Client.php
@@ -39,7 +39,7 @@ class Client extends SocketAbstract
$this->commands = new CommandManager();
/** @noinspection PhpUnusedParameterInspection */
- $this->commands->attach('disconnect', function ($conn, $para) {
+ $this->commands->attach('disconnect', function ($conn, $para) : void {
$this->disconnect();
}, $this);
}
diff --git a/Socket/Packets/Header.php b/Socket/Packets/Header.php
index 6eabaf1b1..f0dbe5253 100644
--- a/Socket/Packets/Header.php
+++ b/Socket/Packets/Header.php
@@ -173,7 +173,7 @@ class Header implements \Serializable
*
* @since 1.0.0
*/
- public function unserialize($string)
+ public function unserialize($string) : void
{
}
}
diff --git a/Socket/Packets/PacketAbstract.php b/Socket/Packets/PacketAbstract.php
index 871586e0f..b487e1acf 100644
--- a/Socket/Packets/PacketAbstract.php
+++ b/Socket/Packets/PacketAbstract.php
@@ -68,7 +68,7 @@ abstract class PacketAbstract implements \Serializable
*
* @since 1.0.0
*/
- abstract public function unserialize($string);
+ abstract public function unserialize($string) : void;
/**
* Get packet header.
diff --git a/Socket/Server/ClientManager.php b/Socket/Server/ClientManager.php
index 0eb423377..271d1553b 100644
--- a/Socket/Server/ClientManager.php
+++ b/Socket/Server/ClientManager.php
@@ -21,7 +21,7 @@ class ClientManager
{
private $clients = [];
- public function add(ClientConnection $client)
+ public function add(ClientConnection $client) : void
{
$this->clients[$client->getId()] = $client;
}
diff --git a/Stdlib/Base/Iban.php b/Stdlib/Base/Iban.php
index 33cdf52c5..12049ea12 100644
--- a/Stdlib/Base/Iban.php
+++ b/Stdlib/Base/Iban.php
@@ -280,7 +280,7 @@ class Iban implements \Serializable
* @return void
* @since 5.1.0
*/
- public function unserialize($serialized)
+ public function unserialize($serialized) : void
{
$this->parse($serialized);
}
diff --git a/Stdlib/Base/Location.php b/Stdlib/Base/Location.php
index c418bf8d1..2f8975ba7 100644
--- a/Stdlib/Base/Location.php
+++ b/Stdlib/Base/Location.php
@@ -332,7 +332,7 @@ class Location implements \JsonSerializable, \Serializable
* @return void
* @since 5.1.0
*/
- public function unserialize($serialized)
+ public function unserialize($serialized) : void
{
}
}
diff --git a/Stdlib/Graph/Tree.php b/Stdlib/Graph/Tree.php
index 9defa86db..26a9ce81a 100644
--- a/Stdlib/Graph/Tree.php
+++ b/Stdlib/Graph/Tree.php
@@ -127,7 +127,7 @@ class Tree extends Graph
*
* @since 1.0.0
*/
- public function levelOrder(Node $node, \Closure $callback)
+ public function levelOrder(Node $node, \Closure $callback) : void
{
$depth = $this->getMaxDepth();
diff --git a/Stdlib/Queue/PriorityQueue.php b/Stdlib/Queue/PriorityQueue.php
index c84ae88a6..9011941ab 100644
--- a/Stdlib/Queue/PriorityQueue.php
+++ b/Stdlib/Queue/PriorityQueue.php
@@ -323,7 +323,7 @@ class PriorityQueue implements \Countable, \Serializable
*
* @since 1.0.0
*/
- public function unserialize($data)
+ public function unserialize($data) : void
{
$this->queue = \json_decode($data);
}
diff --git a/System/File/Ftp/Directory.php b/System/File/Ftp/Directory.php
index 213ce51ea..3cd42cf15 100644
--- a/System/File/Ftp/Directory.php
+++ b/System/File/Ftp/Directory.php
@@ -51,7 +51,7 @@ class Directory extends FileAbstract implements DirectoryInterface
return \in_array(LocalFile::name($path), $list);
}
- public static function ftpCreate($con, string $path, int $permission, bool $recursive)
+ public static function ftpCreate($con, string $path, int $permission, bool $recursive) : void
{
$parts = \explode('/', $path);
\ftp_chdir($con, '/' . $parts[0]);
@@ -272,7 +272,7 @@ class Directory extends FileAbstract implements DirectoryInterface
/**
* {@inheritdoc}
*/
- public function rewind()
+ public function rewind() : void
{
\reset($this->nodes);
}
@@ -314,7 +314,7 @@ class Directory extends FileAbstract implements DirectoryInterface
/**
* {@inheritdoc}
*/
- public function offsetSet($offset, $value)
+ public function offsetSet($offset, $value) : void
{
if ($offset === null) {
$this->addNode($value);
@@ -334,7 +334,7 @@ class Directory extends FileAbstract implements DirectoryInterface
/**
* {@inheritdoc}
*/
- public function offsetUnset($offset)
+ public function offsetUnset($offset) : void
{
if (isset($this->nodes[$offset])) {
unset($this->nodes[$offset]);
diff --git a/System/File/Local/Directory.php b/System/File/Local/Directory.php
index d2be8091f..7b940d87f 100644
--- a/System/File/Local/Directory.php
+++ b/System/File/Local/Directory.php
@@ -457,7 +457,7 @@ final class Directory extends FileAbstract implements DirectoryInterface
/**
* {@inheritdoc}
*/
- public function rewind()
+ public function rewind() : void
{
\reset($this->nodes);
}
@@ -499,7 +499,7 @@ final class Directory extends FileAbstract implements DirectoryInterface
/**
* {@inheritdoc}
*/
- public function offsetSet($offset, $value)
+ public function offsetSet($offset, $value) : void
{
if ($offset === null) {
$this->addNode($value);
@@ -519,7 +519,7 @@ final class Directory extends FileAbstract implements DirectoryInterface
/**
* {@inheritdoc}
*/
- public function offsetUnset($offset)
+ public function offsetUnset($offset) : void
{
if (isset($this->nodes[$offset])) {
unset($this->nodes[$offset]);
@@ -595,7 +595,7 @@ final class Directory extends FileAbstract implements DirectoryInterface
/**
* {@inheritdoc}
*/
- public function offsetGet($offset)
+ public function offsetGet($offset) : void
{
// TODO: Implement offsetGet() method.
}
diff --git a/Utils/IO/Excel/ExcelDatabaseMapper.php b/Utils/IO/Excel/ExcelDatabaseMapper.php
index b24cdf414..d41fe2e0a 100644
--- a/Utils/IO/Excel/ExcelDatabaseMapper.php
+++ b/Utils/IO/Excel/ExcelDatabaseMapper.php
@@ -22,7 +22,7 @@ class ExcelDatabaseMapper implements IODatabaseMapper
private $lineBuffer = 500;
- public function addSource(string $source)
+ public function addSource(string $source) : void
{
$this->sources[] = $source;
}
@@ -37,7 +37,7 @@ class ExcelDatabaseMapper implements IODatabaseMapper
$this->sources = $sources;
}
- public function insert()
+ public function insert() : void
{
}
}
diff --git a/Utils/IO/Excel/ExcelInterface.php b/Utils/IO/Excel/ExcelInterface.php
index 3a18ee7fc..0eccd50f5 100644
--- a/Utils/IO/Excel/ExcelInterface.php
+++ b/Utils/IO/Excel/ExcelInterface.php
@@ -34,7 +34,7 @@ interface ExcelInterface
*
* @since 1.0.0
*/
- public function exportExcel($path);
+ public function exportExcel($path) : void;
/**
* Import Excel.
@@ -45,5 +45,5 @@ interface ExcelInterface
*
* @since 1.0.0
*/
- public function importExcel($path);
+ public function importExcel($path) : void;
}
diff --git a/Utils/IO/Json/JsonInterface.php b/Utils/IO/Json/JsonInterface.php
index c4ff99a60..5b86637be 100644
--- a/Utils/IO/Json/JsonInterface.php
+++ b/Utils/IO/Json/JsonInterface.php
@@ -34,7 +34,7 @@ interface JsonInterface
*
* @since 1.0.0
*/
- public function exportJson($path);
+ public function exportJson($path) : void;
/**
* Import Json.
@@ -45,5 +45,5 @@ interface JsonInterface
*
* @since 1.0.0
*/
- public function importJson($path);
+ public function importJson($path) : void;
}
diff --git a/Utils/IO/Pdf/PdfInterface.php b/Utils/IO/Pdf/PdfInterface.php
index eb4d10bff..74032d66d 100644
--- a/Utils/IO/Pdf/PdfInterface.php
+++ b/Utils/IO/Pdf/PdfInterface.php
@@ -34,5 +34,5 @@ interface PdfInterface
*
* @since 1.0.0
*/
- public function exportPdf($path);
+ public function exportPdf($path) : void;
}
diff --git a/Utils/JsonBuilder.php b/Utils/JsonBuilder.php
index 08a92fa21..d167bb28f 100644
--- a/Utils/JsonBuilder.php
+++ b/Utils/JsonBuilder.php
@@ -86,7 +86,7 @@ final class JsonBuilder implements \Serializable, \JsonSerializable
/**
* {@inheritdoc}
*/
- public function unserialize($serialized)
+ public function unserialize($serialized) : void
{
$this->json = \json_decode($serialized, true);
}
diff --git a/Utils/Permutation.php b/Utils/Permutation.php
index ce8e96b3f..8a98c1f93 100644
--- a/Utils/Permutation.php
+++ b/Utils/Permutation.php
@@ -107,7 +107,7 @@ final class Permutation
* @return mixed
*
* @throws \InvalidArgumentException This exception is thrown if the $toPermute argument is neither array or string
- * @throws \OutOfBoundsException This exception is thrown if the permutation key is larger than the data to permute
+ * @throws \OutOfBoundsException This exception is thrown if the permutation key is larger than the data to permute
*
* @since 1.0.0
*/
diff --git a/Utils/TaskSchedule/Interval.php b/Utils/TaskSchedule/Interval.php
index 97c53c0de..7b45ec111 100644
--- a/Utils/TaskSchedule/Interval.php
+++ b/Utils/TaskSchedule/Interval.php
@@ -114,7 +114,7 @@ class Interval implements \Serializable
*
* @since 1.0.0
*/
- public function unserialize($serialized)
+ public function unserialize($serialized) : void
{
$elements = \explode(' ', \trim($serialized));
diff --git a/Views/PaginationView.php b/Views/PaginationView.php
index 15d2f5d23..6b32319f0 100644
--- a/Views/PaginationView.php
+++ b/Views/PaginationView.php
@@ -72,7 +72,7 @@ class PaginationView extends View
*
* @since 1.0.0
*/
- public function setMaxPages(int $maxPages)
+ public function setMaxPages(int $maxPages) : void
{
$this->maxPages = $maxPages;
}
@@ -94,7 +94,7 @@ class PaginationView extends View
*
* @since 1.0.0
*/
- public function setPages(int $pages)
+ public function setPages(int $pages) : void
{
$this->pages = $pages;
}
@@ -116,7 +116,7 @@ class PaginationView extends View
*
* @since 1.0.0
*/
- public function setPage(int $page = 1)
+ public function setPage(int $page = 1) : void
{
$this->page = $page;
}
@@ -138,7 +138,7 @@ class PaginationView extends View
*
* @since 1.0.0
*/
- public function setResults(int $results = 0)
+ public function setResults(int $results = 0) : void
{
$this->results = $results;
}
diff --git a/Views/ViewAbstract.php b/Views/ViewAbstract.php
index 99fc1ea57..dcf02b2da 100644
--- a/Views/ViewAbstract.php
+++ b/Views/ViewAbstract.php
@@ -275,7 +275,7 @@ abstract class ViewAbstract implements \Serializable
* @since 1.0.0
* @codeCoverageIgnore
*/
- public function unserialize($raw)
+ public function unserialize($raw) : void
{
}
}
diff --git a/tests/Account/AccountManagerTest.php b/tests/Account/AccountManagerTest.php
index 8502d8192..22cab2477 100644
--- a/tests/Account/AccountManagerTest.php
+++ b/tests/Account/AccountManagerTest.php
@@ -21,7 +21,7 @@ require_once __DIR__ . '/../Autoloader.php';
class AccountManagerTest extends \PHPUnit\Framework\TestCase
{
- public function testAttributes()
+ public function testAttributes() : void
{
$manager = new AccountManager($GLOBALS['httpSession']);
self::assertInstanceOf('\phpOMS\Account\AccountManager', $manager);
@@ -30,7 +30,7 @@ class AccountManagerTest extends \PHPUnit\Framework\TestCase
self::assertObjectHasAttribute('accounts', $manager);
}
- public function testDefault()
+ public function testDefault() : void
{
$manager = new AccountManager($GLOBALS['httpSession']);
@@ -39,7 +39,7 @@ class AccountManagerTest extends \PHPUnit\Framework\TestCase
self::assertInstanceOf('\phpOMS\Account\NullAccount', $manager->get(-1));
}
- public function testSetGet()
+ public function testSetGet() : void
{
$manager = new AccountManager($GLOBALS['httpSession']);
$account = new Account(3);
diff --git a/tests/Account/AccountStatusTest.php b/tests/Account/AccountStatusTest.php
index e51732030..3313aaaf0 100644
--- a/tests/Account/AccountStatusTest.php
+++ b/tests/Account/AccountStatusTest.php
@@ -19,7 +19,7 @@ use phpOMS\Account\AccountStatus;
class AccountStatusTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(4, \count(AccountStatus::getConstants()));
self::assertEquals(1, AccountStatus::ACTIVE);
diff --git a/tests/Account/AccountTest.php b/tests/Account/AccountTest.php
index a49f8c9ce..f73655106 100644
--- a/tests/Account/AccountTest.php
+++ b/tests/Account/AccountTest.php
@@ -28,12 +28,12 @@ class AccountTest extends \PHPUnit\Framework\TestCase
{
protected $l11nManager = null;
- protected function setUp()
+ protected function setUp() : void
{
$this->l11nManager = new L11nManager('Api');
}
- public function testAttributes()
+ public function testAttributes() : void
{
$account = new Account();
self::assertInstanceOf('\phpOMS\Account\Account', $account);
@@ -55,7 +55,7 @@ class AccountTest extends \PHPUnit\Framework\TestCase
self::assertObjectHasAttribute('l11n', $account);
}
- public function testDefault()
+ public function testDefault() : void
{
$account = new Account();
@@ -99,7 +99,7 @@ class AccountTest extends \PHPUnit\Framework\TestCase
self::assertEquals($array, $account->jsonSerialize());
}
- public function testSetGet()
+ public function testSetGet() : void
{
$account = new Account();
@@ -168,7 +168,7 @@ class AccountTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testEmailException()
+ public function testEmailException() : void
{
$account = new Account();
$account->setEmail('d.duck!@#%@duckburg');
@@ -177,7 +177,7 @@ class AccountTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\Stdlib\Base\Exception\InvalidEnumValue
*/
- public function testStatusException()
+ public function testStatusException() : void
{
$account = new Account();
$account->setStatus(99);
@@ -186,7 +186,7 @@ class AccountTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\Stdlib\Base\Exception\InvalidEnumValue
*/
- public function testTypeException()
+ public function testTypeException() : void
{
$account = new Account();
$account->setType(99);
diff --git a/tests/Account/AccountTypeTest.php b/tests/Account/AccountTypeTest.php
index a2eaab0cb..3fae4d81f 100644
--- a/tests/Account/AccountTypeTest.php
+++ b/tests/Account/AccountTypeTest.php
@@ -19,7 +19,7 @@ use phpOMS\Account\AccountType;
class AccountTypeTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(2, \count(AccountType::getConstants()));
self::assertEquals(0, AccountType::USER);
diff --git a/tests/Account/GroupStatusTest.php b/tests/Account/GroupStatusTest.php
index 0dee61f25..0310090a7 100644
--- a/tests/Account/GroupStatusTest.php
+++ b/tests/Account/GroupStatusTest.php
@@ -19,7 +19,7 @@ use phpOMS\Account\GroupStatus;
class GroupStatusTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(3, \count(GroupStatus::getConstants()));
self::assertEquals(1, GroupStatus::ACTIVE);
diff --git a/tests/Account/GroupTest.php b/tests/Account/GroupTest.php
index 0dd522dd7..28ae4996a 100644
--- a/tests/Account/GroupTest.php
+++ b/tests/Account/GroupTest.php
@@ -20,7 +20,7 @@ require_once __DIR__ . '/../Autoloader.php';
class GroupTest extends \PHPUnit\Framework\TestCase
{
- public function testAttributes()
+ public function testAttributes() : void
{
$group = new Group();
self::assertInstanceOf('\phpOMS\Account\Group', $group);
@@ -35,7 +35,7 @@ class GroupTest extends \PHPUnit\Framework\TestCase
self::assertObjectHasAttribute('status', $group);
}
- public function testDefault()
+ public function testDefault() : void
{
$group = new Group();
@@ -59,7 +59,7 @@ class GroupTest extends \PHPUnit\Framework\TestCase
self::assertEquals($array, $group->jsonSerialize());
}
- public function testSetGet()
+ public function testSetGet() : void
{
$group = new Group();
@@ -76,7 +76,7 @@ class GroupTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\Stdlib\Base\Exception\InvalidEnumValue
*/
- public function testStatusException()
+ public function testStatusException() : void
{
$account = new Group();
$account->setStatus(99);
diff --git a/tests/Account/NullAccountTest.php b/tests/Account/NullAccountTest.php
index 193b25e4d..2c3fee2df 100644
--- a/tests/Account/NullAccountTest.php
+++ b/tests/Account/NullAccountTest.php
@@ -19,7 +19,7 @@ use phpOMS\Account\NullAccount;
class NullAccountTest extends \PHPUnit\Framework\TestCase
{
- public function testNull()
+ public function testNull() : void
{
self::assertInstanceOf('\phpOMS\Account\Account', new NullAccount());
}
diff --git a/tests/Account/PermissionAbstractTest.php b/tests/Account/PermissionAbstractTest.php
index e5cfd8e7c..1425bdb46 100644
--- a/tests/Account/PermissionAbstractTest.php
+++ b/tests/Account/PermissionAbstractTest.php
@@ -20,7 +20,7 @@ use phpOMS\Account\PermissionType;
class PermissionAbstractTest extends \PHPUnit\Framework\TestCase
{
- public function testAbstractDefault()
+ public function testAbstractDefault() : void
{
$perm = new class extends PermissionAbstract {};
@@ -50,7 +50,7 @@ class PermissionAbstractTest extends \PHPUnit\Framework\TestCase
);
}
- public function testAbstractGetSet()
+ public function testAbstractGetSet() : void
{
$perm = new class extends PermissionAbstract {};
diff --git a/tests/Account/PermissionTypeTest.php b/tests/Account/PermissionTypeTest.php
index 97a49bac2..fd80b72f0 100644
--- a/tests/Account/PermissionTypeTest.php
+++ b/tests/Account/PermissionTypeTest.php
@@ -19,7 +19,7 @@ use phpOMS\Account\PermissionType;
class PermissionTypeTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(6, \count(PermissionType::getConstants()));
self::assertEquals(PermissionType::getConstants(), array_unique(PermissionType::getConstants()));
diff --git a/tests/ApplicationAbstractTest.php b/tests/ApplicationAbstractTest.php
index 6ec828a5d..aba2d64de 100644
--- a/tests/ApplicationAbstractTest.php
+++ b/tests/ApplicationAbstractTest.php
@@ -17,7 +17,7 @@ use phpOMS\ApplicationAbstract;
class ApplicationAbstractTest extends \PHPUnit\Framework\TestCase
{
- public function testGetSet()
+ public function testGetSet() : void
{
$obj = new class extends ApplicationAbstract {};
diff --git a/tests/Asset/AssetManagerTest.php b/tests/Asset/AssetManagerTest.php
index becff8dc6..6264414f0 100644
--- a/tests/Asset/AssetManagerTest.php
+++ b/tests/Asset/AssetManagerTest.php
@@ -19,7 +19,7 @@ require_once __DIR__ . '/../Autoloader.php';
class AssetManagerTest extends \PHPUnit\Framework\TestCase
{
- public function testAttributes()
+ public function testAttributes() : void
{
$manager = new AssetManager();
self::assertInstanceOf('\phpOMS\Asset\AssetManager', $manager);
@@ -28,7 +28,7 @@ class AssetManagerTest extends \PHPUnit\Framework\TestCase
self::assertObjectHasAttribute('assets', $manager);
}
- public function testDefault()
+ public function testDefault() : void
{
$manager = new AssetManager();
@@ -37,7 +37,7 @@ class AssetManagerTest extends \PHPUnit\Framework\TestCase
self::assertEquals(0, $manager->count());
}
- public function testSetGet()
+ public function testSetGet() : void
{
$manager = new AssetManager();
diff --git a/tests/Asset/AssetTypeTest.php b/tests/Asset/AssetTypeTest.php
index c44e4f111..da6a4008b 100644
--- a/tests/Asset/AssetTypeTest.php
+++ b/tests/Asset/AssetTypeTest.php
@@ -19,7 +19,7 @@ use phpOMS\Asset\AssetType;
class AssetTypeTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(3, \count(AssetType::getConstants()));
self::assertEquals(0, AssetType::CSS);
diff --git a/tests/Auth/AuthTest.php b/tests/Auth/AuthTest.php
index 532ada283..12afabbef 100644
--- a/tests/Auth/AuthTest.php
+++ b/tests/Auth/AuthTest.php
@@ -19,7 +19,7 @@ require_once __DIR__ . '/../Autoloader.php';
class AuthTest extends \PHPUnit\Framework\TestCase
{
- public function testWithHttpSession()
+ public function testWithHttpSession() : void
{
self::assertEquals(0, Auth::authenticate($GLOBALS['httpSession']));
diff --git a/tests/Auth/LoginReturnTypeTest.php b/tests/Auth/LoginReturnTypeTest.php
index 95575f14e..39d08339f 100644
--- a/tests/Auth/LoginReturnTypeTest.php
+++ b/tests/Auth/LoginReturnTypeTest.php
@@ -19,7 +19,7 @@ use phpOMS\Auth\LoginReturnType;
class LoginReturnTypeTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(11, \count(LoginReturnType::getConstants()));
self::assertEquals(0, LoginReturnType::OK);
diff --git a/tests/AutoloadExceptionTest.php b/tests/AutoloadExceptionTest.php
index cf38a75a9..11a25022f 100644
--- a/tests/AutoloadExceptionTest.php
+++ b/tests/AutoloadExceptionTest.php
@@ -17,7 +17,7 @@ use phpOMS\AutoloadException;
class AutoloadExceptionTest extends \PHPUnit\Framework\TestCase
{
- public function testException()
+ public function testException() : void
{
self::assertInstanceOf(\RuntimeException::class, new AutoloadException(''));
}
diff --git a/tests/AutoloaderTest.php b/tests/AutoloaderTest.php
index 7fa8f24e9..8a2239d93 100644
--- a/tests/AutoloaderTest.php
+++ b/tests/AutoloaderTest.php
@@ -17,7 +17,7 @@ use phpOMS\Autoloader;
class AutoloaderTest extends \PHPUnit\Framework\TestCase
{
- public function testAutoloader()
+ public function testAutoloader() : void
{
self::assertTrue(Autoloader::exists('\phpOMS\Autoloader'));
self::assertFalse(Autoloader::exists('\Does\Not\Exist'));
diff --git a/tests/Business/Finance/DepreciationTest.php b/tests/Business/Finance/DepreciationTest.php
index 401c7b199..d17a76bfd 100644
--- a/tests/Business/Finance/DepreciationTest.php
+++ b/tests/Business/Finance/DepreciationTest.php
@@ -17,7 +17,7 @@ use phpOMS\Business\Finance\Depreciation;
class DepreciationTest extends \PHPUnit\Framework\TestCase
{
- public function testStraightLine()
+ public function testStraightLine() : void
{
$start = 23280;
$duration = 6;
@@ -27,7 +27,7 @@ class DepreciationTest extends \PHPUnit\Framework\TestCase
self::assertEquals(23280 - 3880 * $t, Depreciation::getStraightLineResidualInT($start, $duration, $t), '', 5);
}
- public function testArithmeticDegressivDepreciation()
+ public function testArithmeticDegressivDepreciation() : void
{
$start = 150000;
$residual = 18000;
@@ -39,7 +39,7 @@ class DepreciationTest extends \PHPUnit\Framework\TestCase
self::assertEquals(70800, Depreciation::getArithmeticDegressivDepreciationResidualInT($start, $residual, $duration, $t), '', 5);
}
- public function testArithmeticProgressivDepreciation()
+ public function testArithmeticProgressivDepreciation() : void
{
$start = 40000;
$residual = 4700;
@@ -51,7 +51,7 @@ class DepreciationTest extends \PHPUnit\Framework\TestCase
self::assertEquals(29410, Depreciation::getArithmeticProgressivDepreciationResidualInT($start, $residual, $duration, $t), '', 5);
}
- public function testGeometicProgressivDepreciation()
+ public function testGeometicProgressivDepreciation() : void
{
$start = 150000;
$residual = 18000;
@@ -63,7 +63,7 @@ class DepreciationTest extends \PHPUnit\Framework\TestCase
self::assertEquals(125965, Depreciation::getGeometicProgressivDepreciationResidualInT($start, $residual, $duration, $t), '', 5);
}
- public function testGeometicDegressivDepreciation()
+ public function testGeometicDegressivDepreciation() : void
{
$start = 150000;
$residual = 18000;
diff --git a/tests/Business/Finance/FinanceFormulasTest.php b/tests/Business/Finance/FinanceFormulasTest.php
index 12f4d1299..374875323 100644
--- a/tests/Business/Finance/FinanceFormulasTest.php
+++ b/tests/Business/Finance/FinanceFormulasTest.php
@@ -17,7 +17,7 @@ use phpOMS\Business\Finance\FinanceFormulas;
class FinanceFormulasTest extends \PHPUnit\Framework\TestCase
{
- public function testAnnualPercentageYield()
+ public function testAnnualPercentageYield() : void
{
$expected = 0.06168;
@@ -29,7 +29,7 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase
self::assertEquals(round($r, 2), FinanceFormulas::getStateAnnualInterestRateOfAPY($apy, $n));
}
- public function testFutureValueOfAnnuity()
+ public function testFutureValueOfAnnuity() : void
{
$expected = 5204.04;
@@ -43,7 +43,7 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase
self::assertEquals(round($P, 2), \round(FinanceFormulas::getPeriodicPaymentOfFVA($fva, $r, $n), 2));
}
- public function testFutureValueOfAnnuityContinuousCompounding()
+ public function testFutureValueOfAnnuityContinuousCompounding() : void
{
$expected = 12336.42;
@@ -57,7 +57,7 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase
self::assertEquals($t, FinanceFormulas::getTimeOfFVACC($fvacc, $cf, $r));
}
- public function testAnnuityPaymentPV()
+ public function testAnnuityPaymentPV() : void
{
$expected = 212.16;
@@ -71,7 +71,7 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase
self::assertEquals(round($pv, 2), \round(FinanceFormulas::getPresentValueOfAPPV($p, $r, $n), 2));
}
- public function testAnnuityPaymentFV()
+ public function testAnnuityPaymentFV() : void
{
$expected = 192.16;
@@ -85,7 +85,7 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase
self::assertEquals(round($fv, 2), \round(FinanceFormulas::getFutureValueOfAPFV($p, $r, $n), 2));
}
- public function testAnnutiyPaymentFactorPV()
+ public function testAnnutiyPaymentFactorPV() : void
{
$expected = 0.21216;
@@ -97,7 +97,7 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase
self::assertEquals($n, FinanceFormulas::getNumberOfAPFPV($p, $r));
}
- public function testPresentValueOfAnnuity()
+ public function testPresentValueOfAnnuity() : void
{
$expected = 4713.46;
@@ -111,7 +111,7 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase
self::assertEquals(round($P, 2), \round(FinanceFormulas::getPeriodicPaymentOfPVA($pva, $r, $n), 2));
}
- public function testPresentValueAnnuityFactor()
+ public function testPresentValueAnnuityFactor() : void
{
$expected = 4.7135;
@@ -123,7 +123,7 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase
self::assertEquals($n, FinanceFormulas::getPeriodsOfPVAF($p, $r));
}
- public function testPresentValueOfAnnuityDue()
+ public function testPresentValueOfAnnuityDue() : void
{
$expected = 454.60;
@@ -138,7 +138,7 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase
self::assertEquals($n, FinanceFormulas::getPeriodsOfPVAD($PV, $P, $r));
}
- public function testFutureValueOfAnnuityDue()
+ public function testFutureValueOfAnnuityDue() : void
{
$expected = 580.19;
@@ -153,7 +153,7 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase
self::assertEquals($n, FinanceFormulas::getPeriodsOfFVAD($FV, $P, $r));
}
- public function testRatios()
+ public function testRatios() : void
{
self::assertEquals(300 / 400, FinanceFormulas::getRelativeMarketShareByShare(300, 400));
self::assertEquals(300 / 400, FinanceFormulas::getRelativeMarketShareBySales(300, 400));
@@ -188,7 +188,7 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase
self::assertEquals(100 / 0.15, FinanceFormulas::getPresentValueOfPerpetuity(100, 0.15));
}
- public function testCompound()
+ public function testCompound() : void
{
$expected = 15.76;
@@ -203,7 +203,7 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase
self::assertEquals($t, (int) \round(FinanceFormulas::getPeriodsOfCompundInterest($P, $C, $r), 0));
}
- public function testContinuousCompounding()
+ public function testContinuousCompounding() : void
{
$expected = 116.18;
@@ -219,7 +219,7 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase
self::assertTrue(\abs($r - FinanceFormulas::getRateOfContinuousCompounding($P, $C, $t)) < 0.01);
}
- public function testSimpleInterest()
+ public function testSimpleInterest() : void
{
$P = 100.00;
$r = 0.05;
@@ -233,7 +233,7 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase
self::assertEquals($t, FinanceFormulas::getSimpleInterestTime($I, $P, $r));
}
- public function testDiscountedPaybackPeriod()
+ public function testDiscountedPaybackPeriod() : void
{
$O1 = 5000;
$r = 0.05;
@@ -242,7 +242,7 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase
self::assertTrue(\abs(5.896 - FinanceFormulas::getDiscountedPaybackPeriod($CF, $O1, $r)) < 0.01);
}
- public function testDoublingTime()
+ public function testDoublingTime() : void
{
$r = 0.05;
@@ -250,14 +250,14 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase
self::assertTrue(\abs($r - FinanceFormulas::getDoublingRate(14.207)) < 0.01);
}
- public function testDoublingTimeContinuousCompounding()
+ public function testDoublingTimeContinuousCompounding() : void
{
$r = 0.05;
self::assertEquals(13.863, FinanceFormulas::getDoublingTimeContinuousCompounding($r), '', 0.01);
}
- public function testEquivalentAnnualAnnuity()
+ public function testEquivalentAnnualAnnuity() : void
{
$npv = 1000;
$r = 0.15;
@@ -268,7 +268,7 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase
self::assertEquals($npv, FinanceFormulas::getNetPresentValueOfEAA(240.36, $r, $n), '', 0.01);
}
- public function testFreeCashFlowToEquity()
+ public function testFreeCashFlowToEquity() : void
{
$income = 1000;
$depamo = 300;
@@ -279,7 +279,7 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase
self::assertEquals(1200, FinanceFormulas::getFreeCashFlowToEquity($income, $depamo, $capital, $wc, $borrowing), '', 0.01);
}
- public function testFreeCashFlowToFirm()
+ public function testFreeCashFlowToFirm() : void
{
$ebit = 1000;
$depamo = 300;
@@ -290,7 +290,7 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase
self::assertEquals(550, FinanceFormulas::getFreeCashFlowToFirm($ebit, $t, $depamo, $capital, $wc), '', 0.01);
}
- public function testFutureValue()
+ public function testFutureValue() : void
{
$c = 1000;
$r = 0.15;
@@ -299,7 +299,7 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase
self::assertEquals(2660.02, FinanceFormulas::getFutureValue($c, $r, $n), '', 0.01);
}
- public function testFutureValueContinuousCompounding()
+ public function testFutureValueContinuousCompounding() : void
{
$pv = 1000;
$r = 0.15;
@@ -308,7 +308,7 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase
self::assertEquals(2857.65, FinanceFormulas::getFutureValueContinuousCompounding($pv, $r, $t), '', 0.01);
}
- public function testValueFactor()
+ public function testValueFactor() : void
{
$r = 0.15;
$n = 7;
@@ -317,14 +317,14 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase
self::assertEquals(0.37594, FinanceFormulas::getPresentValueFactor($r, $n), '', 0.01);
}
- public function testGeometricMeanReturn()
+ public function testGeometricMeanReturn() : void
{
$r = [0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07];
self::assertEquals(0.04123, FinanceFormulas::getGeometricMeanReturn($r), '', 0.01);
}
- public function testGrowingAnnuityFV()
+ public function testGrowingAnnuityFV() : void
{
$p = 1000;
$r = 0.15;
@@ -334,7 +334,7 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase
self::assertEquals(14226.06, FinanceFormulas::getGrowingAnnuityFV($p, $r, $g, $n), '', 0.01);
}
- public function testGrowingAnnuityPaymentPV()
+ public function testGrowingAnnuityPaymentPV() : void
{
$p = 1000;
$r = 0.15;
@@ -344,7 +344,7 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase
self::assertEquals(186.98, FinanceFormulas::getGrowingAnnuityPaymentPV($p, $r, $g, $n), '', 0.01);
}
- public function testGrowingAnnuityPaymentFV()
+ public function testGrowingAnnuityPaymentFV() : void
{
$fv = 1000;
$r = 0.15;
@@ -354,7 +354,7 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase
self::assertEquals(70.29, FinanceFormulas::getGrowingAnnuityPaymentFV($fv, $r, $g, $n), '', 0.01);
}
- public function testGrowingAnnuityPV()
+ public function testGrowingAnnuityPV() : void
{
$p = 1000;
$r = 0.15;
@@ -364,7 +364,7 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase
self::assertEquals(5348.1, FinanceFormulas::getGrowingAnnuityPV($p, $r, $g, $n), '', 0.01);
}
- public function testGrowingPerpetuityPV()
+ public function testGrowingPerpetuityPV() : void
{
$d = 1000;
$r = 0.15;
@@ -373,7 +373,7 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase
self::assertEquals(20000, FinanceFormulas::getGrowingPerpetuityPV($d, $r, $g), '', 0.01);
}
- public function testNetPresentValue()
+ public function testNetPresentValue() : void
{
$c = [1000, 100, 200, 300, 400, 500, 600];
$r = 0.15;
@@ -384,12 +384,12 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \UnexpectedValueException
*/
- public function testInvalidNetPresentValue()
+ public function testInvalidNetPresentValue() : void
{
FinanceFormulas::getNetPresentValue([], 0.1);
}
- public function testRealRateOfReturn()
+ public function testRealRateOfReturn() : void
{
$nominal = 0.15;
$inflation = 0.05;
@@ -397,12 +397,12 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase
self::assertEquals(0.09524, FinanceFormulas::getRealRateOfReturn($nominal, $inflation), '', 0.01);
}
- public function testNetWorkingCapital()
+ public function testNetWorkingCapital() : void
{
self::assertEquals(1000 - 600, FinanceFormulas::getNetWorkingCapital(1000, 600), '', 0.01);
}
- public function testNumberOfPeriodsPVFV()
+ public function testNumberOfPeriodsPVFV() : void
{
$fv = 1200;
$pv = 1000;
@@ -411,7 +411,7 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase
self::assertEquals(6.1681, FinanceFormulas::getNumberOfPeriodsPVFV($fv, $pv, $r), '', 0.01);
}
- public function testPresentValue()
+ public function testPresentValue() : void
{
$c = 1000;
$r = 0.15;
@@ -420,7 +420,7 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase
self::assertEquals(375.94, FinanceFormulas::getPresentValue($c, $r, $n), '', 0.01);
}
- public function testPresentValueContinuousCompounding()
+ public function testPresentValueContinuousCompounding() : void
{
$c = 1000;
$r = 0.15;
diff --git a/tests/Business/Finance/LoanTest.php b/tests/Business/Finance/LoanTest.php
index b7a5c9f6a..d0d2fe203 100644
--- a/tests/Business/Finance/LoanTest.php
+++ b/tests/Business/Finance/LoanTest.php
@@ -17,13 +17,13 @@ use phpOMS\Business\Finance\Loan;
class LoanTest extends \PHPUnit\Framework\TestCase
{
- public function testRatios()
+ public function testRatios() : void
{
self::assertEquals(100 / 50, Loan::getLoanToDepositRatio(100, 50));
self::assertEquals(100 / 50, Loan::getLoanToValueRatio(100, 50));
}
- public function testPaymentsOnBalloonLoan()
+ public function testPaymentsOnBalloonLoan() : void
{
$pv = 1000;
$r = 0.15;
@@ -33,7 +33,7 @@ class LoanTest extends \PHPUnit\Framework\TestCase
self::assertEquals(213.25, Loan::getPaymentsOnBalloonLoan($pv, $r, $n, $balloon), '', 0.01);
}
- public function testBalloonBalanceOfLoan()
+ public function testBalloonBalanceOfLoan() : void
{
$pv = 1000;
$p = 300;
@@ -43,7 +43,7 @@ class LoanTest extends \PHPUnit\Framework\TestCase
self::assertEquals(-660.02, Loan::getBalloonBalanceOfLoan($pv, $p, $r, $n), '', 0.01);
}
- public function testLoanPayment()
+ public function testLoanPayment() : void
{
$pv = 1000;
$r = 0.15;
@@ -52,7 +52,7 @@ class LoanTest extends \PHPUnit\Framework\TestCase
self::assertEquals(240.36, Loan::getLoanPayment($pv, $r, $n), '', 0.01);
}
- public function testRemainingBalanceLoan()
+ public function testRemainingBalanceLoan() : void
{
$pv = 1000;
$p = 200;
diff --git a/tests/Business/Finance/LorenzkurveTest.php b/tests/Business/Finance/LorenzkurveTest.php
index e7c14f124..ce47af0b9 100644
--- a/tests/Business/Finance/LorenzkurveTest.php
+++ b/tests/Business/Finance/LorenzkurveTest.php
@@ -17,7 +17,7 @@ use phpOMS\Business\Finance\Lorenzkurve;
class LorenzkurveTest extends \PHPUnit\Framework\TestCase
{
- public function testLorenz()
+ public function testLorenz() : void
{
$arr = [1, 1, 1, 1, 1, 1, 1, 10, 33, 50];
diff --git a/tests/Business/Finance/StockBondsTest.php b/tests/Business/Finance/StockBondsTest.php
index 458692f51..487a02168 100644
--- a/tests/Business/Finance/StockBondsTest.php
+++ b/tests/Business/Finance/StockBondsTest.php
@@ -17,7 +17,7 @@ use phpOMS\Business\Finance\StockBonds;
class StockBondsTest extends \PHPUnit\Framework\TestCase
{
- public function testRatios()
+ public function testRatios() : void
{
self::assertEquals(100 / 50, StockBonds::getBookValuePerShare(100, 50));
self::assertEquals(100 / 50, StockBonds::getCurrentYield(100, 50));
@@ -31,34 +31,34 @@ class StockBondsTest extends \PHPUnit\Framework\TestCase
self::assertEquals(100 / 50, StockBonds::getPriceToSalesRatio(100, 50));
}
- public function testBondEquivalentYield()
+ public function testBondEquivalentYield() : void
{
self::assertEquals(0.40556, StockBonds::getBondEquivalentYield(100, 90, 100), '', 0.01);
}
- public function testExpectedReturnCAPM()
+ public function testExpectedReturnCAPM() : void
{
self::assertEquals(7, StockBonds::getExpectedReturnCAPM(3, 2, 5), '', 0.01);
}
- public function testCapitalGainsYield()
+ public function testCapitalGainsYield() : void
{
self::assertEquals(0.1, StockBonds::getCapitalGainsYield(100, 110), '', 0.01);
}
- public function testDilutedEarningsPerShare()
+ public function testDilutedEarningsPerShare() : void
{
self::assertEquals(9.09, StockBonds::getDilutedEarningsPerShare(1000, 100, 10), '', 0.1);
}
- public function testHoldingPeriodReturn()
+ public function testHoldingPeriodReturn() : void
{
$r = [0.01, 0.02, 0.03, 0.04];
self::assertEquals(0.10355, StockBonds::getHoldingPeriodReturn($r), '', 0.01);
}
- public function testTaxEquivalentYield()
+ public function testTaxEquivalentYield() : void
{
$free = 0.15;
$rate = 0.05;
@@ -66,7 +66,7 @@ class StockBondsTest extends \PHPUnit\Framework\TestCase
self::assertEquals(0.15789, StockBonds::getTaxEquivalentYield($free, $rate), '', 0.01);
}
- public function testNetAssetValue()
+ public function testNetAssetValue() : void
{
$assets = 1000;
$liabilities = 300;
@@ -75,7 +75,7 @@ class StockBondsTest extends \PHPUnit\Framework\TestCase
self::assertEquals(1.75, StockBonds::getNetAssetValue($assets, $liabilities, $shares), '', 0.01);
}
- public function testPresentValueOfStockConstantGrowth()
+ public function testPresentValueOfStockConstantGrowth() : void
{
$div = 500;
$r = 0.15;
@@ -84,7 +84,7 @@ class StockBondsTest extends \PHPUnit\Framework\TestCase
self::assertEquals(5000, StockBonds::getPresentValueOfStockConstantGrowth($div, $r, $g), '', 0.01);
}
- public function testTotalStockReturn()
+ public function testTotalStockReturn() : void
{
$p0 = 1000;
$p1 = 1200;
@@ -93,7 +93,7 @@ class StockBondsTest extends \PHPUnit\Framework\TestCase
self::assertEquals(0.3, StockBonds::getTotalStockReturn($p0, $p1, $d), '', 0.01);
}
- public function testYieldToMaturity()
+ public function testYieldToMaturity() : void
{
$c = 100;
$f = 1000;
@@ -103,7 +103,7 @@ class StockBondsTest extends \PHPUnit\Framework\TestCase
self::assertEquals(0.1138, StockBonds::getYieldToMaturity($c, $f, $p, $n), '', 0.01);
}
- public function testZeroCouponBondValue()
+ public function testZeroCouponBondValue() : void
{
$f = 100;
$r = 0.06;
@@ -112,7 +112,7 @@ class StockBondsTest extends \PHPUnit\Framework\TestCase
self::assertEquals(74.73, StockBonds::getZeroCouponBondValue($f, $r, $t), '', 0.01);
}
- public function testZeroCouponBondEffectiveYield()
+ public function testZeroCouponBondEffectiveYield() : void
{
$f = 100;
$pv = 90;
diff --git a/tests/Business/Marketing/MetricsTest.php b/tests/Business/Marketing/MetricsTest.php
index d644dd962..f19dac5a7 100644
--- a/tests/Business/Marketing/MetricsTest.php
+++ b/tests/Business/Marketing/MetricsTest.php
@@ -17,7 +17,7 @@ use phpOMS\Business\Marketing\Metrics;
class MetricsTest extends \PHPUnit\Framework\TestCase
{
- public function testMetrics()
+ public function testMetrics() : void
{
self::assertTrue(0.85 - Metrics::getCustomerRetention(105, 20, 100) < 0.01);
}
diff --git a/tests/Business/Marketing/NetPromoterScoreTest.php b/tests/Business/Marketing/NetPromoterScoreTest.php
index c2aad65ca..8d9ae3b0a 100644
--- a/tests/Business/Marketing/NetPromoterScoreTest.php
+++ b/tests/Business/Marketing/NetPromoterScoreTest.php
@@ -17,14 +17,14 @@ use phpOMS\Business\Marketing\NetPromoterScore;
class NetPromoterScoreTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
$nps = new NetPromoterScore();
self::assertEquals(0, $nps->getScore());
}
- public function testGetSet()
+ public function testGetSet() : void
{
$nps = new NetPromoterScore();
diff --git a/tests/Business/Programming/MetricsTest.php b/tests/Business/Programming/MetricsTest.php
index f23c3aaca..be931ab92 100644
--- a/tests/Business/Programming/MetricsTest.php
+++ b/tests/Business/Programming/MetricsTest.php
@@ -17,7 +17,7 @@ use phpOMS\Business\Programming\Metrics;
class MetricsTest extends \PHPUnit\Framework\TestCase
{
- public function testMetrics()
+ public function testMetrics() : void
{
self::assertEquals((int) \sqrt(5 * 5 + 11 * 11 + 9 * 9), Metrics::abcScore(5, 11, 9));
diff --git a/tests/Business/Sales/MarketShareEstimationTest.php b/tests/Business/Sales/MarketShareEstimationTest.php
index eddb3a4a9..c8db25438 100644
--- a/tests/Business/Sales/MarketShareEstimationTest.php
+++ b/tests/Business/Sales/MarketShareEstimationTest.php
@@ -16,14 +16,14 @@ use phpOMS\Business\Sales\MarketShareEstimation;
class MarketShareEstimationTest extends \PHPUnit\Framework\TestCase
{
- public function testZipfRank()
+ public function testZipfRank() : void
{
self::assertEquals(13, MarketShareEstimation::getRankFromMarketShare(1000, 0.01));
self::assertEquals(19, MarketShareEstimation::getRankFromMarketShare(100, 0.01));
self::assertEquals(8, MarketShareEstimation::getRankFromMarketShare(100000, 0.01));
}
- public function testZipfShare()
+ public function testZipfShare() : void
{
self::assertTrue(\abs(0.01 - MarketShareEstimation::getMarketShareFromRank(1000, 13)) < 0.01);
self::assertTrue(\abs(0.01 - MarketShareEstimation::getMarketShareFromRank(100, 19)) < 0.01);
diff --git a/tests/Config/OptionsTraitTest.php b/tests/Config/OptionsTraitTest.php
index 8cdfc15ab..835693add 100644
--- a/tests/Config/OptionsTraitTest.php
+++ b/tests/Config/OptionsTraitTest.php
@@ -20,7 +20,7 @@ require_once __DIR__ . '/../Autoloader.php';
class OptionsTraitTest extends \PHPUnit\Framework\TestCase
{
- public function testOptionTrait()
+ public function testOptionTrait() : void
{
$class = new class {
use OptionsTrait;
@@ -30,7 +30,7 @@ class OptionsTraitTest extends \PHPUnit\Framework\TestCase
self::assertObjectHasAttribute('options', $class);
}
- public function testDefault()
+ public function testDefault() : void
{
$class = new class {
use OptionsTrait;
@@ -40,7 +40,7 @@ class OptionsTraitTest extends \PHPUnit\Framework\TestCase
self::assertNull($class->getOption('someKey'));
}
- public function testSetGet()
+ public function testSetGet() : void
{
$class = new class {
use OptionsTrait;
diff --git a/tests/DataStorage/Cache/CachePoolTest.php b/tests/DataStorage/Cache/CachePoolTest.php
index ce919cb35..02e24a76e 100644
--- a/tests/DataStorage/Cache/CachePoolTest.php
+++ b/tests/DataStorage/Cache/CachePoolTest.php
@@ -18,7 +18,7 @@ use phpOMS\DataStorage\Cache\Connection\FileCache;
class CachePoolTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
$pool = new CachePool();
@@ -26,7 +26,7 @@ class CachePoolTest extends \PHPUnit\Framework\TestCase
self::assertInstanceOf('\phpOMS\DataStorage\Cache\Connection\NullCache', $pool->get());
}
- public function testGetSet()
+ public function testGetSet() : void
{
$pool = new CachePool();
diff --git a/tests/DataStorage/Cache/CacheStatusTest.php b/tests/DataStorage/Cache/CacheStatusTest.php
index e910aa8ef..42085b347 100644
--- a/tests/DataStorage/Cache/CacheStatusTest.php
+++ b/tests/DataStorage/Cache/CacheStatusTest.php
@@ -17,7 +17,7 @@ use phpOMS\DataStorage\Cache\CacheStatus;
class CacheStatusTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(4, \count(CacheStatus::getConstants()));
self::assertEquals(0, CacheStatus::OK);
diff --git a/tests/DataStorage/Cache/CacheTypeTest.php b/tests/DataStorage/Cache/CacheTypeTest.php
index 219c9bd46..a70725f0d 100644
--- a/tests/DataStorage/Cache/CacheTypeTest.php
+++ b/tests/DataStorage/Cache/CacheTypeTest.php
@@ -17,7 +17,7 @@ use phpOMS\DataStorage\Cache\CacheType;
class CacheTypeTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(4, \count(CacheType::getConstants()));
self::assertEquals('file', CacheType::FILE);
diff --git a/tests/DataStorage/Cache/Connection/CacheValueTypeTest.php b/tests/DataStorage/Cache/Connection/CacheValueTypeTest.php
index b70d33891..3db968f3e 100644
--- a/tests/DataStorage/Cache/Connection/CacheValueTypeTest.php
+++ b/tests/DataStorage/Cache/Connection/CacheValueTypeTest.php
@@ -17,7 +17,7 @@ use phpOMS\DataStorage\Cache\Connection\CacheValueType;
class CacheValueTypeTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(8, \count(CacheValueType::getConstants()));
self::assertEquals(0, CacheValueType::_INT);
diff --git a/tests/DataStorage/Cache/Connection/ConnectionFactoryTest.php b/tests/DataStorage/Cache/Connection/ConnectionFactoryTest.php
index e0b18fbc5..7f83487ae 100644
--- a/tests/DataStorage/Cache/Connection/ConnectionFactoryTest.php
+++ b/tests/DataStorage/Cache/Connection/ConnectionFactoryTest.php
@@ -18,7 +18,7 @@ use phpOMS\DataStorage\Cache\Connection\ConnectionFactory;
class ConnectionFactoryTest extends \PHPUnit\Framework\TestCase
{
- public function testCreateFileCache()
+ public function testCreateFileCache() : void
{
self::assertInstanceOf(
\phpOMS\DataStorage\Cache\Connection\FileCache::class,
@@ -26,7 +26,7 @@ class ConnectionFactoryTest extends \PHPUnit\Framework\TestCase
);
}
- public function testCreateMemCached()
+ public function testCreateMemCached() : void
{
if (!extension_loaded('memcached')) {
$this->markTestSkipped(
@@ -40,7 +40,7 @@ class ConnectionFactoryTest extends \PHPUnit\Framework\TestCase
);
}
- public function testCreateRedisCache()
+ public function testCreateRedisCache() : void
{
if (!extension_loaded('redis')) {
$this->markTestSkipped(
@@ -57,7 +57,7 @@ class ConnectionFactoryTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidCacheType()
+ public function testInvalidCacheType() : void
{
ConnectionFactory::create(['type' => 'invalid', 'path' => 'Cache']);
}
diff --git a/tests/DataStorage/Cache/Connection/FileCacheJsonSerializable.php b/tests/DataStorage/Cache/Connection/FileCacheJsonSerializable.php
index aa2ccd209..ccb7fb7a2 100644
--- a/tests/DataStorage/Cache/Connection/FileCacheJsonSerializable.php
+++ b/tests/DataStorage/Cache/Connection/FileCacheJsonSerializable.php
@@ -22,7 +22,7 @@ class FileCacheJsonSerializable implements \JsonSerializable
return 'abc';
}
- public function unserialize($val)
+ public function unserialize($val) : void
{
$this->val = \json_decode($val, true);
}
diff --git a/tests/DataStorage/Cache/Connection/FileCacheSerializable.php b/tests/DataStorage/Cache/Connection/FileCacheSerializable.php
index ad4b305e4..0d8d6a5f3 100644
--- a/tests/DataStorage/Cache/Connection/FileCacheSerializable.php
+++ b/tests/DataStorage/Cache/Connection/FileCacheSerializable.php
@@ -22,7 +22,7 @@ class FileCacheSerializable implements \Serializable
return 'abc';
}
- public function unserialize($val)
+ public function unserialize($val) : void
{
$this->val = $val;
}
diff --git a/tests/DataStorage/Cache/Connection/FileCacheTest.php b/tests/DataStorage/Cache/Connection/FileCacheTest.php
index 41bfc4992..8762b4c01 100644
--- a/tests/DataStorage/Cache/Connection/FileCacheTest.php
+++ b/tests/DataStorage/Cache/Connection/FileCacheTest.php
@@ -20,7 +20,7 @@ use phpOMS\Utils\TestUtils;
class FileCacheTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
if (\file_exists(__DIR__ . '/Cache')) {
\rmdir(__DIR__ . '/Cache');
@@ -40,7 +40,7 @@ class FileCacheTest extends \PHPUnit\Framework\TestCase
}
}
- public function testConnect()
+ public function testConnect() : void
{
if (\file_exists(__DIR__ . '/Cache')) {
\rmdir(__DIR__ . '/Cache');
@@ -55,7 +55,7 @@ class FileCacheTest extends \PHPUnit\Framework\TestCase
}
}
- public function testGetSet()
+ public function testGetSet() : void
{
if (\file_exists(__DIR__ . '/Cache')) {
\rmdir(__DIR__ . '/Cache');
@@ -127,7 +127,7 @@ class FileCacheTest extends \PHPUnit\Framework\TestCase
}
}
- public function testExpire()
+ public function testExpire() : void
{
if (\file_exists(__DIR__ . '/Cache')) {
\rmdir(__DIR__ . '/Cache');
@@ -170,7 +170,7 @@ class FileCacheTest extends \PHPUnit\Framework\TestCase
}
}
- public function testBadCacheStatus()
+ public function testBadCacheStatus() : void
{
if (\file_exists(__DIR__ . '/Cache')) {
\rmdir(__DIR__ . '/Cache');
@@ -198,7 +198,7 @@ class FileCacheTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\DataStorage\Cache\Exception\InvalidConnectionConfigException
*/
- public function testInvalidCachePath()
+ public function testInvalidCachePath() : void
{
$cache = new FileCache('/etc/invalidPathOrPermission^$:?><');
}
diff --git a/tests/DataStorage/Cache/Connection/MemCachedTest.php b/tests/DataStorage/Cache/Connection/MemCachedTest.php
index cbb889254..a4e29d894 100644
--- a/tests/DataStorage/Cache/Connection/MemCachedTest.php
+++ b/tests/DataStorage/Cache/Connection/MemCachedTest.php
@@ -20,7 +20,7 @@ use phpOMS\Utils\TestUtils;
class MemCachedTest extends \PHPUnit\Framework\TestCase
{
- protected function setUp()
+ protected function setUp() : void
{
if (!extension_loaded('memcached')) {
$this->markTestSkipped(
@@ -29,7 +29,7 @@ class MemCachedTest extends \PHPUnit\Framework\TestCase
}
}
- public function testDefault()
+ public function testDefault() : void
{
$cache = new MemCached($GLOBALS['CONFIG']['cache']['memcached']);
@@ -40,7 +40,7 @@ class MemCachedTest extends \PHPUnit\Framework\TestCase
self::assertEquals(null, $cache->get('test'));
}
- public function testConnect()
+ public function testConnect() : void
{
$cache = new MemCached($GLOBALS['CONFIG']['cache']['memcached']);
@@ -49,7 +49,7 @@ class MemCachedTest extends \PHPUnit\Framework\TestCase
self::assertEquals((int) $GLOBALS['CONFIG']['cache']['memcached']['port'], $cache->getPort());
}
- public function testGetSet()
+ public function testGetSet() : void
{
$cache = new MemCached($GLOBALS['CONFIG']['cache']['memcached']);
@@ -108,7 +108,7 @@ class MemCachedTest extends \PHPUnit\Framework\TestCase
);
}
- public function testBadCacheStatus()
+ public function testBadCacheStatus() : void
{
$cache = new MemCached($GLOBALS['CONFIG']['cache']['memcached']);
$cache->flushAll();
@@ -128,7 +128,7 @@ class MemCachedTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\DataStorage\Cache\Exception\InvalidConnectionConfigException
*/
- public function testInvalidCacheHost()
+ public function testInvalidCacheHost() : void
{
$db = $GLOBALS['CONFIG']['cache']['memcached'];
unset($db['host']);
@@ -139,7 +139,7 @@ class MemCachedTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\DataStorage\Cache\Exception\InvalidConnectionConfigException
*/
- public function testInvalidCachePort()
+ public function testInvalidCachePort() : void
{
$db = $GLOBALS['CONFIG']['cache']['memcached'];
unset($db['port']);
diff --git a/tests/DataStorage/Cache/Connection/NullCacheTest.php b/tests/DataStorage/Cache/Connection/NullCacheTest.php
index 7d31fb764..72eb5c5d7 100644
--- a/tests/DataStorage/Cache/Connection/NullCacheTest.php
+++ b/tests/DataStorage/Cache/Connection/NullCacheTest.php
@@ -18,7 +18,7 @@ use phpOMS\DataStorage\Cache\Connection\NullCache;
class NullCacheTest extends \PHPUnit\Framework\TestCase
{
- public function testCache()
+ public function testCache() : void
{
$cache = new NullCache();
$cache->connect([]);
diff --git a/tests/DataStorage/Cache/Connection/RedisCacheTest.php b/tests/DataStorage/Cache/Connection/RedisCacheTest.php
index c0b03f796..a1f481fd1 100644
--- a/tests/DataStorage/Cache/Connection/RedisCacheTest.php
+++ b/tests/DataStorage/Cache/Connection/RedisCacheTest.php
@@ -20,7 +20,7 @@ use phpOMS\Utils\TestUtils;
class RedisCacheTest extends \PHPUnit\Framework\TestCase
{
- protected function setUp()
+ protected function setUp() : void
{
if (!extension_loaded('redis')) {
$this->markTestSkipped(
@@ -29,7 +29,7 @@ class RedisCacheTest extends \PHPUnit\Framework\TestCase
}
}
- public function testDefault()
+ public function testDefault() : void
{
$cache = new RedisCache($GLOBALS['CONFIG']['cache']['redis']);
@@ -41,7 +41,7 @@ class RedisCacheTest extends \PHPUnit\Framework\TestCase
self::assertEquals(null, $cache->get('test'));
}
- public function testConnect()
+ public function testConnect() : void
{
$cache = new RedisCache($GLOBALS['CONFIG']['cache']['redis']);
@@ -51,7 +51,7 @@ class RedisCacheTest extends \PHPUnit\Framework\TestCase
self::assertEquals((int) $GLOBALS['CONFIG']['cache']['redis']['port'], $cache->getPort());
}
- public function testGetSet()
+ public function testGetSet() : void
{
$cache = new RedisCache($GLOBALS['CONFIG']['cache']['redis']);
@@ -110,7 +110,7 @@ class RedisCacheTest extends \PHPUnit\Framework\TestCase
);
}
- public function testBadCacheStatus()
+ public function testBadCacheStatus() : void
{
$cache = new RedisCache($GLOBALS['CONFIG']['cache']['redis']);
$cache->flushAll();
@@ -130,7 +130,7 @@ class RedisCacheTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\DataStorage\Cache\Exception\InvalidConnectionConfigException
*/
- public function testInvalidCacheHost()
+ public function testInvalidCacheHost() : void
{
$db = $GLOBALS['CONFIG']['cache']['redis'];
unset($db['host']);
@@ -141,7 +141,7 @@ class RedisCacheTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\DataStorage\Cache\Exception\InvalidConnectionConfigException
*/
- public function testInvalidCachePort()
+ public function testInvalidCachePort() : void
{
$db = $GLOBALS['CONFIG']['cache']['redis'];
unset($db['port']);
@@ -152,7 +152,7 @@ class RedisCacheTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\DataStorage\Cache\Exception\InvalidConnectionConfigException
*/
- public function testInvalidCacheDatabase()
+ public function testInvalidCacheDatabase() : void
{
$db = $GLOBALS['CONFIG']['cache']['redis'];
unset($db['db']);
diff --git a/tests/DataStorage/Cache/Exception/InvalidConnectionConfigExceptionTest.php b/tests/DataStorage/Cache/Exception/InvalidConnectionConfigExceptionTest.php
index 36ead6da9..6cf4b9461 100644
--- a/tests/DataStorage/Cache/Exception/InvalidConnectionConfigExceptionTest.php
+++ b/tests/DataStorage/Cache/Exception/InvalidConnectionConfigExceptionTest.php
@@ -17,7 +17,7 @@ use phpOMS\DataStorage\Cache\Exception\InvalidConnectionConfigException;
class InvalidConnectionConfigExceptionTest extends \PHPUnit\Framework\TestCase
{
- public function testException()
+ public function testException() : void
{
self::assertInstanceOf(\InvalidArgumentException::class, new InvalidConnectionConfigException(''));
}
diff --git a/tests/DataStorage/Cookie/CookieJarTest.php b/tests/DataStorage/Cookie/CookieJarTest.php
index 7e6a0807a..5da5b0624 100644
--- a/tests/DataStorage/Cookie/CookieJarTest.php
+++ b/tests/DataStorage/Cookie/CookieJarTest.php
@@ -17,7 +17,7 @@ use phpOMS\DataStorage\Cookie\CookieJar;
class CookieJarTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
$jar = new CookieJar();
@@ -26,7 +26,7 @@ class CookieJarTest extends \PHPUnit\Framework\TestCase
self::assertFalse($jar->delete('asd'));
}
- public function testCookie()
+ public function testCookie() : void
{
$jar = new CookieJar();
@@ -46,7 +46,7 @@ class CookieJarTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\DataStorage\LockException
*/
- public function testDeleteLocked()
+ public function testDeleteLocked() : void
{
$jar = new CookieJar();
self::assertTrue($jar->set('test', 'value'));
@@ -58,7 +58,7 @@ class CookieJarTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\DataStorage\LockException
*/
- public function testSaveLocked()
+ public function testSaveLocked() : void
{
CookieJar::lock();
diff --git a/tests/DataStorage/Database/Connection/ConnectionFactoryTest.php b/tests/DataStorage/Database/Connection/ConnectionFactoryTest.php
index 49c341fda..c77844eaa 100644
--- a/tests/DataStorage/Database/Connection/ConnectionFactoryTest.php
+++ b/tests/DataStorage/Database/Connection/ConnectionFactoryTest.php
@@ -21,7 +21,7 @@ use phpOMS\DataStorage\Database\Connection\SqlServerConnection;
class ConnectionFactoryTest extends \PHPUnit\Framework\TestCase
{
- public function testCreateMysql()
+ public function testCreateMysql() : void
{
if (!extension_loaded('pdo_mysql')) {
$this->markTestSkipped(
@@ -37,7 +37,7 @@ class ConnectionFactoryTest extends \PHPUnit\Framework\TestCase
);
}
- public function testCreatePostgres()
+ public function testCreatePostgres() : void
{
if (!extension_loaded('pdo_pgsql')) {
$this->markTestSkipped(
@@ -53,7 +53,7 @@ class ConnectionFactoryTest extends \PHPUnit\Framework\TestCase
);
}
- public function testCreateSqlsrv()
+ public function testCreateSqlsrv() : void
{
if (!extension_loaded('pdo_sqlsrv')) {
$this->markTestSkipped(
@@ -69,7 +69,7 @@ class ConnectionFactoryTest extends \PHPUnit\Framework\TestCase
);
}
- public function testCreateSqlite()
+ public function testCreateSqlite() : void
{
if (!extension_loaded('pdo_sqlite')) {
$this->markTestSkipped(
@@ -88,7 +88,7 @@ class ConnectionFactoryTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidDatabaseType()
+ public function testInvalidDatabaseType() : void
{
ConnectionFactory::create(['db' => 'invalid']);
}
diff --git a/tests/DataStorage/Database/Connection/MysqlConnectionTest.php b/tests/DataStorage/Database/Connection/MysqlConnectionTest.php
index 272246cb2..7ffda1766 100644
--- a/tests/DataStorage/Database/Connection/MysqlConnectionTest.php
+++ b/tests/DataStorage/Database/Connection/MysqlConnectionTest.php
@@ -18,7 +18,7 @@ use phpOMS\DataStorage\Database\DatabaseStatus;
class MysqlConnectionTest extends \PHPUnit\Framework\TestCase
{
- protected function setUp()
+ protected function setUp() : void
{
if (!extension_loaded('pdo_mysql')) {
$this->markTestSkipped(
@@ -27,7 +27,7 @@ class MysqlConnectionTest extends \PHPUnit\Framework\TestCase
}
}
- public function testConnect()
+ public function testConnect() : void
{
$mysql = new MysqlConnection($GLOBALS['CONFIG']['db']['core']['masters']['admin']);
@@ -41,7 +41,7 @@ class MysqlConnectionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\DataStorage\Database\Exception\InvalidConnectionConfigException
*/
- public function testInvalidDatabaseType()
+ public function testInvalidDatabaseType() : void
{
$db = $GLOBALS['CONFIG']['db']['core']['masters']['admin'];
unset($db['db']);
@@ -52,7 +52,7 @@ class MysqlConnectionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\DataStorage\Database\Exception\InvalidConnectionConfigException
*/
- public function testInvalidHost()
+ public function testInvalidHost() : void
{
$db = $GLOBALS['CONFIG']['db']['core']['masters']['admin'];
unset($db['host']);
@@ -63,7 +63,7 @@ class MysqlConnectionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\DataStorage\Database\Exception\InvalidConnectionConfigException
*/
- public function testInvalidPort()
+ public function testInvalidPort() : void
{
$db = $GLOBALS['CONFIG']['db']['core']['masters']['admin'];
unset($db['port']);
@@ -74,7 +74,7 @@ class MysqlConnectionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\DataStorage\Database\Exception\InvalidConnectionConfigException
*/
- public function testInvalidDatabase()
+ public function testInvalidDatabase() : void
{
$db = $GLOBALS['CONFIG']['db']['core']['masters']['admin'];
unset($db['database']);
@@ -85,7 +85,7 @@ class MysqlConnectionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\DataStorage\Database\Exception\InvalidConnectionConfigException
*/
- public function testInvalidLogin()
+ public function testInvalidLogin() : void
{
$db = $GLOBALS['CONFIG']['db']['core']['masters']['admin'];
unset($db['login']);
@@ -96,7 +96,7 @@ class MysqlConnectionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\DataStorage\Database\Exception\InvalidConnectionConfigException
*/
- public function testInvalidPassword()
+ public function testInvalidPassword() : void
{
$db = $GLOBALS['CONFIG']['db']['core']['masters']['admin'];
unset($db['password']);
@@ -107,7 +107,7 @@ class MysqlConnectionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\DataStorage\Database\Exception\InvalidConnectionConfigException
*/
- public function testInvalidDatabaseTypeName()
+ public function testInvalidDatabaseTypeName() : void
{
$db = $GLOBALS['CONFIG']['db']['core']['masters']['admin'];
$db['db'] = 'invalid';
@@ -118,7 +118,7 @@ class MysqlConnectionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\DataStorage\Database\Exception\InvalidConnectionConfigException
*/
- public function testInvalidDatabaseName()
+ public function testInvalidDatabaseName() : void
{
$db = $GLOBALS['CONFIG']['db']['core']['masters']['admin'];
$db['database'] = 'invalid';
diff --git a/tests/DataStorage/Database/Connection/NullConnectionTest.php b/tests/DataStorage/Database/Connection/NullConnectionTest.php
index c2bb9d36c..f58e83c91 100644
--- a/tests/DataStorage/Database/Connection/NullConnectionTest.php
+++ b/tests/DataStorage/Database/Connection/NullConnectionTest.php
@@ -18,7 +18,7 @@ use phpOMS\DataStorage\Database\DatabaseType;
class NullConnectionTest extends \PHPUnit\Framework\TestCase
{
- public function testConnect()
+ public function testConnect() : void
{
$null = new NullConnection([]);
$null->connect();
diff --git a/tests/DataStorage/Database/Connection/PostgresConnectionTest.php b/tests/DataStorage/Database/Connection/PostgresConnectionTest.php
index 88746a66a..aee2a60ab 100644
--- a/tests/DataStorage/Database/Connection/PostgresConnectionTest.php
+++ b/tests/DataStorage/Database/Connection/PostgresConnectionTest.php
@@ -17,7 +17,7 @@ use phpOMS\DataStorage\Database\DatabaseStatus;
class PostgresConnectionTest extends \PHPUnit\Framework\TestCase
{
- protected function setUp()
+ protected function setUp() : void
{
if (!extension_loaded('pdo_pgsql')) {
$this->markTestSkipped(
@@ -26,7 +26,7 @@ class PostgresConnectionTest extends \PHPUnit\Framework\TestCase
}
}
- public function testConnect()
+ public function testConnect() : void
{
$psql = new PostgresConnection($GLOBALS['CONFIG']['db']['core']['postgresql']['admin']);
self::assertEquals(DatabaseStatus::OK, $psql->getStatus());
@@ -39,7 +39,7 @@ class PostgresConnectionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\DataStorage\Database\Exception\InvalidConnectionConfigException
*/
- public function testInvalidDatabaseType()
+ public function testInvalidDatabaseType() : void
{
$db = $GLOBALS['CONFIG']['db']['core']['postgresql']['admin'];
unset($db['db']);
@@ -49,7 +49,7 @@ class PostgresConnectionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\DataStorage\Database\Exception\InvalidConnectionConfigException
*/
- public function testInvalidHost()
+ public function testInvalidHost() : void
{
$db = $GLOBALS['CONFIG']['db']['core']['postgresql']['admin'];
unset($db['host']);
@@ -59,7 +59,7 @@ class PostgresConnectionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\DataStorage\Database\Exception\InvalidConnectionConfigException
*/
- public function testInvalidPort()
+ public function testInvalidPort() : void
{
$db = $GLOBALS['CONFIG']['db']['core']['postgresql']['admin'];
unset($db['port']);
@@ -69,7 +69,7 @@ class PostgresConnectionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\DataStorage\Database\Exception\InvalidConnectionConfigException
*/
- public function testInvalidDatabase()
+ public function testInvalidDatabase() : void
{
$db = $GLOBALS['CONFIG']['db']['core']['postgresql']['admin'];
unset($db['database']);
@@ -79,7 +79,7 @@ class PostgresConnectionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\DataStorage\Database\Exception\InvalidConnectionConfigException
*/
- public function testInvalidLogin()
+ public function testInvalidLogin() : void
{
$db = $GLOBALS['CONFIG']['db']['core']['postgresql']['admin'];
unset($db['login']);
@@ -89,7 +89,7 @@ class PostgresConnectionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\DataStorage\Database\Exception\InvalidConnectionConfigException
*/
- public function testInvalidPassword()
+ public function testInvalidPassword() : void
{
$db = $GLOBALS['CONFIG']['db']['core']['postgresql']['admin'];
unset($db['password']);
@@ -99,7 +99,7 @@ class PostgresConnectionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\DataStorage\Database\Exception\InvalidConnectionConfigException
*/
- public function testInvalidDatabaseTypeName()
+ public function testInvalidDatabaseTypeName() : void
{
$db = $GLOBALS['CONFIG']['db']['core']['postgresql']['admin'];
$db['db'] = 'invalid';
@@ -109,7 +109,7 @@ class PostgresConnectionTest extends \PHPUnit\Framework\TestCase
/**
* todo: apparently this doesn't throw an exception in postgresql?!
*/
- public function testInvalidDatabaseName()
+ public function testInvalidDatabaseName() : void
{
$db = $GLOBALS['CONFIG']['db']['core']['postgresql']['admin'];
$db['database'] = 'invalid';
diff --git a/tests/DataStorage/Database/Connection/SQLiteConnectionTest.php b/tests/DataStorage/Database/Connection/SQLiteConnectionTest.php
index 107e18e75..aa3028b52 100644
--- a/tests/DataStorage/Database/Connection/SQLiteConnectionTest.php
+++ b/tests/DataStorage/Database/Connection/SQLiteConnectionTest.php
@@ -17,7 +17,7 @@ use phpOMS\DataStorage\Database\DatabaseStatus;
class SQLiteConnectionTest extends \PHPUnit\Framework\TestCase
{
- protected function setUp()
+ protected function setUp() : void
{
if (!extension_loaded('pdo_sqlite')) {
$this->markTestSkipped(
@@ -26,7 +26,7 @@ class SQLiteConnectionTest extends \PHPUnit\Framework\TestCase
}
}
- public function testConnect()
+ public function testConnect() : void
{
$sqlite = new SQLiteConnection($GLOBALS['CONFIG']['db']['core']['sqlite']['admin']);
self::assertEquals(DatabaseStatus::OK, $sqlite->getStatus());
@@ -37,7 +37,7 @@ class SQLiteConnectionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\DataStorage\Database\Exception\InvalidConnectionConfigException
*/
- public function testInvalidDatabaseType()
+ public function testInvalidDatabaseType() : void
{
$db = $GLOBALS['CONFIG']['db']['core']['sqlite']['admin'];
unset($db['db']);
@@ -47,14 +47,14 @@ class SQLiteConnectionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\DataStorage\Database\Exception\InvalidConnectionConfigException
*/
- public function testInvalidDatabase()
+ public function testInvalidDatabase() : void
{
$db = $GLOBALS['CONFIG']['db']['core']['sqlite']['admin'];
unset($db['database']);
$sqlite = new SQLiteConnection($db);
}
- static function tearDownAfterClass()
+ public static function tearDownAfterClass() : void
{
if (\file_exists($GLOBALS['CONFIG']['db']['core']['sqlite']['admin']['database'])) {
\unlink($GLOBALS['CONFIG']['db']['core']['sqlite']['admin']['database']);
diff --git a/tests/DataStorage/Database/Connection/SqlServerConnectionTest.php b/tests/DataStorage/Database/Connection/SqlServerConnectionTest.php
index 7b12ad662..51880c0bb 100644
--- a/tests/DataStorage/Database/Connection/SqlServerConnectionTest.php
+++ b/tests/DataStorage/Database/Connection/SqlServerConnectionTest.php
@@ -17,7 +17,7 @@ use phpOMS\DataStorage\Database\Connection\SqlServerConnection;
class SqlServerConnectionTest extends \PHPUnit\Framework\TestCase
{
- protected function setUp()
+ protected function setUp() : void
{
if (!extension_loaded('pdo_sqlsrv')) {
$this->markTestSkipped(
@@ -26,7 +26,7 @@ class SqlServerConnectionTest extends \PHPUnit\Framework\TestCase
}
}
- public function testConnect()
+ public function testConnect() : void
{
$psql = new SqlServerConnection($GLOBALS['CONFIG']['db']['core']['mssql']['admin']);
self::assertEquals(DatabaseStatus::OK, $psql->getStatus());
@@ -39,7 +39,7 @@ class SqlServerConnectionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\DataStorage\Database\Exception\InvalidConnectionConfigException
*/
- public function testInvalidDatabaseType()
+ public function testInvalidDatabaseType() : void
{
$db = $GLOBALS['CONFIG']['db']['core']['mssql']['admin'];
unset($db['db']);
@@ -49,7 +49,7 @@ class SqlServerConnectionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\DataStorage\Database\Exception\InvalidConnectionConfigException
*/
- public function testInvalidHost()
+ public function testInvalidHost() : void
{
$db = $GLOBALS['CONFIG']['db']['core']['mssql']['admin'];
unset($db['host']);
@@ -59,7 +59,7 @@ class SqlServerConnectionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\DataStorage\Database\Exception\InvalidConnectionConfigException
*/
- public function testInvalidPort()
+ public function testInvalidPort() : void
{
$db = $GLOBALS['CONFIG']['db']['core']['mssql']['admin'];
unset($db['port']);
@@ -69,7 +69,7 @@ class SqlServerConnectionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\DataStorage\Database\Exception\InvalidConnectionConfigException
*/
- public function testInvalidDatabase()
+ public function testInvalidDatabase() : void
{
$db = $GLOBALS['CONFIG']['db']['core']['mssql']['admin'];
unset($db['database']);
@@ -79,7 +79,7 @@ class SqlServerConnectionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\DataStorage\Database\Exception\InvalidConnectionConfigException
*/
- public function testInvalidLogin()
+ public function testInvalidLogin() : void
{
$db = $GLOBALS['CONFIG']['db']['core']['mssql']['admin'];
unset($db['login']);
@@ -89,7 +89,7 @@ class SqlServerConnectionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\DataStorage\Database\Exception\InvalidConnectionConfigException
*/
- public function testInvalidPassword()
+ public function testInvalidPassword() : void
{
$db = $GLOBALS['CONFIG']['db']['core']['mssql']['admin'];
unset($db['password']);
@@ -99,7 +99,7 @@ class SqlServerConnectionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\DataStorage\Database\Exception\InvalidConnectionConfigException
*/
- public function testInvalidDatabaseTypeName()
+ public function testInvalidDatabaseTypeName() : void
{
$db = $GLOBALS['CONFIG']['db']['core']['mssql']['admin'];
$db['db'] = 'invalid';
@@ -109,7 +109,7 @@ class SqlServerConnectionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\DataStorage\Database\Exception\InvalidConnectionConfigException
*/
- public function testInvalidDatabaseName()
+ public function testInvalidDatabaseName() : void
{
$db = $GLOBALS['CONFIG']['db']['core']['mssql']['admin'];
$db['database'] = 'invalid';
diff --git a/tests/DataStorage/Database/DataMapperAbstractTest.php b/tests/DataStorage/Database/DataMapperAbstractTest.php
index 280479f30..489cec177 100644
--- a/tests/DataStorage/Database/DataMapperAbstractTest.php
+++ b/tests/DataStorage/Database/DataMapperAbstractTest.php
@@ -23,7 +23,7 @@ class DataMapperAbstractTest extends \PHPUnit\Framework\TestCase
protected $model = null;
protected $modelArray = null;
- protected function setUp()
+ protected function setUp() : void
{
$this->model = new BaseModel();
$this->modelArray = [
@@ -133,7 +133,7 @@ class DataMapperAbstractTest extends \PHPUnit\Framework\TestCase
)->execute();
}
- protected function tearDown()
+ protected function tearDown() : void
{
$GLOBALS['dbpool']->get()->con->prepare('DROP TABLE oms_test_base')->execute();
$GLOBALS['dbpool']->get()->con->prepare('DROP TABLE oms_test_belongs_to_one')->execute();
@@ -143,26 +143,26 @@ class DataMapperAbstractTest extends \PHPUnit\Framework\TestCase
$GLOBALS['dbpool']->get()->con->prepare('DROP TABLE oms_test_has_many_rel_relations')->execute();
}
- public function testDefault()
+ public function testDefault() : void
{
self::assertEquals('test_base_id', BaseModelMapper::getPrimaryField());
self::assertEquals('test_base', BaseModelMapper::getTable());
self::assertEquals('test_base_datetime', BaseModelMapper::getCreatedAt());
}
- public function testCreate()
+ public function testCreate() : void
{
self::assertGreaterThan(0, BaseModelMapper::create($this->model));
self::assertGreaterThan(0, $this->model->id);
}
- public function testCreateArray()
+ public function testCreateArray() : void
{
self::assertGreaterThan(0, BaseModelMapper::createArray($this->modelArray));
self::assertGreaterThan(0, $this->modelArray['id']);
}
- public function testRead()
+ public function testRead() : void
{
$id = BaseModelMapper::create($this->model);
$modelR = BaseModelMapper::get($id);
@@ -193,7 +193,7 @@ class DataMapperAbstractTest extends \PHPUnit\Framework\TestCase
self::assertEquals(1, count(BaseModelMapper::getAll()));
}
- public function testReadArray()
+ public function testReadArray() : void
{
$id = BaseModelMapper::createArray($this->modelArray);
$modelR = BaseModelMapper::getArray($id);
@@ -219,7 +219,7 @@ class DataMapperAbstractTest extends \PHPUnit\Framework\TestCase
self::assertEquals(1, count(BaseModelMapper::getAllArray()));
}
- public function testUpdate()
+ public function testUpdate() : void
{
$id = BaseModelMapper::create($this->model);
$modelR = BaseModelMapper::get($id);
@@ -244,7 +244,7 @@ class DataMapperAbstractTest extends \PHPUnit\Framework\TestCase
// todo test update relations
}
- public function testUpdateArray()
+ public function testUpdateArray() : void
{
$id = BaseModelMapper::createArray($this->modelArray);
$modelR = BaseModelMapper::getArray($id);
@@ -269,7 +269,7 @@ class DataMapperAbstractTest extends \PHPUnit\Framework\TestCase
// todo test update relations
}
- public function testDelete()
+ public function testDelete() : void
{
$id = BaseModelMapper::create($this->model);
BaseModelMapper::delete($this->model);
diff --git a/tests/DataStorage/Database/DatabaseExceptionFactoryTest.php b/tests/DataStorage/Database/DatabaseExceptionFactoryTest.php
index 69a24397b..83798f0eb 100644
--- a/tests/DataStorage/Database/DatabaseExceptionFactoryTest.php
+++ b/tests/DataStorage/Database/DatabaseExceptionFactoryTest.php
@@ -17,12 +17,12 @@ use phpOMS\DataStorage\Database\DatabaseExceptionFactory;
class DatabaseExceptionFactoryTest extends \PHPUnit\Framework\TestCase
{
- public function testException()
+ public function testException() : void
{
self::assertEquals('\PDOException', DatabaseExceptionFactory::createException(new \PDOException()));
}
- public function testExceptionMessage()
+ public function testExceptionMessage() : void
{
self::assertEquals('', DatabaseExceptionFactory::createExceptionMessage(new \PDOException()));
}
diff --git a/tests/DataStorage/Database/DatabasePoolTest.php b/tests/DataStorage/Database/DatabasePoolTest.php
index f96fa9eec..6f9177d8e 100644
--- a/tests/DataStorage/Database/DatabasePoolTest.php
+++ b/tests/DataStorage/Database/DatabasePoolTest.php
@@ -19,7 +19,7 @@ use phpOMS\DataStorage\Database\DatabaseStatus;
class DatabasePoolTest extends \PHPUnit\Framework\TestCase
{
- public function testBasicConnection()
+ public function testBasicConnection() : void
{
$dbPool = new DatabasePool();
/** @var array $CONFIG */
@@ -28,7 +28,7 @@ class DatabasePoolTest extends \PHPUnit\Framework\TestCase
self::assertEquals($dbPool->get()->getStatus(), DatabaseStatus::OK);
}
- public function testGetSet()
+ public function testGetSet() : void
{
$dbPool = new DatabasePool();
/** @var array $CONFIG */
diff --git a/tests/DataStorage/Database/DatabaseStatusTest.php b/tests/DataStorage/Database/DatabaseStatusTest.php
index ec1f9e527..cb9821e83 100644
--- a/tests/DataStorage/Database/DatabaseStatusTest.php
+++ b/tests/DataStorage/Database/DatabaseStatusTest.php
@@ -17,7 +17,7 @@ use phpOMS\DataStorage\Database\DatabaseStatus;
class DatabaseStatusTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(6, \count(DatabaseStatus::getConstants()));
self::assertEquals(0, DatabaseStatus::OK);
diff --git a/tests/DataStorage/Database/DatabaseTypeTest.php b/tests/DataStorage/Database/DatabaseTypeTest.php
index 5718a3ca1..266c4d319 100644
--- a/tests/DataStorage/Database/DatabaseTypeTest.php
+++ b/tests/DataStorage/Database/DatabaseTypeTest.php
@@ -17,7 +17,7 @@ use phpOMS\DataStorage\Database\DatabaseType;
class DatabaseTypeTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(5, \count(DatabaseType::getConstants()));
self::assertEquals('mysql', DatabaseType::MYSQL);
diff --git a/tests/DataStorage/Database/Exception/InvalidConnectionConfigExceptionTest.php b/tests/DataStorage/Database/Exception/InvalidConnectionConfigExceptionTest.php
index 8fea0b904..90d095853 100644
--- a/tests/DataStorage/Database/Exception/InvalidConnectionConfigExceptionTest.php
+++ b/tests/DataStorage/Database/Exception/InvalidConnectionConfigExceptionTest.php
@@ -17,7 +17,7 @@ use phpOMS\DataStorage\Database\Exception\InvalidConnectionConfigException;
class InvalidConnectionConfigExceptionTest extends \PHPUnit\Framework\TestCase
{
- public function testException()
+ public function testException() : void
{
self::assertInstanceOf(\InvalidArgumentException::class, new InvalidConnectionConfigException(''));
}
diff --git a/tests/DataStorage/Database/Exception/InvalidDatabaseTypeExceptionTest.php b/tests/DataStorage/Database/Exception/InvalidDatabaseTypeExceptionTest.php
index 3541fdfa2..e1caa7000 100644
--- a/tests/DataStorage/Database/Exception/InvalidDatabaseTypeExceptionTest.php
+++ b/tests/DataStorage/Database/Exception/InvalidDatabaseTypeExceptionTest.php
@@ -17,7 +17,7 @@ use phpOMS\DataStorage\Database\Exception\InvalidDatabaseTypeException;
class InvalidDatabaseTypeExceptionTest extends \PHPUnit\Framework\TestCase
{
- public function testException()
+ public function testException() : void
{
self::assertInstanceOf(\InvalidArgumentException::class, new InvalidDatabaseTypeException(''));
}
diff --git a/tests/DataStorage/Database/Exception/InvalidMapperExceptionTest.php b/tests/DataStorage/Database/Exception/InvalidMapperExceptionTest.php
index dc1f00d62..96cd87177 100644
--- a/tests/DataStorage/Database/Exception/InvalidMapperExceptionTest.php
+++ b/tests/DataStorage/Database/Exception/InvalidMapperExceptionTest.php
@@ -17,7 +17,7 @@ use phpOMS\DataStorage\Database\Exception\InvalidMapperException;
class InvalidMapperExceptionTest extends \PHPUnit\Framework\TestCase
{
- public function testException()
+ public function testException() : void
{
self::assertInstanceOf(\RuntimeException::class, new InvalidMapperException(''));
}
diff --git a/tests/DataStorage/Database/Query/BuilderTest.php b/tests/DataStorage/Database/Query/BuilderTest.php
index ae331c3c3..e7f269231 100644
--- a/tests/DataStorage/Database/Query/BuilderTest.php
+++ b/tests/DataStorage/Database/Query/BuilderTest.php
@@ -20,12 +20,12 @@ class BuilderTest extends \PHPUnit\Framework\TestCase
{
protected $con = null;
- protected function setUp()
+ protected function setUp() : void
{
$this->con = new MysqlConnection($GLOBALS['CONFIG']['db']['core']['masters']['admin']);
}
- public function testMysqlSelect()
+ public function testMysqlSelect() : void
{
$query = new Builder($this->con);
$sql = 'SELECT `a`.`test` FROM `a` WHERE `a`.`test` = 1;';
@@ -74,7 +74,7 @@ class BuilderTest extends \PHPUnit\Framework\TestCase
);
}
- public function testMysqlOrder()
+ public function testMysqlOrder() : void
{
$query = new Builder($this->con);
$sql = 'SELECT `a`.`test` FROM `a` WHERE `a`.`test` = 1 ORDER BY `a`.`test` DESC;';
@@ -101,7 +101,7 @@ class BuilderTest extends \PHPUnit\Framework\TestCase
self::assertEquals($sql, $query->select('a.test')->from('a')->where('a.test', '=', 1)->orderBy(['a.test', 'a.test2'], 'ASC')->toSql());
}
- public function testMysqlOffsetLimit()
+ public function testMysqlOffsetLimit() : void
{
$query = new Builder($this->con);
$sql = 'SELECT `a`.`test` FROM `a` WHERE `a`.`test` = 1 LIMIT 3;';
@@ -112,7 +112,7 @@ class BuilderTest extends \PHPUnit\Framework\TestCase
self::assertEquals($sql, $query->select('a.test')->from('a')->where('a.test', '=', 1)->offset(3)->toSql());
}
- public function testMysqlGroup()
+ public function testMysqlGroup() : void
{
$query = new Builder($this->con);
$sql = 'SELECT `a`.`test` FROM `a` WHERE `a`.`test` = 1 GROUP BY `a`;';
@@ -130,7 +130,7 @@ class BuilderTest extends \PHPUnit\Framework\TestCase
self::assertEquals($sql, $query->select('a.test')->from('a')->where('a.test', '=', ':test')->groupBy('a', 'b')->toSql());
}
- public function testMysqlWheres()
+ public function testMysqlWheres() : void
{
$query = new Builder($this->con);
$sql = 'SELECT `a`.`test` FROM `a` WHERE `a`.`test` = 1;';
@@ -189,7 +189,7 @@ class BuilderTest extends \PHPUnit\Framework\TestCase
self::assertEquals($sql, $query->select('a.test')->from('a')->where('a.test', '=', ':testWhere')->whereIn('a.test2', ['a', ':bValue', 'c'], 'or')->toSql());
}
- public function testMysqlJoins()
+ public function testMysqlJoins() : void
{
$query = new Builder($this->con);
$sql = 'SELECT `a`.`test` FROM `a` JOIN `b` ON `a`.`id` = `b`.`id` WHERE `a`.`test` = 1;';
@@ -248,7 +248,7 @@ class BuilderTest extends \PHPUnit\Framework\TestCase
self::assertEquals($sql, $query->select('a.test')->from('a')->fullOuterJoin('b')->on('a.id', '=', 'b.id')->where('a.test', '=', 1)->toSql());
}
- public function testMysqlInsert()
+ public function testMysqlInsert() : void
{
$query = new Builder($this->con);
$sql = 'INSERT INTO `a` VALUES (1, \'test\');';
@@ -272,7 +272,7 @@ class BuilderTest extends \PHPUnit\Framework\TestCase
self::assertEquals($sql, $query->insert('test', 'test2')->into('a')->values(':test', ':test2')->toSql());
}
- public function testMysqlDelete()
+ public function testMysqlDelete() : void
{
$query = new Builder($this->con);
$sql = 'DELETE FROM `a` WHERE `a`.`test` = 1;';
@@ -283,7 +283,7 @@ class BuilderTest extends \PHPUnit\Framework\TestCase
self::assertEquals($sql, $query->delete()->from('a')->where('a.test', '=', ':testVal')->toSql());
}
- public function testMysqlUpdate()
+ public function testMysqlUpdate() : void
{
$query = new Builder($this->con);
$sql = 'UPDATE `a` SET `a`.`test` = 1, `a`.`test2` = 2 WHERE `a`.`test` = 1;';
@@ -298,7 +298,7 @@ class BuilderTest extends \PHPUnit\Framework\TestCase
self::assertEquals($sql, $query->update('a')->set(['a.test' => 1])->set(['a.test2' => ':test2'])->where('a.test', '=', ':test3')->toSql());
}
- public function testRaw()
+ public function testRaw() : void
{
$query = new Builder($this->con);
self::assertEquals('SELECT test.val FROM test;', $query->raw('SELECT test.val FROM test;')->toSql());
@@ -307,7 +307,7 @@ class BuilderTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \Exception
*/
- public function testReadOnlyRaw()
+ public function testReadOnlyRaw() : void
{
$query = new Builder($this->con, true);
$query->raw('DROP DATABASE oms;');
@@ -316,7 +316,7 @@ class BuilderTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \Exception
*/
- public function testReadOnlyInsert()
+ public function testReadOnlyInsert() : void
{
$query = new Builder($this->con, true);
$query->insert('test');
@@ -325,7 +325,7 @@ class BuilderTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \Exception
*/
- public function testReadOnlyUpdate()
+ public function testReadOnlyUpdate() : void
{
$query = new Builder($this->con, true);
$query->update();
@@ -334,7 +334,7 @@ class BuilderTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \Exception
*/
- public function testReadOnlyDelete()
+ public function testReadOnlyDelete() : void
{
$query = new Builder($this->con, true);
$query->delete();
@@ -343,7 +343,7 @@ class BuilderTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidWhereOperator()
+ public function testInvalidWhereOperator() : void
{
$query = new Builder($this->con, true);
$query->where('a', 'invalid', 'b');
@@ -352,7 +352,7 @@ class BuilderTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidJoinTable()
+ public function testInvalidJoinTable() : void
{
$query = new Builder($this->con, true);
$query->join(null);
@@ -361,7 +361,7 @@ class BuilderTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidJoinOperator()
+ public function testInvalidJoinOperator() : void
{
$query = new Builder($this->con, true);
$query->join('b')->on('a', 'invalid', 'b');
@@ -370,7 +370,7 @@ class BuilderTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidOrOrderType()
+ public function testInvalidOrOrderType() : void
{
$query = new Builder($this->con, true);
$query->orderBy('a', 1);
@@ -379,7 +379,7 @@ class BuilderTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidOrColumnType()
+ public function testInvalidOrColumnType() : void
{
$query = new Builder($this->con, true);
$query->orderBy(null, 'DESC');
diff --git a/tests/DataStorage/Database/Query/ColumnTest.php b/tests/DataStorage/Database/Query/ColumnTest.php
index b440591c7..44c591286 100644
--- a/tests/DataStorage/Database/Query/ColumnTest.php
+++ b/tests/DataStorage/Database/Query/ColumnTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\DataStorage\Database\Query;
class ColumnTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/DataStorage/Database/Query/CountTest.php b/tests/DataStorage/Database/Query/CountTest.php
index 5ab5243fc..6ffae6832 100644
--- a/tests/DataStorage/Database/Query/CountTest.php
+++ b/tests/DataStorage/Database/Query/CountTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\DataStorage\Database\Query;
class CountTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/DataStorage/Database/Query/ExpressionTest.php b/tests/DataStorage/Database/Query/ExpressionTest.php
index d0c583a05..8821475c6 100644
--- a/tests/DataStorage/Database/Query/ExpressionTest.php
+++ b/tests/DataStorage/Database/Query/ExpressionTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\DataStorage\Database\Query;
class ExpressionTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/DataStorage/Database/Query/FromTest.php b/tests/DataStorage/Database/Query/FromTest.php
index 4f0bde7bc..2a38b54b7 100644
--- a/tests/DataStorage/Database/Query/FromTest.php
+++ b/tests/DataStorage/Database/Query/FromTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\DataStorage\Database\Query;
class FromTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/DataStorage/Database/Query/Grammar/GrammarTest.php b/tests/DataStorage/Database/Query/Grammar/GrammarTest.php
index 9dd807299..e4296cd96 100644
--- a/tests/DataStorage/Database/Query/Grammar/GrammarTest.php
+++ b/tests/DataStorage/Database/Query/Grammar/GrammarTest.php
@@ -17,7 +17,7 @@ use phpOMS\DataStorage\Database\Query\Grammar\Grammar;
class GrammarTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
$grammar = new Grammar();
self::assertEquals('Y-m-d H:i:s', $grammar->getDateFormat());
diff --git a/tests/DataStorage/Database/Query/Grammar/MicrosoftGrammarTest.php b/tests/DataStorage/Database/Query/Grammar/MicrosoftGrammarTest.php
index 5eaffa281..c76b59f03 100644
--- a/tests/DataStorage/Database/Query/Grammar/MicrosoftGrammarTest.php
+++ b/tests/DataStorage/Database/Query/Grammar/MicrosoftGrammarTest.php
@@ -17,7 +17,7 @@ use phpOMS\DataStorage\Database\Query\Grammar\MicrosoftGrammar;
class MicrosoftGrammarTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
self::assertInstanceOf('\phpOMS\DataStorage\Database\Query\Grammar\Grammar', new MicrosoftGrammar());
}
diff --git a/tests/DataStorage/Database/Query/Grammar/MysqlGrammarTest.php b/tests/DataStorage/Database/Query/Grammar/MysqlGrammarTest.php
index 9fc9d50d5..5c713db15 100644
--- a/tests/DataStorage/Database/Query/Grammar/MysqlGrammarTest.php
+++ b/tests/DataStorage/Database/Query/Grammar/MysqlGrammarTest.php
@@ -18,7 +18,7 @@ use phpOMS\Utils\TestUtils;
class MysqlGrammarTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
self::assertInstanceOf('\phpOMS\DataStorage\Database\Query\Grammar\Grammar', new MysqlGrammar());
self::assertEquals('`', TestUtils::getMember(new MysqlGrammar(), 'systemIdentifier'));
diff --git a/tests/DataStorage/Database/Query/Grammar/OracleGrammarTest.php b/tests/DataStorage/Database/Query/Grammar/OracleGrammarTest.php
index 061ea0f52..c2d4d4fc4 100644
--- a/tests/DataStorage/Database/Query/Grammar/OracleGrammarTest.php
+++ b/tests/DataStorage/Database/Query/Grammar/OracleGrammarTest.php
@@ -17,7 +17,7 @@ use phpOMS\DataStorage\Database\Query\Grammar\OracleGrammar;
class OracleGrammarTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
self::assertInstanceOf('\phpOMS\DataStorage\Database\Query\Grammar\Grammar', new OracleGrammar());
}
diff --git a/tests/DataStorage/Database/Query/Grammar/PostgresGrammarTest.php b/tests/DataStorage/Database/Query/Grammar/PostgresGrammarTest.php
index 8ccc57ff4..3f942fba3 100644
--- a/tests/DataStorage/Database/Query/Grammar/PostgresGrammarTest.php
+++ b/tests/DataStorage/Database/Query/Grammar/PostgresGrammarTest.php
@@ -17,7 +17,7 @@ use phpOMS\DataStorage\Database\Query\Grammar\PostgresGrammar;
class PostgresGrammarTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
self::assertInstanceOf('\phpOMS\DataStorage\Database\Query\Grammar\Grammar', new PostgresGrammar());
}
diff --git a/tests/DataStorage/Database/Query/Grammar/SQLiteGrammarTest.php b/tests/DataStorage/Database/Query/Grammar/SQLiteGrammarTest.php
index 48c2715dc..ea8dc7185 100644
--- a/tests/DataStorage/Database/Query/Grammar/SQLiteGrammarTest.php
+++ b/tests/DataStorage/Database/Query/Grammar/SQLiteGrammarTest.php
@@ -18,7 +18,7 @@ use phpOMS\Utils\TestUtils;
class SQLiteGrammarTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
self::assertInstanceOf('\phpOMS\DataStorage\Database\Query\Grammar\Grammar', new SqliteGrammar());
self::assertEquals('`', TestUtils::getMember(new SqliteGrammar(), 'systemIdentifier'));
diff --git a/tests/DataStorage/Database/Query/IntoTest.php b/tests/DataStorage/Database/Query/IntoTest.php
index e6b1c8eea..1863d23d5 100644
--- a/tests/DataStorage/Database/Query/IntoTest.php
+++ b/tests/DataStorage/Database/Query/IntoTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\DataStorage\Database\Query;
class IntoTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/DataStorage/Database/Query/JoinTypeTest.php b/tests/DataStorage/Database/Query/JoinTypeTest.php
index 0f5065e88..ba3e0b0a2 100644
--- a/tests/DataStorage/Database/Query/JoinTypeTest.php
+++ b/tests/DataStorage/Database/Query/JoinTypeTest.php
@@ -17,7 +17,7 @@ use phpOMS\DataStorage\Database\Query\JoinType;
class JoinTypeTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(12, \count(JoinType::getConstants()));
self::assertEquals(JoinType::getConstants(), array_unique(JoinType::getConstants()));
diff --git a/tests/DataStorage/Database/Query/QueryTypeTest.php b/tests/DataStorage/Database/Query/QueryTypeTest.php
index b76cecdff..d8473e303 100644
--- a/tests/DataStorage/Database/Query/QueryTypeTest.php
+++ b/tests/DataStorage/Database/Query/QueryTypeTest.php
@@ -17,7 +17,7 @@ use phpOMS\DataStorage\Database\Query\QueryType;
class QueryTypeTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(7, \count(QueryType::getConstants()));
self::assertEquals(QueryType::getConstants(), array_unique(QueryType::getConstants()));
diff --git a/tests/DataStorage/Database/Query/SelectTest.php b/tests/DataStorage/Database/Query/SelectTest.php
index dbb03497a..27da5b2e5 100644
--- a/tests/DataStorage/Database/Query/SelectTest.php
+++ b/tests/DataStorage/Database/Query/SelectTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\DataStorage\Database\Query;
class SelectTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/DataStorage/Database/Query/WhereTest.php b/tests/DataStorage/Database/Query/WhereTest.php
index 39ec62ad0..86e576804 100644
--- a/tests/DataStorage/Database/Query/WhereTest.php
+++ b/tests/DataStorage/Database/Query/WhereTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\DataStorage\Database\Query;
class WhereTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/DataStorage/Database/RelationTypeTest.php b/tests/DataStorage/Database/RelationTypeTest.php
index a1b2ef8d6..434f2a8c8 100644
--- a/tests/DataStorage/Database/RelationTypeTest.php
+++ b/tests/DataStorage/Database/RelationTypeTest.php
@@ -17,7 +17,7 @@ use phpOMS\DataStorage\Database\RelationType;
class RelationTypeTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(7, \count(RelationType::getConstants()));
self::assertEquals(1, RelationType::NONE);
diff --git a/tests/DataStorage/Database/Schema/BuilderTest.php b/tests/DataStorage/Database/Schema/BuilderTest.php
index eec334a0c..e7d1d0683 100644
--- a/tests/DataStorage/Database/Schema/BuilderTest.php
+++ b/tests/DataStorage/Database/Schema/BuilderTest.php
@@ -20,33 +20,33 @@ class BuilderTest extends \PHPUnit\Framework\TestCase
{
protected $con = null;
- protected function setUp()
+ protected function setUp() : void
{
$this->con = new MysqlConnection($GLOBALS['CONFIG']['db']['core']['masters']['admin']);
}
- public function testMysqlDrop()
+ public function testMysqlDrop() : void
{
$query = new Builder($this->con);
$sql = 'DROP DATABASE `test`;';
self::assertEquals($sql, $query->drop('test')->toSql());
}
- public function testMysqlShowTables()
+ public function testMysqlShowTables() : void
{
$query = new Builder($this->con);
$sql = 'SELECT `table_name` FROM `information_schema`.`tables` WHERE `information_schema`.`tables`.`table_schema` = \'' . $GLOBALS['CONFIG']['db']['core']['masters']['admin']['database']. '\';';
self::assertEquals($sql, $query->selectTables()->toSql());
}
- public function testMysqlShowFields()
+ public function testMysqlShowFields() : void
{
$query = new Builder($this->con);
$sql = 'SELECT * FROM `information_schema`.`columns` WHERE `information_schema`.`columns`.`table_schema` = \'' . $GLOBALS['CONFIG']['db']['core']['masters']['admin']['database']. '\' AND `information_schema`.`columns`.`table_name` = \'test\';';
self::assertEquals($sql, $query->selectFields('test')->toSql());
}
- public function testMysqlCreateTable()
+ public function testMysqlCreateTable() : void
{
$query = new Builder($this->con);
$sql = 'CREATE TABLE `user_roles` (`user_id` INT NOT NULL AUTO_INCREMENT, `role_id` VARCHAR(10) DEFAULT \'1\' NULL, PRIMARY KEY (`user_id`), FOREIGN KEY (`user_id`) REFERENCES `users` (`ext1_id`), FOREIGN KEY (`role_id`) REFERENCES `roles` (`ext2_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;';
diff --git a/tests/DataStorage/Database/Schema/Exception/TableExceptionTest.php b/tests/DataStorage/Database/Schema/Exception/TableExceptionTest.php
index 5e520a026..a67521f08 100644
--- a/tests/DataStorage/Database/Schema/Exception/TableExceptionTest.php
+++ b/tests/DataStorage/Database/Schema/Exception/TableExceptionTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\DataStorage\Database\Schema\Exception;
class TableExceptionTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/DataStorage/Database/Schema/Grammar/GrammarTest.php b/tests/DataStorage/Database/Schema/Grammar/GrammarTest.php
index 15e59020a..1fd4766ef 100644
--- a/tests/DataStorage/Database/Schema/Grammar/GrammarTest.php
+++ b/tests/DataStorage/Database/Schema/Grammar/GrammarTest.php
@@ -17,7 +17,7 @@ use phpOMS\DataStorage\Database\Schema\Grammar\Grammar;
class GrammarTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
$grammar = new Grammar();
self::assertEquals('Y-m-d H:i:s', $grammar->getDateFormat());
diff --git a/tests/DataStorage/Database/Schema/Grammar/MysqlGrammarTest.php b/tests/DataStorage/Database/Schema/Grammar/MysqlGrammarTest.php
index 0959601ee..573222411 100644
--- a/tests/DataStorage/Database/Schema/Grammar/MysqlGrammarTest.php
+++ b/tests/DataStorage/Database/Schema/Grammar/MysqlGrammarTest.php
@@ -18,7 +18,7 @@ use phpOMS\Utils\TestUtils;
class MysqlGrammarTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
self::assertInstanceOf('\phpOMS\DataStorage\Database\Schema\Grammar\Grammar', new MysqlGrammar());
self::assertEquals('`', TestUtils::getMember(new MysqlGrammar(), 'systemIdentifier'));
diff --git a/tests/DataStorage/Database/Schema/Grammar/OracleGrammarTest.php b/tests/DataStorage/Database/Schema/Grammar/OracleGrammarTest.php
index 0a05b00ca..7b00998fd 100644
--- a/tests/DataStorage/Database/Schema/Grammar/OracleGrammarTest.php
+++ b/tests/DataStorage/Database/Schema/Grammar/OracleGrammarTest.php
@@ -17,7 +17,7 @@ use phpOMS\DataStorage\Database\Schema\Grammar\OracleGrammar;
class OracleGrammarTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
self::assertInstanceOf('\phpOMS\DataStorage\Database\Schema\Grammar\Grammar', new OracleGrammar());
}
diff --git a/tests/DataStorage/Database/Schema/Grammar/PostgresGrammarTest.php b/tests/DataStorage/Database/Schema/Grammar/PostgresGrammarTest.php
index f724d0a60..b07959e3b 100644
--- a/tests/DataStorage/Database/Schema/Grammar/PostgresGrammarTest.php
+++ b/tests/DataStorage/Database/Schema/Grammar/PostgresGrammarTest.php
@@ -17,7 +17,7 @@ use phpOMS\DataStorage\Database\Schema\Grammar\PostgresGrammar;
class PostgresGrammarTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
self::assertInstanceOf('\phpOMS\DataStorage\Database\Schema\Grammar\Grammar', new PostgresGrammar());
}
diff --git a/tests/DataStorage/Database/Schema/Grammar/SQLiteGrammarTest.php b/tests/DataStorage/Database/Schema/Grammar/SQLiteGrammarTest.php
index bfb602d89..2cd512742 100644
--- a/tests/DataStorage/Database/Schema/Grammar/SQLiteGrammarTest.php
+++ b/tests/DataStorage/Database/Schema/Grammar/SQLiteGrammarTest.php
@@ -17,7 +17,7 @@ use phpOMS\Utils\TestUtils;
class SQLiteGrammarTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
self::assertInstanceOf('\phpOMS\DataStorage\Database\Schema\Grammar\Grammar', new SQLiteGrammar());
self::assertEquals('`', TestUtils::getMember(new SQLiteGrammar(), 'systemIdentifier'));
diff --git a/tests/DataStorage/Database/Schema/Grammar/SqlServerGrammarTest.php b/tests/DataStorage/Database/Schema/Grammar/SqlServerGrammarTest.php
index 7bf255505..70a5110be 100644
--- a/tests/DataStorage/Database/Schema/Grammar/SqlServerGrammarTest.php
+++ b/tests/DataStorage/Database/Schema/Grammar/SqlServerGrammarTest.php
@@ -17,7 +17,7 @@ use phpOMS\DataStorage\Database\Schema\Grammar\SqlServerGrammar;
class SqlServerGrammarTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
self::assertInstanceOf('\phpOMS\DataStorage\Database\Schema\Grammar\Grammar', new SqlServerGrammar());
}
diff --git a/tests/DataStorage/Database/Schema/QueryTypeTest.php b/tests/DataStorage/Database/Schema/QueryTypeTest.php
index 70aa93d41..05fcddc97 100644
--- a/tests/DataStorage/Database/Schema/QueryTypeTest.php
+++ b/tests/DataStorage/Database/Schema/QueryTypeTest.php
@@ -17,7 +17,7 @@ use phpOMS\DataStorage\Database\Schema\QueryType;
class QueryTypeTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(12, \count(QueryType::getConstants()));
self::assertEquals(QueryType::getConstants(), array_unique(QueryType::getConstants()));
diff --git a/tests/DataStorage/Database/TestModel/BaseModel.php b/tests/DataStorage/Database/TestModel/BaseModel.php
index 437c19a8a..e6fd6d6df 100644
--- a/tests/DataStorage/Database/TestModel/BaseModel.php
+++ b/tests/DataStorage/Database/TestModel/BaseModel.php
@@ -66,7 +66,7 @@ class BaseModel
return '123';
}
- public function unserialize($data)
+ public function unserialize($data) : void
{
}
diff --git a/tests/DataStorage/LockExceptionTest.php b/tests/DataStorage/LockExceptionTest.php
index 81a70b54b..963c1f791 100644
--- a/tests/DataStorage/LockExceptionTest.php
+++ b/tests/DataStorage/LockExceptionTest.php
@@ -19,7 +19,7 @@ use phpOMS\DataStorage\LockException;
class LockExceptionTest extends \PHPUnit\Framework\TestCase
{
- public function testException()
+ public function testException() : void
{
self::assertInstanceOf(\RuntimeException::class, new LockException(''));
}
diff --git a/tests/DataStorage/Session/HttpSessionTest.php b/tests/DataStorage/Session/HttpSessionTest.php
index 0e1e3e39f..40c990fe7 100644
--- a/tests/DataStorage/Session/HttpSessionTest.php
+++ b/tests/DataStorage/Session/HttpSessionTest.php
@@ -17,14 +17,14 @@ use phpOMS\DataStorage\Session\HttpSession;
class HttpSessionTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
$session = new HttpSession();
self::assertEquals(null, $session->get('key'));
self::assertFalse($session->isLocked());
}
- public function testGetSet()
+ public function testGetSet() : void
{
$session = new HttpSession(1, false, 1);
self::assertTrue($session->set('test', 'value'));
diff --git a/tests/Dispatcher/DispatcherTest.php b/tests/Dispatcher/DispatcherTest.php
index ad308df89..7bba578dd 100644
--- a/tests/Dispatcher/DispatcherTest.php
+++ b/tests/Dispatcher/DispatcherTest.php
@@ -27,19 +27,19 @@ class DispatcherTest extends \PHPUnit\Framework\TestCase
{
protected $app = null;
- protected function setUp()
+ protected function setUp() : void
{
$this->app = new class extends ApplicationAbstract { protected $appName = 'Api'; };
$this->app->router = new Router();
$this->app->dispatcher = new Dispatcher($this->app);
}
- public function testAttributes()
+ public function testAttributes() : void
{
self::assertObjectHasAttribute('controllers', $this->app->dispatcher);
}
- public function testClosure()
+ public function testClosure() : void
{
$localization = new Localization();
@@ -54,7 +54,7 @@ class DispatcherTest extends \PHPUnit\Framework\TestCase
);
}
- public function testPathMethod()
+ public function testPathMethod() : void
{
$localization = new Localization();
@@ -69,7 +69,7 @@ class DispatcherTest extends \PHPUnit\Framework\TestCase
);
}
- public function testPathMethodInArray()
+ public function testPathMethodInArray() : void
{
$localization = new Localization();
@@ -84,7 +84,7 @@ class DispatcherTest extends \PHPUnit\Framework\TestCase
);
}
- public function testPathStatic()
+ public function testPathStatic() : void
{
$localization = new Localization();
@@ -99,7 +99,7 @@ class DispatcherTest extends \PHPUnit\Framework\TestCase
);
}
- public function testArray()
+ public function testArray() : void
{
$localization = new Localization();
@@ -121,7 +121,7 @@ class DispatcherTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \UnexpectedValueException
*/
- public function testInvalidDestination()
+ public function testInvalidDestination() : void
{
$this->app->dispatcher->dispatch(true);
}
@@ -129,7 +129,7 @@ class DispatcherTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidControllerPath()
+ public function testInvalidControllerPath() : void
{
$this->app->dispatcher->dispatch('phpOMS\tests\Dispatcher\TestControllers::testFunctionStatic');
}
@@ -137,7 +137,7 @@ class DispatcherTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \Exception
*/
- public function testInvalidControllerFunction()
+ public function testInvalidControllerFunction() : void
{
$this->app->dispatcher->dispatch('phpOMS\tests\Dispatcher\TestController::testFunctionStaticINVALID');
}
@@ -145,7 +145,7 @@ class DispatcherTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \UnexpectedValueException
*/
- public function testInvalidControllerString()
+ public function testInvalidControllerString() : void
{
$this->app->dispatcher->dispatch('phpOMS\tests\Dispatcher\TestController::testFunctionStatic:failure');
}
diff --git a/tests/Event/EventManagerTest.php b/tests/Event/EventManagerTest.php
index 76f1cf76d..384f18acf 100644
--- a/tests/Event/EventManagerTest.php
+++ b/tests/Event/EventManagerTest.php
@@ -19,7 +19,7 @@ use phpOMS\Event\EventManager;
class EventManagerTest extends \PHPUnit\Framework\TestCase
{
- public function testAttributes()
+ public function testAttributes() : void
{
$event = new EventManager();
@@ -27,7 +27,7 @@ class EventManagerTest extends \PHPUnit\Framework\TestCase
self::assertObjectHasAttribute('callbacks', $event);
}
- public function testDefault()
+ public function testDefault() : void
{
$event = new EventManager();
@@ -35,7 +35,7 @@ class EventManagerTest extends \PHPUnit\Framework\TestCase
self::assertFalse($event->trigger('invalid'));
}
- public function testBase()
+ public function testBase() : void
{
$event = new EventManager();
@@ -44,7 +44,7 @@ class EventManagerTest extends \PHPUnit\Framework\TestCase
self::assertEquals(1, $event->count());
}
- public function testReset()
+ public function testReset() : void
{
$event = new EventManager();
@@ -58,7 +58,7 @@ class EventManagerTest extends \PHPUnit\Framework\TestCase
self::assertEquals(1, $event->count());
}
- public function testDetach()
+ public function testDetach() : void
{
$event = new EventManager();
@@ -74,7 +74,7 @@ class EventManagerTest extends \PHPUnit\Framework\TestCase
self::assertFalse($event->detach('group'));
}
- public function testRemove()
+ public function testRemove() : void
{
$event = new EventManager();
@@ -85,7 +85,7 @@ class EventManagerTest extends \PHPUnit\Framework\TestCase
self::assertEquals(1, $event->count());
}
- public function testImportEvents()
+ public function testImportEvents() : void
{
$event = new EventManager();
self::assertFalse($event->importFromFile(__DIR__ . '/invalid.php'));
diff --git a/tests/Event/events.php b/tests/Event/events.php
index 81866c287..1f23b091a 100644
--- a/tests/Event/events.php
+++ b/tests/Event/events.php
@@ -1,13 +1,13 @@
[
'callback' => [
- 0 => function($v1, $v2, $v3) {},
- 1 => function($v1, $v2, $v3) {},
+ 0 => function($v1, $v2, $v3) : void {},
+ 1 => function($v1, $v2, $v3) : void {},
],
],
'SomeName2' => [
'callback' => [
- 0 => function($v4) {},
+ 0 => function($v4) : void {},
],
],
];
\ No newline at end of file
diff --git a/tests/ExtensionTest.php b/tests/ExtensionTest.php
index 7388b939f..d6121402f 100644
--- a/tests/ExtensionTest.php
+++ b/tests/ExtensionTest.php
@@ -15,27 +15,27 @@ namespace phpOMS\tests;
class ExtensionTest extends \PHPUnit\Framework\TestCase
{
- public function testExtensionMbstring()
+ public function testExtensionMbstring() : void
{
self::assertTrue(extension_loaded('mbstring'));
}
- public function testExtensionCurl()
+ public function testExtensionCurl() : void
{
self::assertTrue(extension_loaded('curl'));
}
- public function testExtensionImap()
+ public function testExtensionImap() : void
{
self::assertTrue(extension_loaded('imap'));
}
- public function testExtensionPdo()
+ public function testExtensionPdo() : void
{
self::assertTrue(extension_loaded('pdo'));
}
- public function testExtensionGD()
+ public function testExtensionGD() : void
{
self::assertTrue(extension_loaded('gd') || extension_loaded('gd2'));
}
diff --git a/tests/Localization/Defaults/CityMapperTest.php b/tests/Localization/Defaults/CityMapperTest.php
index 5bd95a2a6..a47d9f5b8 100644
--- a/tests/Localization/Defaults/CityMapperTest.php
+++ b/tests/Localization/Defaults/CityMapperTest.php
@@ -21,7 +21,7 @@ use phpOMS\Localization\Defaults\CityMapper;
class CityMapperTest extends \PHPUnit\Framework\TestCase
{
- static function setUpBeforeClass()
+ public static function setUpBeforeClass() : void
{
$con = new SqliteConnection([
'prefix' => '',
@@ -32,7 +32,7 @@ class CityMapperTest extends \PHPUnit\Framework\TestCase
DataMapperAbstract::setConnection($con);
}
- public function testR()
+ public function testR() : void
{
$obj = CityMapper::get(101079);
self::assertEquals('DE', $obj->getCountryCode());
@@ -44,7 +44,7 @@ class CityMapperTest extends \PHPUnit\Framework\TestCase
self::assertLessThan(9, $obj->getLong());
}
- static function tearDownAfterClass()
+ public static function tearDownAfterClass() : void
{
DataMapperAbstract::setConnection($GLOBALS['dbpool']->get());
}
diff --git a/tests/Localization/Defaults/CityTest.php b/tests/Localization/Defaults/CityTest.php
index 664f1a845..a210e3e4c 100644
--- a/tests/Localization/Defaults/CityTest.php
+++ b/tests/Localization/Defaults/CityTest.php
@@ -19,7 +19,7 @@ use phpOMS\Localization\Defaults\City;
class CityTest extends \PHPUnit\Framework\TestCase
{
- public function testDefaults()
+ public function testDefaults() : void
{
$obj = new City();
self::assertEquals('', $obj->getName());
diff --git a/tests/Localization/Defaults/CountryMapperTest.php b/tests/Localization/Defaults/CountryMapperTest.php
index 19de7050e..13fb6e8cb 100644
--- a/tests/Localization/Defaults/CountryMapperTest.php
+++ b/tests/Localization/Defaults/CountryMapperTest.php
@@ -21,7 +21,7 @@ use phpOMS\Localization\Defaults\CountryMapper;
class CountryMapperTest extends \PHPUnit\Framework\TestCase
{
- static function setUpBeforeClass()
+ public static function setUpBeforeClass() : void
{
$con = new SqliteConnection([
'prefix' => '',
@@ -32,7 +32,7 @@ class CountryMapperTest extends \PHPUnit\Framework\TestCase
DataMapperAbstract::setConnection($con);
}
- public function testR()
+ public function testR() : void
{
$obj = CountryMapper::get(83);
self::assertEquals('Germany', $obj->getName());
@@ -42,7 +42,7 @@ class CountryMapperTest extends \PHPUnit\Framework\TestCase
self::assertEquals('ISO 3166-2:DE', $obj->getSubdevision());
}
- static function tearDownAfterClass()
+ public static function tearDownAfterClass() : void
{
DataMapperAbstract::setConnection($GLOBALS['dbpool']->get());
}
diff --git a/tests/Localization/Defaults/CountryTest.php b/tests/Localization/Defaults/CountryTest.php
index 07369357f..36e447d6f 100644
--- a/tests/Localization/Defaults/CountryTest.php
+++ b/tests/Localization/Defaults/CountryTest.php
@@ -19,7 +19,7 @@ use phpOMS\Localization\Defaults\Country;
class CountryTest extends \PHPUnit\Framework\TestCase
{
- public function testDefaults()
+ public function testDefaults() : void
{
$obj = new Country();
self::assertEquals('', $obj->getName());
diff --git a/tests/Localization/Defaults/CurrencyMapperTest.php b/tests/Localization/Defaults/CurrencyMapperTest.php
index a6a85ecdf..73301c020 100644
--- a/tests/Localization/Defaults/CurrencyMapperTest.php
+++ b/tests/Localization/Defaults/CurrencyMapperTest.php
@@ -21,7 +21,7 @@ use phpOMS\Localization\Defaults\CurrencyMapper;
class CurrencyMapperTest extends \PHPUnit\Framework\TestCase
{
- static function setUpBeforeClass()
+ public static function setUpBeforeClass() : void
{
$con = new SqliteConnection([
'prefix' => '',
@@ -32,7 +32,7 @@ class CurrencyMapperTest extends \PHPUnit\Framework\TestCase
DataMapperAbstract::setConnection($con);
}
- public function testR()
+ public function testR() : void
{
$obj = CurrencyMapper::get(50);
self::assertEquals('Euro', $obj->getName());
@@ -42,7 +42,7 @@ class CurrencyMapperTest extends \PHPUnit\Framework\TestCase
self::assertContains('Germany', $obj->getCountries());
}
- static function tearDownAfterClass()
+ public static function tearDownAfterClass() : void
{
DataMapperAbstract::setConnection($GLOBALS['dbpool']->get());
}
diff --git a/tests/Localization/Defaults/CurrencyTest.php b/tests/Localization/Defaults/CurrencyTest.php
index 62f96004c..46a1e9d6b 100644
--- a/tests/Localization/Defaults/CurrencyTest.php
+++ b/tests/Localization/Defaults/CurrencyTest.php
@@ -19,7 +19,7 @@ use phpOMS\Localization\Defaults\Currency;
class CurrencyTest extends \PHPUnit\Framework\TestCase
{
- public function testDefaults()
+ public function testDefaults() : void
{
$obj = new Currency();
self::assertEquals('', $obj->getName());
diff --git a/tests/Localization/Defaults/IbanMapperTest.php b/tests/Localization/Defaults/IbanMapperTest.php
index 600f83fd3..331827aff 100644
--- a/tests/Localization/Defaults/IbanMapperTest.php
+++ b/tests/Localization/Defaults/IbanMapperTest.php
@@ -21,7 +21,7 @@ use phpOMS\Localization\Defaults\IbanMapper;
class IbanMapperTest extends \PHPUnit\Framework\TestCase
{
- static function setUpBeforeClass()
+ public static function setUpBeforeClass() : void
{
$con = new SqliteConnection([
'prefix' => '',
@@ -32,7 +32,7 @@ class IbanMapperTest extends \PHPUnit\Framework\TestCase
DataMapperAbstract::setConnection($con);
}
- public function testR()
+ public function testR() : void
{
$obj = IbanMapper::get(22);
self::assertEquals('DE', $obj->getCountry());
@@ -41,7 +41,7 @@ class IbanMapperTest extends \PHPUnit\Framework\TestCase
self::assertEquals('DEkk bbbb bbbb cccc cccc cc', $obj->getFields());
}
- static function tearDownAfterClass()
+ public static function tearDownAfterClass() : void
{
DataMapperAbstract::setConnection($GLOBALS['dbpool']->get());
}
diff --git a/tests/Localization/Defaults/IbanTest.php b/tests/Localization/Defaults/IbanTest.php
index e0c7cdd02..8e08c15f3 100644
--- a/tests/Localization/Defaults/IbanTest.php
+++ b/tests/Localization/Defaults/IbanTest.php
@@ -19,7 +19,7 @@ use phpOMS\Localization\Defaults\Iban;
class IbanTest extends \PHPUnit\Framework\TestCase
{
- public function testDefaults()
+ public function testDefaults() : void
{
$obj = new Iban();
self::assertEquals('', $obj->getCountry());
diff --git a/tests/Localization/Defaults/LanguageMapperTest.php b/tests/Localization/Defaults/LanguageMapperTest.php
index 4faab1370..516d2d979 100644
--- a/tests/Localization/Defaults/LanguageMapperTest.php
+++ b/tests/Localization/Defaults/LanguageMapperTest.php
@@ -21,7 +21,7 @@ use phpOMS\Localization\Defaults\LanguageMapper;
class LanguageMapperTest extends \PHPUnit\Framework\TestCase
{
- static function setUpBeforeClass()
+ public static function setUpBeforeClass() : void
{
$con = new SqliteConnection([
'prefix' => '',
@@ -32,7 +32,7 @@ class LanguageMapperTest extends \PHPUnit\Framework\TestCase
DataMapperAbstract::setConnection($con);
}
- public function testR()
+ public function testR() : void
{
$obj = LanguageMapper::get(53);
self::assertEquals('German', $obj->getName());
@@ -42,7 +42,7 @@ class LanguageMapperTest extends \PHPUnit\Framework\TestCase
self::assertEquals('ger', $obj->getCode3());
}
- static function tearDownAfterClass()
+ public static function tearDownAfterClass() : void
{
DataMapperAbstract::setConnection($GLOBALS['dbpool']->get());
}
diff --git a/tests/Localization/Defaults/LanguageTest.php b/tests/Localization/Defaults/LanguageTest.php
index cf737ace0..d3932d8a4 100644
--- a/tests/Localization/Defaults/LanguageTest.php
+++ b/tests/Localization/Defaults/LanguageTest.php
@@ -19,7 +19,7 @@ use phpOMS\Localization\Defaults\Language;
class LanguageTest extends \PHPUnit\Framework\TestCase
{
- public function testDefaults()
+ public function testDefaults() : void
{
$obj = new Language();
self::assertEquals('', $obj->getName());
diff --git a/tests/Localization/ISO3166CharEnumTest.php b/tests/Localization/ISO3166CharEnumTest.php
index 6d872faad..07c9c89f1 100644
--- a/tests/Localization/ISO3166CharEnumTest.php
+++ b/tests/Localization/ISO3166CharEnumTest.php
@@ -19,7 +19,7 @@ use phpOMS\Localization\ISO3166CharEnum;
class ISO3166CharEnumTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
$ok = true;
diff --git a/tests/Localization/ISO3166NameEnumTest.php b/tests/Localization/ISO3166NameEnumTest.php
index 57a3a48c4..da220245e 100644
--- a/tests/Localization/ISO3166NameEnumTest.php
+++ b/tests/Localization/ISO3166NameEnumTest.php
@@ -19,7 +19,7 @@ use phpOMS\Localization\ISO3166NameEnum;
class ISO3166NameEnumTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
$enum = ISO3166NameEnum::getConstants();
self::assertEquals(\count($enum), \count(array_unique($enum)));
diff --git a/tests/Localization/ISO3166NumEnumTest.php b/tests/Localization/ISO3166NumEnumTest.php
index 0987e3bc4..b0a610532 100644
--- a/tests/Localization/ISO3166NumEnumTest.php
+++ b/tests/Localization/ISO3166NumEnumTest.php
@@ -19,7 +19,7 @@ use phpOMS\Localization\ISO3166NumEnum;
class ISO3166NumEnumTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
$ok = true;
diff --git a/tests/Localization/ISO3166TwoEnumTest.php b/tests/Localization/ISO3166TwoEnumTest.php
index 4c35f126c..4ed5f2f53 100644
--- a/tests/Localization/ISO3166TwoEnumTest.php
+++ b/tests/Localization/ISO3166TwoEnumTest.php
@@ -19,7 +19,7 @@ use phpOMS\Localization\ISO3166TwoEnum;
class ISO3166TwoEnumTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
$ok = true;
diff --git a/tests/Localization/ISO4217CharEnumTest.php b/tests/Localization/ISO4217CharEnumTest.php
index 266455f57..103ac8b5c 100644
--- a/tests/Localization/ISO4217CharEnumTest.php
+++ b/tests/Localization/ISO4217CharEnumTest.php
@@ -19,7 +19,7 @@ use phpOMS\Localization\ISO4217CharEnum;
class ISO4217CharEnumTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
$ok = true;
diff --git a/tests/Localization/ISO4217DecimalEnumTest.php b/tests/Localization/ISO4217DecimalEnumTest.php
index dd3172471..b16f012fb 100644
--- a/tests/Localization/ISO4217DecimalEnumTest.php
+++ b/tests/Localization/ISO4217DecimalEnumTest.php
@@ -19,7 +19,7 @@ use phpOMS\Localization\ISO4217DecimalEnum;
class ISO4217DecimalEnumTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
$ok = true;
diff --git a/tests/Localization/ISO4217EnumTest.php b/tests/Localization/ISO4217EnumTest.php
index df99ca7a8..bc4573888 100644
--- a/tests/Localization/ISO4217EnumTest.php
+++ b/tests/Localization/ISO4217EnumTest.php
@@ -19,7 +19,7 @@ use phpOMS\Localization\ISO4217Enum;
class ISO4217EnumTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
$enum = ISO4217Enum::getConstants();
self::assertEquals(\count($enum), \count(array_unique($enum)));
diff --git a/tests/Localization/ISO4217NumEnumTest.php b/tests/Localization/ISO4217NumEnumTest.php
index d8b7c973e..5d502b681 100644
--- a/tests/Localization/ISO4217NumEnumTest.php
+++ b/tests/Localization/ISO4217NumEnumTest.php
@@ -19,7 +19,7 @@ use phpOMS\Localization\ISO4217NumEnum;
class ISO4217NumEnumTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
$ok = true;
diff --git a/tests/Localization/ISO4217SubUnitEnumTest.php b/tests/Localization/ISO4217SubUnitEnumTest.php
index 6217b0252..032814945 100644
--- a/tests/Localization/ISO4217SubUnitEnumTest.php
+++ b/tests/Localization/ISO4217SubUnitEnumTest.php
@@ -19,7 +19,7 @@ use phpOMS\Localization\ISO4217SubUnitEnum;
class ISO4217SubUnitEnumTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
$ok = true;
diff --git a/tests/Localization/ISO4217SymbolEnumTest.php b/tests/Localization/ISO4217SymbolEnumTest.php
index 496a50b5e..a3641450b 100644
--- a/tests/Localization/ISO4217SymbolEnumTest.php
+++ b/tests/Localization/ISO4217SymbolEnumTest.php
@@ -19,7 +19,7 @@ use phpOMS\Localization\ISO4217SymbolEnum;
class ISO4217SymbolEnumTest extends \PHPUnit\Framework\TestCase
{
- public function testEnum()
+ public function testEnum() : void
{
$enum = ISO4217SymbolEnum::getConstants();
self::assertEquals(109, \count($enum));
diff --git a/tests/Localization/ISO639EnumTest.php b/tests/Localization/ISO639EnumTest.php
index 8cb99203f..e441cd49b 100644
--- a/tests/Localization/ISO639EnumTest.php
+++ b/tests/Localization/ISO639EnumTest.php
@@ -19,7 +19,7 @@ use phpOMS\Localization\ISO639Enum;
class ISO639EnumTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
$enum = ISO639Enum::getConstants();
self::assertEquals(\count($enum), \count(array_unique($enum)));
diff --git a/tests/Localization/ISO639x1EnumTest.php b/tests/Localization/ISO639x1EnumTest.php
index 80bdc131a..36775fbd6 100644
--- a/tests/Localization/ISO639x1EnumTest.php
+++ b/tests/Localization/ISO639x1EnumTest.php
@@ -19,7 +19,7 @@ use phpOMS\Localization\ISO639x1Enum;
class ISO639x1EnumTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
$ok = true;
diff --git a/tests/Localization/ISO639x2EnumTest.php b/tests/Localization/ISO639x2EnumTest.php
index fa863ade7..e83fbacbf 100644
--- a/tests/Localization/ISO639x2EnumTest.php
+++ b/tests/Localization/ISO639x2EnumTest.php
@@ -19,7 +19,7 @@ use phpOMS\Localization\ISO639x2Enum;
class ISO639x2EnumTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
$ok = true;
diff --git a/tests/Localization/ISO8601EnumArrayTest.php b/tests/Localization/ISO8601EnumArrayTest.php
index b378f454e..61c1977d0 100644
--- a/tests/Localization/ISO8601EnumArrayTest.php
+++ b/tests/Localization/ISO8601EnumArrayTest.php
@@ -19,7 +19,7 @@ use phpOMS\Localization\ISO8601EnumArray;
class ISO8601EnumArrayTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(4, \count(ISO8601EnumArray::getConstants()));
}
diff --git a/tests/Localization/L11nManagerTest.php b/tests/Localization/L11nManagerTest.php
index 9176f5afe..a4614557c 100644
--- a/tests/Localization/L11nManagerTest.php
+++ b/tests/Localization/L11nManagerTest.php
@@ -19,13 +19,13 @@ require_once __DIR__ . '/../Autoloader.php';
class L11nManagerTest extends \PHPUnit\Framework\TestCase
{
- public function testAttributes()
+ public function testAttributes() : void
{
$l11nManager = new L11nManager('Api');
self::assertObjectHasAttribute('language', $l11nManager);
}
- public function testDefault()
+ public function testDefault() : void
{
$l11nManager = new L11nManager('Api');
self::assertFalse($l11nManager->isLanguageLoaded('en'));
@@ -38,7 +38,7 @@ class L11nManagerTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \Exception
*/
- public function testInvalidModule()
+ public function testInvalidModule() : void
{
$expected = [
'en' => [
@@ -52,7 +52,7 @@ class L11nManagerTest extends \PHPUnit\Framework\TestCase
$localization->loadLanguage('en', 'doesNotExist', $expected);
}
- public function testGetSet()
+ public function testGetSet() : void
{
$expected = [
'en' => [
@@ -79,7 +79,7 @@ class L11nManagerTest extends \PHPUnit\Framework\TestCase
self::assertEquals('Test strin&g2', $l11nManager->getHtml('en', 'Admin', 'RandomThemeDoesNotMatterAlreadyLoaded', 'Test2'));
}
- public function testGetSetFromFile()
+ public function testGetSetFromFile() : void
{
$l11nManager2 = new L11nManager('Api');
$l11nManager2->loadLanguageFromFile('en', 'Test', __DIR__ . '/langTestFile.php');
diff --git a/tests/Localization/LocalizationTest.php b/tests/Localization/LocalizationTest.php
index 48ff96ec7..d77970489 100644
--- a/tests/Localization/LocalizationTest.php
+++ b/tests/Localization/LocalizationTest.php
@@ -29,12 +29,12 @@ class LocalizationTest extends \PHPUnit\Framework\TestCase
{
protected $l11nManager = null;
- protected function setUp()
+ protected function setUp() : void
{
$this->l11nManager = new L11nManager('Api');
}
- public function testAttributes()
+ public function testAttributes() : void
{
$localization = new Localization();
self::assertObjectHasAttribute('country', $localization);
@@ -46,7 +46,7 @@ class LocalizationTest extends \PHPUnit\Framework\TestCase
self::assertObjectHasAttribute('datetime', $localization);
}
- public function testDefault()
+ public function testDefault() : void
{
$localization = new Localization();
self::assertTrue(ISO3166TwoEnum::isValidValue($localization->getCountry()));
@@ -67,7 +67,7 @@ class LocalizationTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\Stdlib\Base\Exception\InvalidEnumValue
*/
- public function testInvalidLanguage()
+ public function testInvalidLanguage() : void
{
$localization = new Localization();
$localization->setLanguage('abc');
@@ -76,7 +76,7 @@ class LocalizationTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\Stdlib\Base\Exception\InvalidEnumValue
*/
- public function testInvalidCountry()
+ public function testInvalidCountry() : void
{
$localization = new Localization();
$localization->setCountry('abc');
@@ -85,7 +85,7 @@ class LocalizationTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\Stdlib\Base\Exception\InvalidEnumValue
*/
- public function testInvalidTimezone()
+ public function testInvalidTimezone() : void
{
$localization = new Localization();
$localization->setTimezone('abc');
@@ -94,13 +94,13 @@ class LocalizationTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\Stdlib\Base\Exception\InvalidEnumValue
*/
- public function testInvalidCurrency()
+ public function testInvalidCurrency() : void
{
$localization = new Localization();
$localization->setCurrency('abc');
}
- public function testGetSet()
+ public function testGetSet() : void
{
$localization = new Localization();
@@ -143,7 +143,7 @@ class LocalizationTest extends \PHPUnit\Framework\TestCase
self::assertEquals([1], $localization->getSpeed());
}
- public function testLocalizationLoading()
+ public function testLocalizationLoading() : void
{
$localization = new Localization();
$localization->loadFromLanguage(ISO639x1Enum::_EN);
@@ -156,7 +156,7 @@ class LocalizationTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\Stdlib\Base\Exception\InvalidEnumValue
*/
- public function testInvalidLocalizationLoading()
+ public function testInvalidLocalizationLoading() : void
{
$localization = new Localization();
$localization->loadFromLanguage('INVALID');
diff --git a/tests/Localization/MoneyTest.php b/tests/Localization/MoneyTest.php
index 8088f86da..0b0dcf205 100644
--- a/tests/Localization/MoneyTest.php
+++ b/tests/Localization/MoneyTest.php
@@ -20,7 +20,7 @@ use phpOMS\Localization\Money;
class MoneyTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
$money = new Money(0);
@@ -33,7 +33,7 @@ class MoneyTest extends \PHPUnit\Framework\TestCase
self::assertEquals(0, $money->getInt());
}
- public function testMoney()
+ public function testMoney() : void
{
$money = new Money(12345678);
@@ -46,7 +46,7 @@ class MoneyTest extends \PHPUnit\Framework\TestCase
self::assertEquals(12345600, Money::toInt('1234,56', '.', ','));
}
- public function testMoneySetters()
+ public function testMoneySetters() : void
{
$money = new Money(12345678);
self::assertEquals('999.13', $money->setString('999.13')->getAmount());
@@ -55,7 +55,7 @@ class MoneyTest extends \PHPUnit\Framework\TestCase
self::assertEquals('€9.992,30', $money->setInt(99923000)->setLocalization('.', ',', ISO4217SymbolEnum::_EUR, 0)->getCurrency());
}
- public function testMoneySerialization()
+ public function testMoneySerialization() : void
{
$money = new Money('999.23');
self::assertEquals(9992300, $money->serialize());
@@ -64,7 +64,7 @@ class MoneyTest extends \PHPUnit\Framework\TestCase
self::assertEquals('333.12', $money->getAmount());
}
- public function testMoneyAddSub()
+ public function testMoneyAddSub() : void
{
$money = new Money(10000);
@@ -81,7 +81,7 @@ class MoneyTest extends \PHPUnit\Framework\TestCase
self::assertEquals('1.0000', $money->sub(new Money(10000))->getAmount(4));
}
- public function testMoneyMultDiv()
+ public function testMoneyMultDiv() : void
{
$money = new Money(19100);
@@ -89,7 +89,7 @@ class MoneyTest extends \PHPUnit\Framework\TestCase
self::assertEquals('1.9100', $money->div(2.0)->getAmount(4));
}
- public function testMoneyOtherOperations()
+ public function testMoneyOtherOperations() : void
{
$money = new Money(-38200);
diff --git a/tests/Localization/PhoneEnumTest.php b/tests/Localization/PhoneEnumTest.php
index 3e938338d..fb350c688 100644
--- a/tests/Localization/PhoneEnumTest.php
+++ b/tests/Localization/PhoneEnumTest.php
@@ -19,7 +19,7 @@ use phpOMS\Localization\PhoneEnum;
class PhoneEnumTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
$ok = true;
diff --git a/tests/Localization/TimeZoneEnumArrayTest.php b/tests/Localization/TimeZoneEnumArrayTest.php
index 38dabdc75..b36c842dc 100644
--- a/tests/Localization/TimeZoneEnumArrayTest.php
+++ b/tests/Localization/TimeZoneEnumArrayTest.php
@@ -19,7 +19,7 @@ use phpOMS\Localization\TimeZoneEnumArray;
class TimeZoneEnumArrayTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(\count(TimeZoneEnumArray::getConstants()), \count(array_unique(TimeZoneEnumArray::getConstants())));
}
diff --git a/tests/Log/FileLoggerTest.php b/tests/Log/FileLoggerTest.php
index 7532aa267..3bca2cdfd 100644
--- a/tests/Log/FileLoggerTest.php
+++ b/tests/Log/FileLoggerTest.php
@@ -20,7 +20,7 @@ require_once __DIR__ . '/../Autoloader.php';
class FileLoggerTest extends \PHPUnit\Framework\TestCase
{
- public function testAttributes()
+ public function testAttributes() : void
{
$log = FileLogger::getInstance(__DIR__);
self::assertObjectHasAttribute('fp', $log);
@@ -31,7 +31,7 @@ class FileLoggerTest extends \PHPUnit\Framework\TestCase
}
}
- public function testDefault()
+ public function testDefault() : void
{
if (\file_exists(__DIR__ . '/' . date('Y-m-d') . '.log')) {
\unlink(__DIR__ . '/' . date('Y-m-d') . '.log');
@@ -48,7 +48,7 @@ class FileLoggerTest extends \PHPUnit\Framework\TestCase
}
}
- public function testGetSet()
+ public function testGetSet() : void
{
if (\file_exists(__DIR__ . '/test.log')) {
\unlink(__DIR__ . '/test.log');
@@ -150,7 +150,7 @@ class FileLoggerTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException phpOMS\Stdlib\Base\Exception\InvalidEnumValue
*/
- public function testLogException()
+ public function testLogException() : void
{
$log = new FileLogger(__DIR__ . '/test.log');
$log->log('testException', FileLogger::MSG_FULL, [
@@ -160,14 +160,14 @@ class FileLoggerTest extends \PHPUnit\Framework\TestCase
]);
}
- public function testTiming()
+ public function testTiming() : void
{
self::assertTrue(FileLogger::startTimeLog('test'));
self::assertFalse(FileLogger::startTimeLog('test'));
self::assertGreaterThan(0.0, FileLogger::endTimeLog('test'));
}
- public static function tearDownAfterClass()
+ public static function tearDownAfterClass() : void
{
if (\file_exists(__DIR__ . '/test.log')) {
\unlink(__DIR__ . '/test.log');
diff --git a/tests/Log/LogLevelTest.php b/tests/Log/LogLevelTest.php
index 136326ec3..653d4447a 100644
--- a/tests/Log/LogLevelTest.php
+++ b/tests/Log/LogLevelTest.php
@@ -19,7 +19,7 @@ use phpOMS\Log\LogLevel;
class LogLevelTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(8, \count(LogLevel::getConstants()));
self::assertEquals('emergency', LogLevel::EMERGENCY);
diff --git a/tests/Math/Differential/FiniteDifferenceTest.php b/tests/Math/Differential/FiniteDifferenceTest.php
index 72d8feb1f..99a72f4a7 100644
--- a/tests/Math/Differential/FiniteDifferenceTest.php
+++ b/tests/Math/Differential/FiniteDifferenceTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Math\Differential;
class FiniteDifferenceTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Math/Exception/ZeroDevisionExceptionTest.php b/tests/Math/Exception/ZeroDevisionExceptionTest.php
index a0c9a20d4..633364651 100644
--- a/tests/Math/Exception/ZeroDevisionExceptionTest.php
+++ b/tests/Math/Exception/ZeroDevisionExceptionTest.php
@@ -17,7 +17,7 @@ use phpOMS\Math\Exception\ZeroDevisionException;
class ZeroDevisionExceptionTest extends \PHPUnit\Framework\TestCase
{
- public function testException()
+ public function testException() : void
{
self::assertInstanceOf(\UnexpectedValueException::class, new ZeroDevisionException());
}
diff --git a/tests/Math/Functions/FibunacciTest.php b/tests/Math/Functions/FibunacciTest.php
index 56412b54b..ab58df811 100644
--- a/tests/Math/Functions/FibunacciTest.php
+++ b/tests/Math/Functions/FibunacciTest.php
@@ -17,7 +17,7 @@ use phpOMS\Math\Functions\Fibunacci;
class FibunacciTest extends \PHPUnit\Framework\TestCase
{
- public function testFibunacci()
+ public function testFibunacci() : void
{
self::assertTrue(Fibunacci::isFibunacci(13));
self::assertTrue(Fibunacci::isFibunacci(55));
diff --git a/tests/Math/Functions/FunctionsTest.php b/tests/Math/Functions/FunctionsTest.php
index 52a01bea2..dd3ae2351 100644
--- a/tests/Math/Functions/FunctionsTest.php
+++ b/tests/Math/Functions/FunctionsTest.php
@@ -17,7 +17,7 @@ use phpOMS\Math\Functions\Functions;
class FunctionsTest extends \PHPUnit\Framework\TestCase
{
- public function testFactorial()
+ public function testFactorial() : void
{
self::assertEquals(120, Functions::fact(5));
self::assertEquals(39916800, Functions::fact(11));
@@ -27,7 +27,7 @@ class FunctionsTest extends \PHPUnit\Framework\TestCase
self::assertEquals(13983816, Functions::binomialCoefficient(49, 6));
}
- public function testAckermann()
+ public function testAckermann() : void
{
self::assertEquals(5, Functions::ackermann(2, 1));
self::assertEquals(125, Functions::ackermann(3, 4));
@@ -35,19 +35,19 @@ class FunctionsTest extends \PHPUnit\Framework\TestCase
self::assertEquals(13, Functions::ackermann(4, 0));
}
- public function testMultiplicativeInverseModulo()
+ public function testMultiplicativeInverseModulo() : void
{
self::assertEquals(4, Functions::invMod(3, -11));
self::assertEquals(12, Functions::invMod(10, 17));
self::assertEquals(5, Functions::invMod(-10, 17));
}
- public function testAbs()
+ public function testAbs() : void
{
self::assertEquals([1, 3, 4], Functions::abs([-1, 3, -4]));
}
- public function testProperties()
+ public function testProperties() : void
{
self::assertTrue(Functions::isOdd(3));
self::assertTrue(Functions::isOdd(-3));
@@ -60,14 +60,14 @@ class FunctionsTest extends \PHPUnit\Framework\TestCase
self::assertFalse(Functions::isEven(-3));
}
- public function testCircularPosition()
+ public function testCircularPosition() : void
{
self::assertEquals(0, Functions::getRelativeDegree(7, 12, 7));
self::assertEquals(5, Functions::getRelativeDegree(12, 12, 7));
self::assertEquals(11, Functions::getRelativeDegree(6, 12, 7));
}
- public function testPower()
+ public function testPower() : void
{
self::assertEquals([4, 9, 16], Functions::powerInt([2, 3, 4], 2));
self::assertEquals([8, 27, 64], Functions::powerInt([2, 3, 4], 3));
diff --git a/tests/Math/Functions/GammaTest.php b/tests/Math/Functions/GammaTest.php
index d36a13e94..dc4e2c99e 100644
--- a/tests/Math/Functions/GammaTest.php
+++ b/tests/Math/Functions/GammaTest.php
@@ -18,12 +18,12 @@ use phpOMS\Math\Functions\Gamma;
class GammaTest extends \PHPUnit\Framework\TestCase
{
- public function testFactorial()
+ public function testFactorial() : void
{
self::assertEquals(Functions::fact(4), Gamma::getGammaInteger(5));
}
- public function testApproximations()
+ public function testApproximations() : void
{
$stirling = [
2.15697602, 1.20285073, 0.92213701, 0.83974270, 0.85919025, 0.95950218, 1.14910642, 1.45849038, 1.94540320, 2.70976382,
diff --git a/tests/Math/Geometry/ConvexHull/MonotoneChainTest.php b/tests/Math/Geometry/ConvexHull/MonotoneChainTest.php
index 6836baad3..268fceb69 100644
--- a/tests/Math/Geometry/ConvexHull/MonotoneChainTest.php
+++ b/tests/Math/Geometry/ConvexHull/MonotoneChainTest.php
@@ -17,7 +17,7 @@ use phpOMS\Math\Geometry\ConvexHull\MonotoneChain;
class MonotoneChainTest extends \PHPUnit\Framework\TestCase
{
- public function testMonotoneChain()
+ public function testMonotoneChain() : void
{
self::assertEquals([['x' => 9, 'y' => 0]], MonotoneChain::createConvexHull([['x' => 9, 'y' => 0]]));
diff --git a/tests/Math/Geometry/Shape/D2/CircleTest.php b/tests/Math/Geometry/Shape/D2/CircleTest.php
index 7a4862d67..8052e1abd 100644
--- a/tests/Math/Geometry/Shape/D2/CircleTest.php
+++ b/tests/Math/Geometry/Shape/D2/CircleTest.php
@@ -17,7 +17,7 @@ use phpOMS\Math\Geometry\Shape\D2\Circle;
class CircleTest extends \PHPUnit\Framework\TestCase
{
- public function testCircle()
+ public function testCircle() : void
{
self::assertEquals(12.57, Circle::getSurface(2), '', 0.01);
self::assertEquals(12.57, Circle::getPerimeter(2), '', 0.01);
diff --git a/tests/Math/Geometry/Shape/D2/EllipseTest.php b/tests/Math/Geometry/Shape/D2/EllipseTest.php
index 0b51e7a09..2640c0202 100644
--- a/tests/Math/Geometry/Shape/D2/EllipseTest.php
+++ b/tests/Math/Geometry/Shape/D2/EllipseTest.php
@@ -17,7 +17,7 @@ use phpOMS\Math\Geometry\Shape\D2\Ellipse;
class EllipseTest extends \PHPUnit\Framework\TestCase
{
- public function testEllipse()
+ public function testEllipse() : void
{
self::assertEquals(6.28, Ellipse::getSurface(2, 1), '', 0.01);
self::assertEquals(9.69, Ellipse::getPerimeter(2, 1), '', 0.01);
diff --git a/tests/Math/Geometry/Shape/D2/PolygonTest.php b/tests/Math/Geometry/Shape/D2/PolygonTest.php
index 528217af6..6a7f3c50c 100644
--- a/tests/Math/Geometry/Shape/D2/PolygonTest.php
+++ b/tests/Math/Geometry/Shape/D2/PolygonTest.php
@@ -17,7 +17,7 @@ use phpOMS\Math\Geometry\Shape\D2\Polygon;
class PolygonTest extends \PHPUnit\Framework\TestCase
{
- public function testPoint()
+ public function testPoint() : void
{
$polyArray = [
['x' => 1, 'y' => 1],
@@ -38,7 +38,7 @@ class PolygonTest extends \PHPUnit\Framework\TestCase
self::assertEquals(-1, Polygon::isPointInPolygon(['x' => 1.8, 'y' => 1.1], $polyArray));
}
- public function testAngle()
+ public function testAngle() : void
{
$polygon = new Polygon([[1, 2], [2, 3], [3, 4]]);
self::assertEquals(180, $polygon->getInteriorAngleSum());
@@ -61,7 +61,7 @@ class PolygonTest extends \PHPUnit\Framework\TestCase
self::assertEquals(360, $polygon->getExteriorAngleSum());
}
- public function testPerimeter()
+ public function testPerimeter() : void
{
$polygon = new Polygon([
['x' => 2, 'y' => 1],
@@ -76,7 +76,7 @@ class PolygonTest extends \PHPUnit\Framework\TestCase
self::assertEquals(9.6568, $polygon->getPerimeter(), '', 0.1);
}
- public function testArea()
+ public function testArea() : void
{
$polygon = new Polygon([
['x' => 2, 'y' => 1],
@@ -91,7 +91,7 @@ class PolygonTest extends \PHPUnit\Framework\TestCase
self::assertEquals(7, $polygon->getSurface());
}
- public function testBarycenter()
+ public function testBarycenter() : void
{
$polygon = new Polygon([
['x' => 2, 'y' => 1],
diff --git a/tests/Math/Geometry/Shape/D2/QuadrilateralTest.php b/tests/Math/Geometry/Shape/D2/QuadrilateralTest.php
index 4d517727b..4a17e6557 100644
--- a/tests/Math/Geometry/Shape/D2/QuadrilateralTest.php
+++ b/tests/Math/Geometry/Shape/D2/QuadrilateralTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Math\Geometry\Shape\D2;
class QuadrilateralTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Math/Geometry/Shape/D2/RectangleTest.php b/tests/Math/Geometry/Shape/D2/RectangleTest.php
index 414d23b45..e7275dfd2 100644
--- a/tests/Math/Geometry/Shape/D2/RectangleTest.php
+++ b/tests/Math/Geometry/Shape/D2/RectangleTest.php
@@ -17,7 +17,7 @@ use phpOMS\Math\Geometry\Shape\D2\Rectangle;
class RectangleTest extends \PHPUnit\Framework\TestCase
{
- public function testRectanle()
+ public function testRectanle() : void
{
self::assertEquals(10, Rectangle::getSurface(5, 2), '', 0.001);
self::assertEquals(10, Rectangle::getPerimeter(2, 3), '', 0.001);
diff --git a/tests/Math/Geometry/Shape/D2/TrapezoidTest.php b/tests/Math/Geometry/Shape/D2/TrapezoidTest.php
index 2f1eacc15..7c4bc3d2e 100644
--- a/tests/Math/Geometry/Shape/D2/TrapezoidTest.php
+++ b/tests/Math/Geometry/Shape/D2/TrapezoidTest.php
@@ -17,7 +17,7 @@ use phpOMS\Math\Geometry\Shape\D2\Trapezoid;
class TrapezoidTest extends \PHPUnit\Framework\TestCase
{
- public function testTrapezoid()
+ public function testTrapezoid() : void
{
self::assertEquals(10, Trapezoid::getSurface(2, 3, 4), '', 0.001);
self::assertEquals(14, Trapezoid::getPerimeter(2, 3, 4, 5), '', 0.001);
diff --git a/tests/Math/Geometry/Shape/D2/TriangleTest.php b/tests/Math/Geometry/Shape/D2/TriangleTest.php
index d7ee7d503..27d9c6eb6 100644
--- a/tests/Math/Geometry/Shape/D2/TriangleTest.php
+++ b/tests/Math/Geometry/Shape/D2/TriangleTest.php
@@ -17,7 +17,7 @@ use phpOMS\Math\Geometry\Shape\D2\Triangle;
class TriangleTest extends \PHPUnit\Framework\TestCase
{
- public function testTriangle()
+ public function testTriangle() : void
{
self::assertEquals(3, Triangle::getSurface(2, 3), '', 0.001);
self::assertEquals(9, Triangle::getPerimeter(2, 3, 4), '', 0.001);
diff --git a/tests/Math/Geometry/Shape/D3/ConeTest.php b/tests/Math/Geometry/Shape/D3/ConeTest.php
index 994a223f3..57284bace 100644
--- a/tests/Math/Geometry/Shape/D3/ConeTest.php
+++ b/tests/Math/Geometry/Shape/D3/ConeTest.php
@@ -17,7 +17,7 @@ use phpOMS\Math\Geometry\Shape\D3\Cone;
class ConeTest extends \PHPUnit\Framework\TestCase
{
- public function testCone()
+ public function testCone() : void
{
self::assertEquals(12.57, Cone::getVolume(2, 3), '', 0.01);
self::assertEquals(35.22, Cone::getSurface(2, 3), '', 0.01);
diff --git a/tests/Math/Geometry/Shape/D3/CuboidTest.php b/tests/Math/Geometry/Shape/D3/CuboidTest.php
index 64aac05b3..1c861d6e0 100644
--- a/tests/Math/Geometry/Shape/D3/CuboidTest.php
+++ b/tests/Math/Geometry/Shape/D3/CuboidTest.php
@@ -17,7 +17,7 @@ use phpOMS\Math\Geometry\Shape\D3\Cuboid;
class CuboidTest extends \PHPUnit\Framework\TestCase
{
- public function testCuboid()
+ public function testCuboid() : void
{
self::assertEquals(200, Cuboid::getVolume(10, 5, 4), '', 0.001);
self::assertEquals(220, Cuboid::getSurface(10, 5, 4), '', 0.001);
diff --git a/tests/Math/Geometry/Shape/D3/CylinderTest.php b/tests/Math/Geometry/Shape/D3/CylinderTest.php
index adb8c8f79..081f4feb0 100644
--- a/tests/Math/Geometry/Shape/D3/CylinderTest.php
+++ b/tests/Math/Geometry/Shape/D3/CylinderTest.php
@@ -17,7 +17,7 @@ use phpOMS\Math\Geometry\Shape\D3\Cylinder;
class CylinderTest extends \PHPUnit\Framework\TestCase
{
- public function testCylinder()
+ public function testCylinder() : void
{
self::assertEquals(37.7, Cylinder::getVolume(2, 3), '', 0.01);
self::assertEquals(62.83, Cylinder::getSurface(2, 3), '', 0.01);
diff --git a/tests/Math/Geometry/Shape/D3/PrismTest.php b/tests/Math/Geometry/Shape/D3/PrismTest.php
index 8726c3420..65e97c777 100644
--- a/tests/Math/Geometry/Shape/D3/PrismTest.php
+++ b/tests/Math/Geometry/Shape/D3/PrismTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Math\Geometry\Shape\D3;
class PrismTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Math/Geometry/Shape/D3/RectangularPyramidTest.php b/tests/Math/Geometry/Shape/D3/RectangularPyramidTest.php
index 9048d9952..f9da9c115 100644
--- a/tests/Math/Geometry/Shape/D3/RectangularPyramidTest.php
+++ b/tests/Math/Geometry/Shape/D3/RectangularPyramidTest.php
@@ -17,7 +17,7 @@ use phpOMS\Math\Geometry\Shape\D3\RectangularPyramid;
class RectangularPyramidTest extends \PHPUnit\Framework\TestCase
{
- public function testCylinder()
+ public function testCylinder() : void
{
self::assertEquals(8, RectangularPyramid::getVolume(2, 3, 4), '', 0.01);
self::assertEquals(26.91, RectangularPyramid::getSurface(2, 3, 4), '', 0.01);
diff --git a/tests/Math/Geometry/Shape/D3/SphereTest.php b/tests/Math/Geometry/Shape/D3/SphereTest.php
index 6a693380f..d182e8935 100644
--- a/tests/Math/Geometry/Shape/D3/SphereTest.php
+++ b/tests/Math/Geometry/Shape/D3/SphereTest.php
@@ -17,7 +17,7 @@ use phpOMS\Math\Geometry\Shape\D3\Sphere;
class SphereTest extends \PHPUnit\Framework\TestCase
{
- public function testSphere()
+ public function testSphere() : void
{
$sphere = new Sphere(3);
self::assertEquals(113.1, $sphere->getVolume(), '', 0.1);
@@ -26,7 +26,7 @@ class SphereTest extends \PHPUnit\Framework\TestCase
self::assertEquals(422740, Sphere::distance2PointsOnSphere(32.9697, -96.80322, 29.46786, -98.53506), '', 50);
}
- public function testGetBy()
+ public function testGetBy() : void
{
$sphere = Sphere::byRadius(3);
self::assertEquals(3, $sphere->getRadius(), '', 0.1);
diff --git a/tests/Math/Geometry/Shape/D3/TetrahedronTest.php b/tests/Math/Geometry/Shape/D3/TetrahedronTest.php
index bddadee7d..94adb89f0 100644
--- a/tests/Math/Geometry/Shape/D3/TetrahedronTest.php
+++ b/tests/Math/Geometry/Shape/D3/TetrahedronTest.php
@@ -17,7 +17,7 @@ use phpOMS\Math\Geometry\Shape\D3\Tetrahedron;
class TetrahedronTest extends \PHPUnit\Framework\TestCase
{
- public function testTetrahedron()
+ public function testTetrahedron() : void
{
self::assertEquals(3.18, Tetrahedron::getVolume(3), '', 0.01);
self::assertEquals(15.59, Tetrahedron::getSurface(3), '', 0.01);
diff --git a/tests/Math/Integral/GaussTest.php b/tests/Math/Integral/GaussTest.php
index 9e5be7dc9..85bdd7cee 100644
--- a/tests/Math/Integral/GaussTest.php
+++ b/tests/Math/Integral/GaussTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Math\Integral;
class GaussTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Math/Matrix/CholeskyDecompositionTest.php b/tests/Math/Matrix/CholeskyDecompositionTest.php
index 36f6c48b2..dfc5ff005 100644
--- a/tests/Math/Matrix/CholeskyDecompositionTest.php
+++ b/tests/Math/Matrix/CholeskyDecompositionTest.php
@@ -19,7 +19,7 @@ use phpOMS\Math\Matrix\Vector;
class CholeskyDecompositionTest extends \PHPUnit\Framework\TestCase
{
- public function testComposition()
+ public function testComposition() : void
{
$A = new Matrix();
$A->setMatrix([
@@ -39,7 +39,7 @@ class CholeskyDecompositionTest extends \PHPUnit\Framework\TestCase
);
}
- public function testDecomposition()
+ public function testDecomposition() : void
{
$A = new Matrix();
$A->setMatrix([
@@ -59,7 +59,7 @@ class CholeskyDecompositionTest extends \PHPUnit\Framework\TestCase
self::assertTrue($cholesky->isSpd());
}
- public function testSolve()
+ public function testSolve() : void
{
$A = new Matrix();
$A->setMatrix([
@@ -78,7 +78,7 @@ class CholeskyDecompositionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\Math\Matrix\Exception\InvalidDimensionException
*/
- public function testInvalidDimension()
+ public function testInvalidDimension() : void
{
$A = new Matrix();
$A->setMatrix([
diff --git a/tests/Math/Matrix/EigenvalueDecompositionTest.php b/tests/Math/Matrix/EigenvalueDecompositionTest.php
index fae66a79b..aec553e9e 100644
--- a/tests/Math/Matrix/EigenvalueDecompositionTest.php
+++ b/tests/Math/Matrix/EigenvalueDecompositionTest.php
@@ -18,7 +18,7 @@ use phpOMS\Math\Matrix\Matrix;
class EigenvalueDecompositionTest extends \PHPUnit\Framework\TestCase
{
- public function testSymmetricMatrix()
+ public function testSymmetricMatrix() : void
{
$A = new Matrix();
$A->setMatrix([
@@ -45,7 +45,7 @@ class EigenvalueDecompositionTest extends \PHPUnit\Framework\TestCase
], $eig->getD()->toArray(), '', 0.2);
}
- public function testNonSymmetricMatrix()
+ public function testNonSymmetricMatrix() : void
{
$A = new Matrix();
$A->setMatrix([
@@ -72,7 +72,7 @@ class EigenvalueDecompositionTest extends \PHPUnit\Framework\TestCase
], $eig->getD()->toArray(), '', 0.2);
}
- public function testCompositeSymmetric()
+ public function testCompositeSymmetric() : void
{
$A = new Matrix();
$A->setMatrix([
@@ -92,7 +92,7 @@ class EigenvalueDecompositionTest extends \PHPUnit\Framework\TestCase
, '', 0.2);
}
- public function testCompositeNonSymmetric()
+ public function testCompositeNonSymmetric() : void
{
$A = new Matrix();
$A->setMatrix([
diff --git a/tests/Math/Matrix/Exception/InvalidDimensionExceptionTest.php b/tests/Math/Matrix/Exception/InvalidDimensionExceptionTest.php
index fe6cd09ae..951b7416a 100644
--- a/tests/Math/Matrix/Exception/InvalidDimensionExceptionTest.php
+++ b/tests/Math/Matrix/Exception/InvalidDimensionExceptionTest.php
@@ -17,7 +17,7 @@ use phpOMS\Math\Matrix\Exception\InvalidDimensionException;
class InvalidDimensionExceptionTest extends \PHPUnit\Framework\TestCase
{
- public function testException()
+ public function testException() : void
{
self::assertInstanceOf(\UnexpectedValueException::class, new InvalidDimensionException(''));
}
diff --git a/tests/Math/Matrix/IdentityMatrixTest.php b/tests/Math/Matrix/IdentityMatrixTest.php
index b13d8542b..730dc2eb0 100644
--- a/tests/Math/Matrix/IdentityMatrixTest.php
+++ b/tests/Math/Matrix/IdentityMatrixTest.php
@@ -17,7 +17,7 @@ use phpOMS\Math\Matrix\IdentityMatrix;
class IdentityMatrixTest extends \PHPUnit\Framework\TestCase
{
- public function testIdentity()
+ public function testIdentity() : void
{
$id = new IdentityMatrix(5);
self::assertEquals(
diff --git a/tests/Math/Matrix/LUDecompositionTest.php b/tests/Math/Matrix/LUDecompositionTest.php
index 145fed23e..ec82a2938 100644
--- a/tests/Math/Matrix/LUDecompositionTest.php
+++ b/tests/Math/Matrix/LUDecompositionTest.php
@@ -19,7 +19,7 @@ use phpOMS\Math\Matrix\Vector;
class LUDecompositionTest extends \PHPUnit\Framework\TestCase
{
- public function testDecomposition()
+ public function testDecomposition() : void
{
$B = new Matrix();
$B->setMatrix([
@@ -49,7 +49,7 @@ class LUDecompositionTest extends \PHPUnit\Framework\TestCase
self::assertEquals([0, 1, 2], $lu->getPivot());
}
- public function testSingularMatrix()
+ public function testSingularMatrix() : void
{
$B = new Matrix();
$B->setMatrix([
@@ -66,7 +66,7 @@ class LUDecompositionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \Exception
*/
- public function testSolveOfSingularMatrix()
+ public function testSolveOfSingularMatrix() : void
{
$B = new Matrix();
$B->setMatrix([
@@ -83,7 +83,7 @@ class LUDecompositionTest extends \PHPUnit\Framework\TestCase
$lu->solve($vec);
}
- public function testComposition()
+ public function testComposition() : void
{
$A = new Matrix();
$A->setMatrix([
@@ -106,7 +106,7 @@ class LUDecompositionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\Math\Matrix\Exception\InvalidDimensionException
*/
- public function testInvalidDimension()
+ public function testInvalidDimension() : void
{
$B = new Matrix();
$B->setMatrix([
diff --git a/tests/Math/Matrix/MatrixTest.php b/tests/Math/Matrix/MatrixTest.php
index 798b48351..514f3fb64 100644
--- a/tests/Math/Matrix/MatrixTest.php
+++ b/tests/Math/Matrix/MatrixTest.php
@@ -22,7 +22,7 @@ class MatrixTest extends \PHPUnit\Framework\TestCase
protected $B = null;
protected $C = null;
- protected function setUp()
+ protected function setUp() : void
{
$this->A = new Matrix(2, 3);
$this->A->setMatrix([
@@ -40,20 +40,20 @@ class MatrixTest extends \PHPUnit\Framework\TestCase
$this->C = $this->A->mult($this->B);
}
- public function testBase()
+ public function testBase() : void
{
self::assertEquals(2, $this->A->getM());
self::assertEquals(3, $this->A->getN());
// LU decomposition
}
- public function testMult()
+ public function testMult() : void
{
self::assertEquals([[0, -5], [-6, -7]], $this->C->getMatrix());
self::assertEquals([[0, -10], [-12, -14]], $this->C->mult(2)->getMatrix());
}
- public function testAddSub()
+ public function testAddSub() : void
{
$A = new Matrix();
$A->setMatrix([[1, 2], [3, 4]]);
@@ -68,7 +68,7 @@ class MatrixTest extends \PHPUnit\Framework\TestCase
self::assertEquals([[1 + 1, 2 + 2], [3 + 3, 4 + 4]], $A->add($B)->toArray());
}
- public function testDet()
+ public function testDet() : void
{
$B = new Matrix();
$B->setMatrix([
@@ -80,7 +80,7 @@ class MatrixTest extends \PHPUnit\Framework\TestCase
self::assertEquals(-306, $B->det());
}
- public function testSymmetry()
+ public function testSymmetry() : void
{
$B = new Matrix();
$B->setMatrix([
@@ -101,7 +101,7 @@ class MatrixTest extends \PHPUnit\Framework\TestCase
self::assertFalse($C->isSymmetric());
}
- public function testTranspose()
+ public function testTranspose() : void
{
$B = new Matrix();
$B->setMatrix([
@@ -112,7 +112,7 @@ class MatrixTest extends \PHPUnit\Framework\TestCase
self::assertEquals([[6, 4], [1, -2], [1, 5],], $B->transpose()->toArray());
}
- public function testSolve()
+ public function testSolve() : void
{
$A = new Matrix();
$A->setMatrix([
@@ -127,7 +127,7 @@ class MatrixTest extends \PHPUnit\Framework\TestCase
self::assertEquals([[1], [2], [3]], $A->solve($vec)->toArray(), '', 0.2);
}
- public function testRank()
+ public function testRank() : void
{
$B = new Matrix();
$B->setMatrix([
@@ -159,7 +159,7 @@ class MatrixTest extends \PHPUnit\Framework\TestCase
self::assertEquals(2, $B->rank());
}
- public function testInverse()
+ public function testInverse() : void
{
$A = new Matrix();
$A->setMatrix([
@@ -177,14 +177,14 @@ class MatrixTest extends \PHPUnit\Framework\TestCase
], $A->inverse()->toArray(), '', 0.2);*/
}
- public function testReduce()
+ public function testReduce() : void
{
self::assertEquals([[-6, -7], [0, -5]], $this->C->upperTriangular()->getMatrix());
//self::assertEquals([], $this->C->lowerTriangular()->getMatrix());
//self::assertEquals([], $this->C->diagonalize()->getMatrix());
}
- public function testGetSet()
+ public function testGetSet() : void
{
$id = new Matrix();
$id->setMatrix([
@@ -212,7 +212,7 @@ class MatrixTest extends \PHPUnit\Framework\TestCase
);
}
- public function testArrayAccess()
+ public function testArrayAccess() : void
{
$A = new Matrix();
$A->setMatrix([
@@ -238,7 +238,7 @@ class MatrixTest extends \PHPUnit\Framework\TestCase
self::assertFalse(isset($A[6]));
}
- public function testSubMatrix()
+ public function testSubMatrix() : void
{
$A = new Matrix();
$A->setMatrix([
@@ -272,7 +272,7 @@ class MatrixTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\Math\Matrix\Exception\InvalidDimensionException
*/
- public function testInvalidSetIndexException()
+ public function testInvalidSetIndexException() : void
{
$id = new Matrix();
$id->setMatrix([
@@ -285,7 +285,7 @@ class MatrixTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\Math\Matrix\Exception\InvalidDimensionException
*/
- public function testInvalidGetIndexException()
+ public function testInvalidGetIndexException() : void
{
$id = new Matrix();
$id->setMatrix([
@@ -298,7 +298,7 @@ class MatrixTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidSub()
+ public function testInvalidSub() : void
{
$id = new Matrix();
$id->setMatrix([
@@ -312,7 +312,7 @@ class MatrixTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidAdd()
+ public function testInvalidAdd() : void
{
$id = new Matrix();
$id->setMatrix([
@@ -326,7 +326,7 @@ class MatrixTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidMult()
+ public function testInvalidMult() : void
{
$id = new Matrix();
$id->setMatrix([
@@ -340,7 +340,7 @@ class MatrixTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\Math\Matrix\Exception\InvalidDimensionException
*/
- public function testInvalidDimensionAdd()
+ public function testInvalidDimensionAdd() : void
{
$A = new Matrix();
$A->setMatrix([[1, 2], [3, 4]]);
@@ -354,7 +354,7 @@ class MatrixTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\Math\Matrix\Exception\InvalidDimensionException
*/
- public function testInvalidDimensionSub()
+ public function testInvalidDimensionSub() : void
{
$A = new Matrix();
$A->setMatrix([[1, 2], [3, 4]]);
diff --git a/tests/Math/Matrix/QRDecompositionTest.php b/tests/Math/Matrix/QRDecompositionTest.php
index b1a801502..c79b02e2f 100644
--- a/tests/Math/Matrix/QRDecompositionTest.php
+++ b/tests/Math/Matrix/QRDecompositionTest.php
@@ -19,7 +19,7 @@ use phpOMS\Math\Matrix\Vector;
class QRDecompositionTest extends \PHPUnit\Framework\TestCase
{
- public function testDecomposition()
+ public function testDecomposition() : void
{
$A = new Matrix();
$A->setMatrix([
@@ -45,7 +45,7 @@ class QRDecompositionTest extends \PHPUnit\Framework\TestCase
], $QR->getR()->toArray(), '', 0.2);
}
- public function testComposition()
+ public function testComposition() : void
{
$A = new Matrix();
$A->setMatrix([
@@ -65,7 +65,7 @@ class QRDecompositionTest extends \PHPUnit\Framework\TestCase
);
}
- public function testSolve()
+ public function testSolve() : void
{
$A = new Matrix();
$A->setMatrix([
diff --git a/tests/Math/Matrix/SingularValueDecompositionTest.php b/tests/Math/Matrix/SingularValueDecompositionTest.php
index 00819cb13..4b72ceb0c 100644
--- a/tests/Math/Matrix/SingularValueDecompositionTest.php
+++ b/tests/Math/Matrix/SingularValueDecompositionTest.php
@@ -18,7 +18,7 @@ use phpOMS\Math\Matrix\SingularValueDecomposition;
class SingularValueDecompositionTest extends \PHPUnit\Framework\TestCase
{
- public function testDecomposition()
+ public function testDecomposition() : void
{
$A = new Matrix();
$A->setMatrix([
@@ -48,7 +48,7 @@ class SingularValueDecompositionTest extends \PHPUnit\Framework\TestCase
], $svd->getV()->toArray(), '', 0.2);
}
- public function testComposition()
+ public function testComposition() : void
{
$A = new Matrix();
$A->setMatrix([
diff --git a/tests/Math/Matrix/VectorTest.php b/tests/Math/Matrix/VectorTest.php
index ac9632c03..2e348da2f 100644
--- a/tests/Math/Matrix/VectorTest.php
+++ b/tests/Math/Matrix/VectorTest.php
@@ -17,7 +17,7 @@ use phpOMS\Math\Matrix\Vector;
class VectorTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
self::assertInstanceOf('\phpOMS\Math\Matrix\Vector', new Vector());
diff --git a/tests/Math/Number/ComplexTest.php b/tests/Math/Number/ComplexTest.php
index e8621da5a..4a110d4ce 100644
--- a/tests/Math/Number/ComplexTest.php
+++ b/tests/Math/Number/ComplexTest.php
@@ -17,7 +17,7 @@ use phpOMS\Math\Number\Complex;
class ComplexTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
$cpl = new Complex();
self::assertEquals(0, $cpl->re());
@@ -25,14 +25,14 @@ class ComplexTest extends \PHPUnit\Framework\TestCase
self::assertEquals('', $cpl->render());
}
- public function testSetGet()
+ public function testSetGet() : void
{
$cpl = new Complex(1, 2);
self::assertEquals(1, $cpl->re());
self::assertEquals(2, $cpl->im());
}
- public function testAdd()
+ public function testAdd() : void
{
$cpl1 = new Complex(2, 3);
$cpl2 = new Complex(3, 4);
@@ -41,7 +41,7 @@ class ComplexTest extends \PHPUnit\Framework\TestCase
self::assertEquals('6.00 + 3.00i', $cpl1->add(4)->render());
}
- public function testSub()
+ public function testSub() : void
{
$cpl1 = new Complex(2, 3);
$cpl2 = new Complex(3, 4);
@@ -50,7 +50,7 @@ class ComplexTest extends \PHPUnit\Framework\TestCase
self::assertEquals('-2.00 + 3.00i', $cpl1->sub(4)->render());
}
- public function testMult()
+ public function testMult() : void
{
$cpl1 = new Complex(2, 3);
$cpl2 = new Complex(3, 4);
@@ -59,7 +59,7 @@ class ComplexTest extends \PHPUnit\Framework\TestCase
self::assertEquals('8.00 + 12.00i', $cpl1->mult(4)->render());
}
- public function testDiv()
+ public function testDiv() : void
{
$cpl1 = new Complex(2, 3);
$cpl2 = new Complex(3, 4);
@@ -68,21 +68,21 @@ class ComplexTest extends \PHPUnit\Framework\TestCase
self::assertEquals('0.50 + 0.75i', $cpl1->div(4)->render(2));
}
- public function testConjugate()
+ public function testConjugate() : void
{
$cpl = new Complex(4, 3);
self::assertEquals('4 - 3i', $cpl->conjugate()->render(0));
}
- public function testReciprocal()
+ public function testReciprocal() : void
{
$cpl = new Complex(4, 3);
self::assertEquals('0.16 - 0.12i', $cpl->reciprocal()->render(2));
}
- public function testPower()
+ public function testPower() : void
{
$cpl = new Complex(4, 3);
@@ -91,14 +91,14 @@ class ComplexTest extends \PHPUnit\Framework\TestCase
self::assertEquals('-44.00 + 117.00i', $cpl->pow(3)->render());
}
- public function testAbs()
+ public function testAbs() : void
{
$cpl = new Complex(4, 3);
self::assertEquals(5, $cpl->abs(), '', 0.01);
}
- public function testSqrt()
+ public function testSqrt() : void
{
$cpl = new Complex(4, 3);
self::assertEquals('2.12 + 0.71i', $cpl->sqrt()->render());
@@ -110,7 +110,7 @@ class ComplexTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidAdd()
+ public function testInvalidAdd() : void
{
$cpl = new Complex(4, 3);
$cpl->add(true);
@@ -119,7 +119,7 @@ class ComplexTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidSub()
+ public function testInvalidSub() : void
{
$cpl = new Complex(4, 3);
$cpl->sub(true);
@@ -128,7 +128,7 @@ class ComplexTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidMult()
+ public function testInvalidMult() : void
{
$cpl = new Complex(4, 3);
$cpl->mult(true);
@@ -137,7 +137,7 @@ class ComplexTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidDiv()
+ public function testInvalidDiv() : void
{
$cpl = new Complex(4, 3);
$cpl->div(true);
@@ -146,7 +146,7 @@ class ComplexTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidPow()
+ public function testInvalidPow() : void
{
$cpl = new Complex(4, 3);
$cpl->pow(true);
diff --git a/tests/Math/Number/IntegerTest.php b/tests/Math/Number/IntegerTest.php
index d2f26660e..36c561af7 100644
--- a/tests/Math/Number/IntegerTest.php
+++ b/tests/Math/Number/IntegerTest.php
@@ -17,21 +17,21 @@ use phpOMS\Math\Number\Integer;
class IntegerTest extends \PHPUnit\Framework\TestCase
{
- public function testIsInteger()
+ public function testIsInteger() : void
{
self::assertTrue(Integer::isInteger(4));
self::assertFalse(Integer::isInteger(1.0));
self::assertFalse(Integer::isInteger('3'));
}
- public function testFactorization()
+ public function testFactorization() : void
{
self::assertArraySubset([2, 2, 5, 5], Integer::trialFactorization(100));
self::assertArraySubset([2], Integer::trialFactorization(2));
self::assertEquals([], Integer::trialFactorization(1));
}
- public function testOther()
+ public function testOther() : void
{
self::assertEquals(101, Integer::pollardsRho(10403, 2, 1, 2, 2));
@@ -41,12 +41,12 @@ class IntegerTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \Exception
*/
- public function testInvalidFermatParameter()
+ public function testInvalidFermatParameter() : void
{
Integer::fermatFactor(8);
}
- public function testGCD()
+ public function testGCD() : void
{
self::assertEquals(4, Integer::greatestCommonDivisor(4, 4));
self::assertEquals(6, Integer::greatestCommonDivisor(54, 24));
diff --git a/tests/Math/Number/NaturalTest.php b/tests/Math/Number/NaturalTest.php
index dd509c0e9..d730499c8 100644
--- a/tests/Math/Number/NaturalTest.php
+++ b/tests/Math/Number/NaturalTest.php
@@ -17,7 +17,7 @@ use phpOMS\Math\Number\Natural;
class NaturalTest extends \PHPUnit\Framework\TestCase
{
- public function testIsNatural()
+ public function testIsNatural() : void
{
self::assertTrue(Natural::isNatural(1235));
self::assertTrue(Natural::isNatural(0));
diff --git a/tests/Math/Number/NumberTypeTest.php b/tests/Math/Number/NumberTypeTest.php
index 1b6d93006..d7b857ddf 100644
--- a/tests/Math/Number/NumberTypeTest.php
+++ b/tests/Math/Number/NumberTypeTest.php
@@ -17,7 +17,7 @@ use phpOMS\Math\Number\NumberType;
class NumberTypeTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(9, \count(NumberType::getConstants()));
self::assertEquals(NumberType::getConstants(), array_unique(NumberType::getConstants()));
diff --git a/tests/Math/Number/NumbersTest.php b/tests/Math/Number/NumbersTest.php
index b4fdd0c71..7884ba952 100644
--- a/tests/Math/Number/NumbersTest.php
+++ b/tests/Math/Number/NumbersTest.php
@@ -17,7 +17,7 @@ use phpOMS\Math\Number\Numbers;
class NumbersTest extends \PHPUnit\Framework\TestCase
{
- public function testPerfect()
+ public function testPerfect() : void
{
self::assertTrue(Numbers::isPerfect(496));
self::assertTrue(Numbers::isPerfect(8128));
@@ -25,21 +25,21 @@ class NumbersTest extends \PHPUnit\Framework\TestCase
self::assertFalse(Numbers::isPerfect(100));
}
- public function testSelfdescribing()
+ public function testSelfdescribing() : void
{
self::assertFalse(Numbers::isSelfdescribing(2029));
self::assertTrue(Numbers::isSelfdescribing(21200));
self::assertTrue(Numbers::isSelfdescribing(3211000));
}
- public function testSquare()
+ public function testSquare() : void
{
self::assertTrue(Numbers::isSquare(81));
self::assertTrue(Numbers::isSquare(6561));
self::assertFalse(Numbers::isSquare(5545348));
}
- public function testZeroCounting()
+ public function testZeroCounting() : void
{
self::assertEquals(3, Numbers::countTrailingZeros(1000));
self::assertEquals(5, Numbers::countTrailingZeros(12300000));
diff --git a/tests/Math/Number/PrimeTest.php b/tests/Math/Number/PrimeTest.php
index f6367ac27..b2b63053f 100644
--- a/tests/Math/Number/PrimeTest.php
+++ b/tests/Math/Number/PrimeTest.php
@@ -17,20 +17,20 @@ use phpOMS\Math\Number\Prime;
class PrimeTest extends \PHPUnit\Framework\TestCase
{
- public function testPrime()
+ public function testPrime() : void
{
self::assertTrue(Prime::isPrime(2));
self::assertTrue(Prime::isPrime(997));
self::assertFalse(Prime::isPrime(998));
}
- public function testSieve()
+ public function testSieve() : void
{
self::assertTrue(Prime::isPrime(Prime::sieveOfEratosthenes(12)[3]));
self::assertTrue(Prime::isPrime(Prime::sieveOfEratosthenes(51)[7]));
}
- public function testRabin()
+ public function testRabin() : void
{
self::assertTrue(Prime::rabinTest(2));
self::assertFalse(Prime::rabinTest(4));
@@ -39,7 +39,7 @@ class PrimeTest extends \PHPUnit\Framework\TestCase
self::assertFalse(Prime::rabinTest(998));
}
- public function testMersenne()
+ public function testMersenne() : void
{
self::assertEquals(2047, Prime::mersenne(11));
self::assertTrue(Prime::isMersenne(Prime::mersenne(2)));
diff --git a/tests/Math/Numerics/Interpolation/CubicSplineInterpolationTest.php b/tests/Math/Numerics/Interpolation/CubicSplineInterpolationTest.php
index 509d4b1c7..57f12fc64 100644
--- a/tests/Math/Numerics/Interpolation/CubicSplineInterpolationTest.php
+++ b/tests/Math/Numerics/Interpolation/CubicSplineInterpolationTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Math\Numerics\Interpolation;
class CubicSplineInterpolationTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Math/Numerics/Interpolation/LinearInterpolationTest.php b/tests/Math/Numerics/Interpolation/LinearInterpolationTest.php
index 9cbd854c7..e11b0c6bf 100644
--- a/tests/Math/Numerics/Interpolation/LinearInterpolationTest.php
+++ b/tests/Math/Numerics/Interpolation/LinearInterpolationTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Math\Numerics\Interpolation;
class LinearInterpolationTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Math/Numerics/Interpolation/PolynomialInterpolationTest.php b/tests/Math/Numerics/Interpolation/PolynomialInterpolationTest.php
index 4f6fd6944..13aa0d0c8 100644
--- a/tests/Math/Numerics/Interpolation/PolynomialInterpolationTest.php
+++ b/tests/Math/Numerics/Interpolation/PolynomialInterpolationTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Math\Numerics\Interpolation;
class PolynomialInterpolationTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Math/Parser/EvaluatorTest.php b/tests/Math/Parser/EvaluatorTest.php
index 047fce49e..aa51663ab 100644
--- a/tests/Math/Parser/EvaluatorTest.php
+++ b/tests/Math/Parser/EvaluatorTest.php
@@ -17,7 +17,7 @@ use phpOMS\Math\Parser\Evaluator;
class EvaluatorTest extends \PHPUnit\Framework\TestCase
{
- public function testBasicEvaluation()
+ public function testBasicEvaluation() : void
{
self::assertEquals(4.5, Evaluator::evaluate('3 + 4 * 2 / ( 1 - 5 ) ^ 2 ^ 3 + 1.5'), '', 2);
self::assertEquals(4.5, Evaluator::evaluate('3+4*2/(1-5)^2^3+1.5'), '', 2);
diff --git a/tests/Math/Statistic/AverageTest.php b/tests/Math/Statistic/AverageTest.php
index dba7cbbb3..a5a7c4626 100644
--- a/tests/Math/Statistic/AverageTest.php
+++ b/tests/Math/Statistic/AverageTest.php
@@ -17,12 +17,12 @@ use phpOMS\Math\Statistic\Average;
class AverageTest extends \PHPUnit\Framework\TestCase
{
- public function testAverage()
+ public function testAverage() : void
{
self::assertEquals(-3 / 2, Average::averageDatasetChange([6, 7, 6, 3, 0]));
}
- public function testAngleMean()
+ public function testAngleMean() : void
{
self::assertEquals(-90, Average::angleMean([90.0, 180.0, 270.0, 360.0]), '', 0.01);
self::assertEquals(9.999999999999977, Average::angleMean([370.0]), '', 0.01);
@@ -31,12 +31,12 @@ class AverageTest extends \PHPUnit\Framework\TestCase
self::assertEquals(9.999999999999977, Average::angleMean2([370.0]), '', 0.01);
}
- public function testArithmeticMean()
+ public function testArithmeticMean() : void
{
self::assertEquals(4, Average::arithmeticMean([1, 2, 3, 4, 5, 6, 7]), '', 0.01);
}
- public function testWeightedAverage()
+ public function testWeightedAverage() : void
{
self::assertEquals(69 / 20, Average::weightedAverage(
[1, 2, 3, 4, 5, 6, 7],
@@ -44,17 +44,17 @@ class AverageTest extends \PHPUnit\Framework\TestCase
), '', 0.01);
}
- public function testGeometricMean()
+ public function testGeometricMean() : void
{
self::assertEquals(3.3800151591413, Average::geometricMean([1, 2, 3, 4, 5, 6, 7]), '', 0.01);
}
- public function testHarmonicMean()
+ public function testHarmonicMean() : void
{
self::assertEquals(2.6997245179063, Average::harmonicMean([1, 2, 3, 4, 5, 6, 7]), '', 0.01);
}
- public function testMovingAverage()
+ public function testMovingAverage() : void
{
$data = [
67.5, 66.5, 66.44, 66.44, 66.25, 65.88, 66.63, 66.56, 65.63, 66.06,
@@ -69,7 +69,7 @@ class AverageTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException phpOMS\Math\Matrix\Exception\InvalidDimensionException
*/
- public function testInvalidWeightedAverageDimension()
+ public function testInvalidWeightedAverageDimension() : void
{
Average::weightedAverage([1, 2, 3, 4, 5, 6, 7], [0.1, 0.2, 0.3, 0.1, 0.2, 0.05]);
}
@@ -77,7 +77,7 @@ class AverageTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException phpOMS\Math\Exception\ZeroDevisionException
*/
- public function testInvalidArithmeticMeanZeroDevision()
+ public function testInvalidArithmeticMeanZeroDevision() : void
{
Average::arithmeticMean([]);
}
@@ -85,7 +85,7 @@ class AverageTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException phpOMS\Math\Exception\ZeroDevisionException
*/
- public function testInvalidGeometricMean()
+ public function testInvalidGeometricMean() : void
{
Average::geometricMean([]);
}
@@ -93,17 +93,17 @@ class AverageTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException phpOMS\Math\Exception\ZeroDevisionException
*/
- public function testInvalidHarmonicMean()
+ public function testInvalidHarmonicMean() : void
{
Average::harmonicMean([1, 2, 3, 0, 5, 6, 7]);
}
- public function testMode()
+ public function testMode() : void
{
self::assertEquals(2, Average::mode([1, 2, 2, 3, 4, 4, 2]), '', 0.01);
}
- public function testMedia()
+ public function testMedia() : void
{
self::assertEquals(4, Average::median([1, 2, 3, 4, 5, 6, 7]), '', 0.01);
self::assertEquals(3.5, Average::median([1, 2, 3, 4, 5, 6]), '', 0.01);
diff --git a/tests/Math/Statistic/BasicTest.php b/tests/Math/Statistic/BasicTest.php
index d0403aae9..2e34d3fcc 100644
--- a/tests/Math/Statistic/BasicTest.php
+++ b/tests/Math/Statistic/BasicTest.php
@@ -17,7 +17,7 @@ use phpOMS\Math\Statistic\Basic;
class BasicTest extends \PHPUnit\Framework\TestCase
{
- public function testFrequency()
+ public function testFrequency() : void
{
self::assertEquals(
[1 / 10, 2 / 10, 3 / 10, 4 / 10],
diff --git a/tests/Math/Statistic/CorrelationTest.php b/tests/Math/Statistic/CorrelationTest.php
index 623316e53..5835b1819 100644
--- a/tests/Math/Statistic/CorrelationTest.php
+++ b/tests/Math/Statistic/CorrelationTest.php
@@ -17,7 +17,7 @@ use phpOMS\Math\Statistic\Correlation;
class CorrelationTest extends \PHPUnit\Framework\TestCase
{
- public function testBravisPersonCorrelationCoefficient()
+ public function testBravisPersonCorrelationCoefficient() : void
{
self::assertEquals(
0.8854,
@@ -28,7 +28,7 @@ class CorrelationTest extends \PHPUnit\Framework\TestCase
);
}
- public function testAutocorrelationCoefficient()
+ public function testAutocorrelationCoefficient() : void
{
$data = [
1, 20, 31, 8, 40, 41, 46, 89, 72, 45, 81, 93,
@@ -41,7 +41,7 @@ class CorrelationTest extends \PHPUnit\Framework\TestCase
self::assertEquals(0.098, Correlation::autocorrelationCoefficient($data, 2), '', 0.01);
}
- public function testPortmanteauTest()
+ public function testPortmanteauTest() : void
{
$data = [
1, 20, 31, 8, 40, 41, 46, 89, 72, 45, 81, 93,
diff --git a/tests/Math/Statistic/Forecast/ErrorTest.php b/tests/Math/Statistic/Forecast/ErrorTest.php
index f4b4c3f55..2b42902dd 100644
--- a/tests/Math/Statistic/Forecast/ErrorTest.php
+++ b/tests/Math/Statistic/Forecast/ErrorTest.php
@@ -17,7 +17,7 @@ use phpOMS\Math\Statistic\Forecast\Error;
class ErrorTest extends \PHPUnit\Framework\TestCase
{
- public function testForecastError()
+ public function testForecastError() : void
{
self::assertEquals(1000 - 700, Error::getForecastError(1000, 700));
self::assertEquals(
@@ -36,7 +36,7 @@ class ErrorTest extends \PHPUnit\Framework\TestCase
self::assertEquals([Error::getForecastError(1000, 700)], Error::getForecastErrorArray([1000], [700]));
}
- public function testErrorPercentage()
+ public function testErrorPercentage() : void
{
self::assertEquals(300 / 1000, Error::getPercentageError(300, 1000), '', 0.01);
self::assertEquals(
@@ -56,7 +56,7 @@ class ErrorTest extends \PHPUnit\Framework\TestCase
);
}
- public function testMeanError()
+ public function testMeanError() : void
{
$errors = [
400 - 300,
@@ -70,7 +70,7 @@ class ErrorTest extends \PHPUnit\Framework\TestCase
self::assertEquals(406.2019, Error::getRootMeanSquaredError($errors), '', 0.01);
}
- public function testMASE()
+ public function testMASE() : void
{
$observed = [
-2.9, -2.83, -0.95, -0.88, 1.21, -1.67, 0.83, -0.27, 1.36,
@@ -88,7 +88,7 @@ class ErrorTest extends \PHPUnit\Framework\TestCase
self::assertEquals(0.0983, Error::getMeanAbsoluteScaledError($scaledErrors), '', 0.01);
}
- public function testScaledError()
+ public function testScaledError() : void
{
self::assertEquals(
[Error::getScaledError(Error::getForecastError(1000, 700), [1000, 800])],
diff --git a/tests/Math/Statistic/Forecast/Regression/LevelLevelRegressionTest.php b/tests/Math/Statistic/Forecast/Regression/LevelLevelRegressionTest.php
index a97a3f36c..b12315f31 100644
--- a/tests/Math/Statistic/Forecast/Regression/LevelLevelRegressionTest.php
+++ b/tests/Math/Statistic/Forecast/Regression/LevelLevelRegressionTest.php
@@ -19,7 +19,7 @@ class LevelLevelRegressionTest extends \PHPUnit\Framework\TestCase
{
protected $reg = null;
- protected function setUp()
+ protected function setUp() : void
{
// y = 3 + 4 * x
$x = [0, 1, 2, 3, 4];
@@ -28,17 +28,17 @@ class LevelLevelRegressionTest extends \PHPUnit\Framework\TestCase
$this->reg = LevelLevelRegression::getRegression($x, $y);
}
- public function testRegression()
+ public function testRegression() : void
{
self::assertEquals(['b0' => 3, 'b1' => 4], $this->reg, '', 0.2);
}
- public function testSlope()
+ public function testSlope() : void
{
self::assertEquals(4, LevelLevelRegression::getSlope($this->reg['b1'], 0, 0));
}
- public function testElasticity()
+ public function testElasticity() : void
{
self::assertEquals(0.7273, LevelLevelRegression::getElasticity($this->reg['b1'], 11, 2), '', 0.01);
}
@@ -46,7 +46,7 @@ class LevelLevelRegressionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\Math\Matrix\Exception\InvalidDimensionException
*/
- public function testInvalidDimension()
+ public function testInvalidDimension() : void
{
$x = [1,2, 3];
$y = [1,2, 3, 4];
diff --git a/tests/Math/Statistic/Forecast/Regression/LevelLogRegressionTest.php b/tests/Math/Statistic/Forecast/Regression/LevelLogRegressionTest.php
index 38dbe8e18..776dcad5d 100644
--- a/tests/Math/Statistic/Forecast/Regression/LevelLogRegressionTest.php
+++ b/tests/Math/Statistic/Forecast/Regression/LevelLogRegressionTest.php
@@ -19,7 +19,7 @@ class LevelLogRegressionTest extends \PHPUnit\Framework\TestCase
{
protected $reg = null;
- protected function setUp()
+ protected function setUp() : void
{
// y = 1 + log(x)
$x = [0.25, 0.5, 1, 1.5];
@@ -28,18 +28,18 @@ class LevelLogRegressionTest extends \PHPUnit\Framework\TestCase
$this->reg = LevelLogRegression::getRegression($x, $y);
}
- public function testRegression()
+ public function testRegression() : void
{
self::assertEquals(['b0' => 1, 'b1' => 1], $this->reg, '', 0.2);
}
- public function testSlope()
+ public function testSlope() : void
{
$x = 2;
self::assertEquals($this->reg['b1'] / $x, LevelLogRegression::getSlope($this->reg['b1'], 0, $x), '', 0.2);
}
- public function testElasticity()
+ public function testElasticity() : void
{
$y = 3;
self::assertEquals($this->reg['b1'] / $y, LevelLogRegression::getElasticity($this->reg['b1'], $y, 0), '', 0.2);
@@ -48,7 +48,7 @@ class LevelLogRegressionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\Math\Matrix\Exception\InvalidDimensionException
*/
- public function testInvalidDimension()
+ public function testInvalidDimension() : void
{
$x = [1,2, 3];
$y = [1,2, 3, 4];
diff --git a/tests/Math/Statistic/Forecast/Regression/LogLevelRegressionTest.php b/tests/Math/Statistic/Forecast/Regression/LogLevelRegressionTest.php
index 89f11dabf..8609b1262 100644
--- a/tests/Math/Statistic/Forecast/Regression/LogLevelRegressionTest.php
+++ b/tests/Math/Statistic/Forecast/Regression/LogLevelRegressionTest.php
@@ -19,7 +19,7 @@ class LogLevelRegressionTest extends \PHPUnit\Framework\TestCase
{
protected $reg = null;
- protected function setUp()
+ protected function setUp() : void
{
// ln(y) = -1 + 2 * x => y = e^(-1 + 2 * x)
$x = [0.25, 0.5, 1, 1.5];
@@ -28,18 +28,18 @@ class LogLevelRegressionTest extends \PHPUnit\Framework\TestCase
$this->reg = LogLevelRegression::getRegression($x, $y);
}
- public function testRegression()
+ public function testRegression() : void
{
self::assertEquals(['b0' => -1, 'b1' => 2], $this->reg, '', 0.2);
}
- public function testSlope()
+ public function testSlope() : void
{
$y = 3;
self::assertEquals($this->reg['b1'] * $y, LogLevelRegression::getSlope($this->reg['b1'], $y, 0), '', 0.2);
}
- public function testElasticity()
+ public function testElasticity() : void
{
$x = 2;
self::assertEquals($this->reg['b1'] * $x, LogLevelRegression::getElasticity($this->reg['b1'], 0, $x), '', 0.2);
@@ -48,7 +48,7 @@ class LogLevelRegressionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\Math\Matrix\Exception\InvalidDimensionException
*/
- public function testInvalidDimension()
+ public function testInvalidDimension() : void
{
$x = [1,2, 3];
$y = [1,2, 3, 4];
diff --git a/tests/Math/Statistic/Forecast/Regression/LogLogRegressionTest.php b/tests/Math/Statistic/Forecast/Regression/LogLogRegressionTest.php
index 6b9f7329a..27e672237 100644
--- a/tests/Math/Statistic/Forecast/Regression/LogLogRegressionTest.php
+++ b/tests/Math/Statistic/Forecast/Regression/LogLogRegressionTest.php
@@ -19,7 +19,7 @@ class LogLogRegressionTest extends \PHPUnit\Framework\TestCase
{
protected $reg = null;
- protected function setUp()
+ protected function setUp() : void
{
// ln(y) = 2 + 3 * ln(x) => y = e^(2 + 3 * ln(x))
$x = [0.25, 0.5, 1, 1.5];
@@ -28,19 +28,19 @@ class LogLogRegressionTest extends \PHPUnit\Framework\TestCase
$this->reg = LogLogRegression::getRegression($x, $y);
}
- public function testRegression()
+ public function testRegression() : void
{
self::assertEquals(['b0' => 2, 'b1' => 3], $this->reg, '', 0.2);
}
- public function testSlope()
+ public function testSlope() : void
{
$y = 3;
$x = 2;
self::assertEquals($this->reg['b1'] * $y / $x, LogLogRegression::getSlope($this->reg['b1'], $y, $x), '', 0.2);
}
- public function testElasticity()
+ public function testElasticity() : void
{
self::assertEquals($this->reg['b1'], LogLogRegression::getElasticity($this->reg['b1'], 0, 0), '', 0.2);
}
@@ -48,7 +48,7 @@ class LogLogRegressionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\Math\Matrix\Exception\InvalidDimensionException
*/
- public function testInvalidDimension()
+ public function testInvalidDimension() : void
{
$x = [1,2, 3];
$y = [1,2, 3, 4];
diff --git a/tests/Math/Statistic/MeasureOfDispersionTest.php b/tests/Math/Statistic/MeasureOfDispersionTest.php
index 5458973bd..37ef15317 100644
--- a/tests/Math/Statistic/MeasureOfDispersionTest.php
+++ b/tests/Math/Statistic/MeasureOfDispersionTest.php
@@ -17,17 +17,17 @@ use phpOMS\Math\Statistic\MeasureOfDispersion;
class MeasureOfDispersionTest extends \PHPUnit\Framework\TestCase
{
- public function testRange()
+ public function testRange() : void
{
self::assertEquals((float) (9 - 1), MeasureOfDispersion::range([4, 5, 9, 1, 3]));
}
- public function testStandardDeviation()
+ public function testStandardDeviation() : void
{
self::assertEquals(2.160246, MeasureOfDispersion::standardDeviation([1, 2, 3, 4, 5, 6, 7]), '', 0.01);
}
- public function testEmpiricalCovariance()
+ public function testEmpiricalCovariance() : void
{
self::assertEquals(
4.667,
@@ -38,25 +38,25 @@ class MeasureOfDispersionTest extends \PHPUnit\Framework\TestCase
);
}
- public function testVariance()
+ public function testVariance() : void
{
self::assertEquals(6219.9, MeasureOfDispersion::sampleVariance([3, 21, 98, 203, 17, 9]), '', 0.01);
self::assertEquals(5183.25, MeasureOfDispersion::empiricalVariance([3, 21, 98, 203, 17, 9]), '', 0.01);
}
- public function testDeviation()
+ public function testDeviation() : void
{
self::assertEquals(0.0, MeasureOfDispersion::meanDeviation([3, 4, 5, 9, 7, 8, 9]), '', 0.01);
self::assertEquals(2.0816, MeasureOfDispersion::meanAbsoluteDeviation([3, 4, 5, 9, 7, 8, 9]), '', 0.01);
self::assertEquals((12.96 + 2.56 + 0.36 + 5.76 + 11.56) / 5, MeasureOfDispersion::squaredMeanDeviation([1, 3, 4, 7, 8]), '', 0.01);
}
- public function testEmpiricalVariationCoefficient()
+ public function testEmpiricalVariationCoefficient() : void
{
self::assertEquals(0.5400, MeasureOfDispersion::empiricalVariationCoefficient([1, 2, 3, 4, 5, 6, 7]), '', 0.01);
}
- public function testIQR()
+ public function testIQR() : void
{
$x = [7, 7, 31, 31, 47, 75, 87, 115, 116, 119, 119, 155, 177];
self::assertEquals(88, MeasureOfDispersion::getIQR($x));
@@ -65,7 +65,7 @@ class MeasureOfDispersionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException phpOMS\Math\Exception\ZeroDevisionException
*/
- public function testInvalidEmpiricalVariationCoefficient()
+ public function testInvalidEmpiricalVariationCoefficient() : void
{
MeasureOfDispersion::empiricalVariationCoefficient([1, 2, 3, 4, 5, 6, 7], 0);
}
@@ -73,7 +73,7 @@ class MeasureOfDispersionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException phpOMS\Math\Exception\ZeroDevisionException
*/
- public function testInvalidEmpiricalCovariance()
+ public function testInvalidEmpiricalCovariance() : void
{
MeasureOfDispersion::empiricalCovariance([], []);
}
@@ -81,7 +81,7 @@ class MeasureOfDispersionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException phpOMS\Math\Matrix\Exception\InvalidDimensionException
*/
- public function testInvalidEmpiricalCovarianceDimension()
+ public function testInvalidEmpiricalCovarianceDimension() : void
{
MeasureOfDispersion::empiricalCovariance([1, 2, 3, 4], [1, 2, 3]);
}
@@ -89,7 +89,7 @@ class MeasureOfDispersionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException phpOMS\Math\Exception\ZeroDevisionException
*/
- public function testInvalidSampleVariance()
+ public function testInvalidSampleVariance() : void
{
MeasureOfDispersion::sampleVariance([]);
}
@@ -97,7 +97,7 @@ class MeasureOfDispersionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException phpOMS\Math\Exception\ZeroDevisionException
*/
- public function testInvalidEmpiricalVariance()
+ public function testInvalidEmpiricalVariance() : void
{
MeasureOfDispersion::empiricalVariance([]);
}
diff --git a/tests/Math/Stochastic/Distribution/BernoulliDistributionTest.php b/tests/Math/Stochastic/Distribution/BernoulliDistributionTest.php
index 56374c82a..a7cfcd6c5 100644
--- a/tests/Math/Stochastic/Distribution/BernoulliDistributionTest.php
+++ b/tests/Math/Stochastic/Distribution/BernoulliDistributionTest.php
@@ -17,39 +17,39 @@ use phpOMS\Math\Stochastic\Distribution\BernoulliDistribution;
class BernoulliDistributionTest extends \PHPUnit\Framework\TestCase
{
- public function testPmf()
+ public function testPmf() : void
{
self::assertEquals(0.3, BernoulliDistribution::getPmf(0.7, 0), '', 0.01);
self::assertEquals(0.7, BernoulliDistribution::getPmf(0.7, 1), '', 0.01);
}
- public function testMode()
+ public function testMode() : void
{
self::assertEquals(1, BernoulliDistribution::getMode(0.7), '', 0.01);
self::assertEquals(0, BernoulliDistribution::getMode(0.5), '', 0.01);
self::assertEquals(0, BernoulliDistribution::getMode(0.3), '', 0.01);
}
- public function testMean()
+ public function testMean() : void
{
self::assertEquals(0.4, BernoulliDistribution::getMean(0.4), '', 0.01);
}
- public function testCdf()
+ public function testCdf() : void
{
self::assertEquals(0, BernoulliDistribution::getCdf(0.4, -2), '', 0.01);
self::assertEquals(1, BernoulliDistribution::getCdf(0.4, 2), '', 0.01);
self::assertEquals(0.3, BernoulliDistribution::getCdf(0.7, 0.4), '', 0.01);
}
- public function testMedian()
+ public function testMedian() : void
{
self::assertEquals(0.5, BernoulliDistribution::getMedian(0.5), '', 0.01);
self::assertEquals(1, BernoulliDistribution::getMedian(0.7), '', 0.01);
self::assertEquals(0, BernoulliDistribution::getMedian(0.3), '', 0.01);
}
- public function testVariance()
+ public function testVariance() : void
{
$p = 0.3;
$q = 1 - $p;
@@ -57,7 +57,7 @@ class BernoulliDistributionTest extends \PHPUnit\Framework\TestCase
self::assertEquals($p * $q, BernoulliDistribution::getVariance($p), '', 0.01);
}
- public function testSkewness()
+ public function testSkewness() : void
{
$p = 0.3;
$q = 1 - $p;
@@ -65,7 +65,7 @@ class BernoulliDistributionTest extends \PHPUnit\Framework\TestCase
self::assertEquals((1 - 2 * $p) / \sqrt($p * $q), BernoulliDistribution::getSkewness($p), '', 0.01);
}
- public function testExKurtosis()
+ public function testExKurtosis() : void
{
$p = 0.3;
$q = 1 - $p;
@@ -73,7 +73,7 @@ class BernoulliDistributionTest extends \PHPUnit\Framework\TestCase
self::assertEquals((1 - 6 * $p * $q) / ($p * $q), BernoulliDistribution::getExKurtosis($p), '', 0.01);
}
- public function testEntropy()
+ public function testEntropy() : void
{
$p = 0.3;
$q = 1 - $p;
@@ -81,7 +81,7 @@ class BernoulliDistributionTest extends \PHPUnit\Framework\TestCase
self::assertEquals(-$q * \log($q) - $p * \log($p), BernoulliDistribution::getEntropy($p), '', 0.01);
}
- public function testMgf()
+ public function testMgf() : void
{
$p = 0.3;
$q = 1 - $p;
@@ -90,7 +90,7 @@ class BernoulliDistributionTest extends \PHPUnit\Framework\TestCase
self::assertEquals($q + $p * \exp($t), BernoulliDistribution::getMgf($p, $t), '', 0.01);
}
- public function testFisherInformation()
+ public function testFisherInformation() : void
{
$p = 0.3;
$q = 1 - $p;
diff --git a/tests/Math/Stochastic/Distribution/BetaDistributionTest.php b/tests/Math/Stochastic/Distribution/BetaDistributionTest.php
index 855410a78..958453135 100644
--- a/tests/Math/Stochastic/Distribution/BetaDistributionTest.php
+++ b/tests/Math/Stochastic/Distribution/BetaDistributionTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Math\Stochastic\Distribution;
class BetaDistributionTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Math/Stochastic/Distribution/BinomialDistributionTest.php b/tests/Math/Stochastic/Distribution/BinomialDistributionTest.php
index b2c08da01..c07408c0c 100644
--- a/tests/Math/Stochastic/Distribution/BinomialDistributionTest.php
+++ b/tests/Math/Stochastic/Distribution/BinomialDistributionTest.php
@@ -17,7 +17,7 @@ use phpOMS\Math\Stochastic\Distribution\BinomialDistribution;
class BinomialDistributionTest extends \PHPUnit\Framework\TestCase
{
- public function testPmf()
+ public function testPmf() : void
{
$p = 0.4;
$n = 20;
@@ -26,7 +26,7 @@ class BinomialDistributionTest extends \PHPUnit\Framework\TestCase
self::assertEquals(0.1659, BinomialDistribution::getPmf($n, $k, $p), '', 0.01);
}
- public function testCdf()
+ public function testCdf() : void
{
$p = 0.4;
$n = 20;
@@ -35,7 +35,7 @@ class BinomialDistributionTest extends \PHPUnit\Framework\TestCase
self::assertEquals(0.25, BinomialDistribution::getCdf($n, $k, $p), '', 0.01);
}
- public function testMean()
+ public function testMean() : void
{
$n = 20;
$p = 0.4;
@@ -43,7 +43,7 @@ class BinomialDistributionTest extends \PHPUnit\Framework\TestCase
self::assertEquals($n * $p, BinomialDistribution::getMean($n, $p), '', 0.01);
}
- public function testMedian()
+ public function testMedian() : void
{
$n = 20;
$p = 0.4;
@@ -51,7 +51,7 @@ class BinomialDistributionTest extends \PHPUnit\Framework\TestCase
self::assertEquals(\floor($n * $p), BinomialDistribution::getMedian($n, $p), '', 0.01);
}
- public function testMode()
+ public function testMode() : void
{
$n = 20;
$p = 0.4;
@@ -59,7 +59,7 @@ class BinomialDistributionTest extends \PHPUnit\Framework\TestCase
self::assertEquals(\floor(($n + 1) * $p), BinomialDistribution::getMode($n, $p), '', 0.01);
}
- public function testVariance()
+ public function testVariance() : void
{
$n = 20;
$p = 0.4;
@@ -67,7 +67,7 @@ class BinomialDistributionTest extends \PHPUnit\Framework\TestCase
self::assertEquals($n * $p * (1 - $p), BinomialDistribution::getVariance($n, $p), '', 0.01);
}
- public function testSkewness()
+ public function testSkewness() : void
{
$n = 20;
$p = 0.4;
@@ -75,7 +75,7 @@ class BinomialDistributionTest extends \PHPUnit\Framework\TestCase
self::assertEquals((1 - 2 * $p) / \sqrt($n * $p * (1 - $p)), BinomialDistribution::getSkewness($n, $p), '', 0.01);
}
- public function testExKurtosis()
+ public function testExKurtosis() : void
{
$n = 20;
$p = 0.4;
@@ -83,7 +83,7 @@ class BinomialDistributionTest extends \PHPUnit\Framework\TestCase
self::assertEquals((1 - 6 * $p * (1 - $p)) / ($n * $p * (1 - $p)), BinomialDistribution::getExKurtosis($n, $p), '', 0.01);
}
- public function testMgf()
+ public function testMgf() : void
{
$n = 20;
$p = 0.4;
@@ -92,7 +92,7 @@ class BinomialDistributionTest extends \PHPUnit\Framework\TestCase
self::assertEquals((1 - $p + $p * \exp($t)) ** $n, BinomialDistribution::getMgf($n, $t, $p), '', 0.01);
}
- public function testFisherInformation()
+ public function testFisherInformation() : void
{
$n = 20;
$p = 0.4;
diff --git a/tests/Math/Stochastic/Distribution/CauchyDistributionTest.php b/tests/Math/Stochastic/Distribution/CauchyDistributionTest.php
index 873b2bedd..0e40c1a37 100644
--- a/tests/Math/Stochastic/Distribution/CauchyDistributionTest.php
+++ b/tests/Math/Stochastic/Distribution/CauchyDistributionTest.php
@@ -17,13 +17,13 @@ use phpOMS\Math\Stochastic\Distribution\CauchyDistribution;
class CauchyDistributionTest extends \PHPUnit\Framework\TestCase
{
- public function testMedianMode()
+ public function testMedianMode() : void
{
self::assertEquals(3.2, CauchyDistribution::getMedian(3.2));
self::assertEquals(3.2, CauchyDistribution::getMode(3.2));
}
- public function testPdf()
+ public function testPdf() : void
{
$x = 1;
$x0 = 0.5;
@@ -32,7 +32,7 @@ class CauchyDistributionTest extends \PHPUnit\Framework\TestCase
self::assertEquals(0.14979, CauchyDistribution::getPdf($x, $x0, $gamma), '', 0.01);
}
- public function testCdf()
+ public function testCdf() : void
{
$x = 1;
$x0 = 0.5;
@@ -41,7 +41,7 @@ class CauchyDistributionTest extends \PHPUnit\Framework\TestCase
self::assertEquals(0.57798, CauchyDistribution::getCdf($x, $x0, $gamma), '', 0.01);
}
- public function testEntropy()
+ public function testEntropy() : void
{
$gamma = 1.5;
diff --git a/tests/Math/Stochastic/Distribution/ChiSquaredDistributionTest.php b/tests/Math/Stochastic/Distribution/ChiSquaredDistributionTest.php
index b3b655445..269acd080 100644
--- a/tests/Math/Stochastic/Distribution/ChiSquaredDistributionTest.php
+++ b/tests/Math/Stochastic/Distribution/ChiSquaredDistributionTest.php
@@ -17,7 +17,7 @@ use phpOMS\Math\Stochastic\Distribution\ChiSquaredDistribution;
class ChiSquaredDistributionTest extends \PHPUnit\Framework\TestCase
{
- public function testHypothesisFalse()
+ public function testHypothesisFalse() : void
{
$p = [0.6, 0.25, 0.15];
$a = 0.05;
@@ -34,7 +34,7 @@ class ChiSquaredDistributionTest extends \PHPUnit\Framework\TestCase
self::assertEquals(2, $test['df']);
}
- public function testDegreesOfFreedom()
+ public function testDegreesOfFreedom() : void
{
self::assertEquals(2, ChiSquaredDistribution::getDegreesOfFreedom([1, 2, 3]));
self::assertEquals(6, ChiSquaredDistribution::getDegreesOfFreedom([
@@ -44,47 +44,47 @@ class ChiSquaredDistributionTest extends \PHPUnit\Framework\TestCase
]));
}
- public function testMode()
+ public function testMode() : void
{
self::assertEquals(max(5 - 2, 0), ChiSquaredDistribution::getMode(5));
}
- public function testMean()
+ public function testMean() : void
{
$df = 5;
self::assertEquals($df, ChiSquaredDistribution::getMean($df));
}
- public function testVariance()
+ public function testVariance() : void
{
$df = 5;
self::assertEquals(2 * $df, ChiSquaredDistribution::getVariance($df));
}
- public function testMedian()
+ public function testMedian() : void
{
$df = 5;
self::assertEquals($df * (1 - 2 / (9 * $df)) ** 3, ChiSquaredDistribution::getMedian($df));
}
- public function testSkewness()
+ public function testSkewness() : void
{
$df = 5;
self::assertEquals(sqrt(8 / $df), ChiSquaredDistribution::getSkewness($df));
}
- public function testExKurtosis()
+ public function testExKurtosis() : void
{
$df = 5;
self::assertEquals(12 / $df, ChiSquaredDistribution::getExKurtosis($df));
}
- public function testMgdf()
+ public function testMgdf() : void
{
$df = 5;
$t = 0.3;
@@ -95,7 +95,7 @@ class ChiSquaredDistributionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \Exception
*/
- public function testHypothesisSizeException()
+ public function testHypothesisSizeException() : void
{
ChiSquaredDistribution::testHypothesis([1, 2], [2]);
}
@@ -103,7 +103,7 @@ class ChiSquaredDistributionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \Exception
*/
- public function testHypothesisDegreesOfFreedomException()
+ public function testHypothesisDegreesOfFreedomException() : void
{
ChiSquaredDistribution::testHypothesis([], []);
}
@@ -111,7 +111,7 @@ class ChiSquaredDistributionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \OutOfBoundsException
*/
- public function testPdfOutOfBoundsException()
+ public function testPdfOutOfBoundsException() : void
{
ChiSquaredDistribution::getPdf(-1, 0);
}
@@ -119,7 +119,7 @@ class ChiSquaredDistributionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \OutOfBoundsException
*/
- public function testMgfOutOfBoundsException()
+ public function testMgfOutOfBoundsException() : void
{
ChiSquaredDistribution::getMgf(1, 0.6);
}
diff --git a/tests/Math/Stochastic/Distribution/ExponentialDistributionTest.php b/tests/Math/Stochastic/Distribution/ExponentialDistributionTest.php
index 55e485215..24cce528f 100644
--- a/tests/Math/Stochastic/Distribution/ExponentialDistributionTest.php
+++ b/tests/Math/Stochastic/Distribution/ExponentialDistributionTest.php
@@ -17,7 +17,7 @@ use phpOMS\Math\Stochastic\Distribution\ExponentialDistribution;
class ExponentialDistributionTest extends \PHPUnit\Framework\TestCase
{
- public function testPdf()
+ public function testPdf() : void
{
$lambda = 0.1;
$x = 7;
@@ -25,7 +25,7 @@ class ExponentialDistributionTest extends \PHPUnit\Framework\TestCase
self::assertEquals(0.049659, ExponentialDistribution::getPdf($x, $lambda), '', 0.01);
}
- public function testCdf()
+ public function testCdf() : void
{
$lambda = 0.1;
$x = 7;
@@ -33,22 +33,22 @@ class ExponentialDistributionTest extends \PHPUnit\Framework\TestCase
self::assertEquals(0.5034, ExponentialDistribution::getCdf($x, $lambda), '', 0.01);
}
- public function testMean()
+ public function testMean() : void
{
self::assertEquals(1/3, ExponentialDistribution::getMean(3));
}
- public function testMode()
+ public function testMode() : void
{
self::assertEquals(0, ExponentialDistribution::getMode());
}
- public function testMedian()
+ public function testMedian() : void
{
self::assertEquals(1/3 * log(2), ExponentialDistribution::getMedian(3));
}
- public function testMgf()
+ public function testMgf() : void
{
$lambda = 3;
$t = 2;
@@ -56,17 +56,17 @@ class ExponentialDistributionTest extends \PHPUnit\Framework\TestCase
self::assertEquals($lambda / ($lambda - $t), ExponentialDistribution::getMgf($t, $lambda));
}
- public function testVariance()
+ public function testVariance() : void
{
self::assertEquals(1/(3 ** 2), ExponentialDistribution::getVariance(3));
}
- public function testExKurtosis()
+ public function testExKurtosis() : void
{
self::assertEquals(6, ExponentialDistribution::getExKurtosis());
}
- public function testSkewness()
+ public function testSkewness() : void
{
self::assertEquals(2, ExponentialDistribution::getSkewness());
}
@@ -74,7 +74,7 @@ class ExponentialDistributionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \OutOfBoundsException
*/
- public function testMgfException()
+ public function testMgfException() : void
{
ExponentialDistribution::getMgf(3, 3);
}
diff --git a/tests/Math/Stochastic/Distribution/FDistributionTest.php b/tests/Math/Stochastic/Distribution/FDistributionTest.php
index 6da7214a8..6100f0411 100644
--- a/tests/Math/Stochastic/Distribution/FDistributionTest.php
+++ b/tests/Math/Stochastic/Distribution/FDistributionTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Math\Stochastic\Distribution;
class FDistributionTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Math/Stochastic/Distribution/GammaDistributionTest.php b/tests/Math/Stochastic/Distribution/GammaDistributionTest.php
index 66778a36a..ab5b11e70 100644
--- a/tests/Math/Stochastic/Distribution/GammaDistributionTest.php
+++ b/tests/Math/Stochastic/Distribution/GammaDistributionTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Math\Stochastic\Distribution;
class GammaDistributionTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Math/Stochastic/Distribution/GeometricDistributionTest.php b/tests/Math/Stochastic/Distribution/GeometricDistributionTest.php
index d3ae7e2e3..e7a4b6554 100644
--- a/tests/Math/Stochastic/Distribution/GeometricDistributionTest.php
+++ b/tests/Math/Stochastic/Distribution/GeometricDistributionTest.php
@@ -17,7 +17,7 @@ use phpOMS\Math\Stochastic\Distribution\GeometricDistribution;
class GeometricDistributionTest extends \PHPUnit\Framework\TestCase
{
- public function testPmf()
+ public function testPmf() : void
{
$p = 0.2;
$k = 4;
@@ -25,7 +25,7 @@ class GeometricDistributionTest extends \PHPUnit\Framework\TestCase
self::assertEquals(0.1024, GeometricDistribution::getPmf($p, $k), '', 0.01);
}
- public function testCdf()
+ public function testCdf() : void
{
$p = 0.2;
$k = 6;
@@ -34,39 +34,39 @@ class GeometricDistributionTest extends \PHPUnit\Framework\TestCase
self::assertEquals(0.262, 1 - GeometricDistribution::getCdf($p, $k), '', 0.01);
}
- public function testMode()
+ public function testMode() : void
{
self::assertEquals(1, GeometricDistribution::getMode());
}
- public function testMean()
+ public function testMean() : void
{
$p = 0.3;
self::assertEquals(1 / $p, GeometricDistribution::getMean($p));
}
- public function testVariance()
+ public function testVariance() : void
{
$p = 0.3;
self::assertEquals((1 - $p) / $p ** 2, GeometricDistribution::getVariance($p));
}
- public function testSkewness()
+ public function testSkewness() : void
{
$p = 0.3;
self::assertEquals((2 - $p) / sqrt(1 - $p), GeometricDistribution::getSkewness($p));
}
- public function testExKurtosis()
+ public function testExKurtosis() : void
{
$p = 0.3;
self::assertEquals(6 + ($p ** 2) / (1 - $p), GeometricDistribution::getExKurtosis($p));
}
- public function testMedian()
+ public function testMedian() : void
{
$p = 0.3;
diff --git a/tests/Math/Stochastic/Distribution/HypergeometricDistributionTest.php b/tests/Math/Stochastic/Distribution/HypergeometricDistributionTest.php
index 2799ecd45..ca6653609 100644
--- a/tests/Math/Stochastic/Distribution/HypergeometricDistributionTest.php
+++ b/tests/Math/Stochastic/Distribution/HypergeometricDistributionTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Math\Stochastic\Distribution;
class HypergeometricDistributionTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Math/Stochastic/Distribution/LaplaceDistributionTest.php b/tests/Math/Stochastic/Distribution/LaplaceDistributionTest.php
index f96bc2413..1a2bc9f4a 100644
--- a/tests/Math/Stochastic/Distribution/LaplaceDistributionTest.php
+++ b/tests/Math/Stochastic/Distribution/LaplaceDistributionTest.php
@@ -17,7 +17,7 @@ use phpOMS\Math\Stochastic\Distribution\LaplaceDistribution;
class LaplaceDistributionTest extends \PHPUnit\Framework\TestCase
{
- public function testPdf()
+ public function testPdf() : void
{
$x = 2;
$m = 1;
@@ -26,7 +26,7 @@ class LaplaceDistributionTest extends \PHPUnit\Framework\TestCase
self::assertEquals(0.17118, LaplaceDistribution::getPdf($x, $m, $b), '', 0.01);
}
- public function testCdf()
+ public function testCdf() : void
{
$x = 2;
$m = 1;
@@ -35,39 +35,39 @@ class LaplaceDistributionTest extends \PHPUnit\Framework\TestCase
self::assertEquals(0.88017, LaplaceDistribution::getCdf($x, $m, $b), '', 0.01);
}
- public function testMode()
+ public function testMode() : void
{
self::assertEquals(2, LaplaceDistribution::getMode(2));
}
- public function testMean()
+ public function testMean() : void
{
self::assertEquals(2, LaplaceDistribution::getMean(2));
}
- public function testMedian()
+ public function testMedian() : void
{
self::assertEquals(2, LaplaceDistribution::getMedian(2));
}
- public function testExKurtosis()
+ public function testExKurtosis() : void
{
self::assertEquals(3, LaplaceDistribution::getExKurtosis());
}
- public function testSkewness()
+ public function testSkewness() : void
{
self::assertEquals(0, LaplaceDistribution::getSkewness());
}
- public function testVariance()
+ public function testVariance() : void
{
$b = 3;
self::assertEquals(2 * $b ** 2, LaplaceDistribution::getVariance($b));
}
- public function testMgf()
+ public function testMgf() : void
{
$t = 2;
$b = 0.4;
@@ -79,7 +79,7 @@ class LaplaceDistributionTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \OutOfBoundsException
*/
- public function testMgfException()
+ public function testMgfException() : void
{
LaplaceDistribution::getMgf(3, 2, 4);
}
diff --git a/tests/Math/Stochastic/Distribution/LogDistributionTest.php b/tests/Math/Stochastic/Distribution/LogDistributionTest.php
index 4c0fa3e0c..628750a96 100644
--- a/tests/Math/Stochastic/Distribution/LogDistributionTest.php
+++ b/tests/Math/Stochastic/Distribution/LogDistributionTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Math\Stochastic\Distribution;
class LogDistributionTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Math/Stochastic/Distribution/LogNormalDistributionTest.php b/tests/Math/Stochastic/Distribution/LogNormalDistributionTest.php
index 4e9c419e6..c627c8e96 100644
--- a/tests/Math/Stochastic/Distribution/LogNormalDistributionTest.php
+++ b/tests/Math/Stochastic/Distribution/LogNormalDistributionTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Math\Stochastic\Distribution;
class LogNormalDistributionTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Math/Stochastic/Distribution/LogisticDistributionTest.php b/tests/Math/Stochastic/Distribution/LogisticDistributionTest.php
index a4bdbbd11..c3a5003a0 100644
--- a/tests/Math/Stochastic/Distribution/LogisticDistributionTest.php
+++ b/tests/Math/Stochastic/Distribution/LogisticDistributionTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Math\Stochastic\Distribution;
class LogisticDistributionTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Math/Stochastic/Distribution/NormalDistributionTest.php b/tests/Math/Stochastic/Distribution/NormalDistributionTest.php
index 4f124b77b..06f6609e2 100644
--- a/tests/Math/Stochastic/Distribution/NormalDistributionTest.php
+++ b/tests/Math/Stochastic/Distribution/NormalDistributionTest.php
@@ -17,7 +17,7 @@ use phpOMS\Math\Stochastic\Distribution\NormalDistribution;
class NormalDistributionTest extends \PHPUnit\Framework\TestCase
{
- public function testPdf()
+ public function testPdf() : void
{
$mean = 2;
$sig = 1;
@@ -26,7 +26,7 @@ class NormalDistributionTest extends \PHPUnit\Framework\TestCase
self::assertEquals(0.24197, NormalDistribution::getPdf($x, $mean, $sig), '', 0.01);
}
- public function testCdf()
+ public function testCdf() : void
{
$mean = 2;
$sig = 1;
@@ -35,38 +35,38 @@ class NormalDistributionTest extends \PHPUnit\Framework\TestCase
self::assertEquals(0.84134, NormalDistribution::getCdf($x, $mean, $sig), '', 0.01);
}
- public function testMean()
+ public function testMean() : void
{
$mu = 4;
self::assertEquals($mu, NormalDistribution::getMean($mu));
}
- public function testMedian()
+ public function testMedian() : void
{
$mu = 4;
self::assertEquals($mu, NormalDistribution::getMedian($mu));
}
- public function testMode()
+ public function testMode() : void
{
$mu = 4;
self::assertEquals($mu, NormalDistribution::getMode($mu));
}
- public function testSkewness()
+ public function testSkewness() : void
{
self::assertEquals(0, NormalDistribution::getSkewness());
}
- public function testExKurtosis()
+ public function testExKurtosis() : void
{
self::assertEquals(0, NormalDistribution::getExKurtosis());
}
- public function testVariance()
+ public function testVariance() : void
{
$sig = 0.8;
diff --git a/tests/Math/Stochastic/Distribution/ParetoDistributionTest.php b/tests/Math/Stochastic/Distribution/ParetoDistributionTest.php
index 893cabda4..e2530b2cb 100644
--- a/tests/Math/Stochastic/Distribution/ParetoDistributionTest.php
+++ b/tests/Math/Stochastic/Distribution/ParetoDistributionTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Math\Stochastic\Distribution;
class ParetoDistributionTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Math/Stochastic/Distribution/PoissonDistributionTest.php b/tests/Math/Stochastic/Distribution/PoissonDistributionTest.php
index 51fcbc4cc..d6ab90ff1 100644
--- a/tests/Math/Stochastic/Distribution/PoissonDistributionTest.php
+++ b/tests/Math/Stochastic/Distribution/PoissonDistributionTest.php
@@ -17,7 +17,7 @@ use phpOMS\Math\Stochastic\Distribution\PoissonDistribution;
class PoissonDistributionTest extends \PHPUnit\Framework\TestCase
{
- public function testPmf()
+ public function testPmf() : void
{
$k = 4;
$l = 3;
@@ -25,7 +25,7 @@ class PoissonDistributionTest extends \PHPUnit\Framework\TestCase
self::assertEquals(0.16803, PoissonDistribution::getPmf(4, 3), '', 0.01);
}
- public function testCdf()
+ public function testCdf() : void
{
$k = 4;
$l = 3;
@@ -33,56 +33,56 @@ class PoissonDistributionTest extends \PHPUnit\Framework\TestCase
self::assertEquals(0.81526, PoissonDistribution::getCdf(4, 3), '', 0.01);
}
- public function testMode()
+ public function testMode() : void
{
$l = 4.6;
self::assertEquals(4, PoissonDistribution::getMode($l), '', 0.01);
}
- public function testMean()
+ public function testMean() : void
{
$l = 4.6;
self::assertEquals($l, PoissonDistribution::getMean($l));
}
- public function testVariance()
+ public function testVariance() : void
{
$l = 4.6;
self::assertEquals($l, PoissonDistribution::getVariance($l));
}
- public function testSkewness()
+ public function testSkewness() : void
{
$l = 4.6;
self::assertEquals(1 / sqrt($l), PoissonDistribution::getSkewness($l));
}
- public function testExKurtosis()
+ public function testExKurtosis() : void
{
$l = 4.6;
self::assertEquals(1 / $l, PoissonDistribution::getExKurtosis($l));
}
- public function testMedian()
+ public function testMedian() : void
{
$l = 4.6;
self::assertEquals(\floor($l + 1 / 3 - 0.02 / $l), PoissonDistribution::getMedian($l));
}
- public function testFisherInformation()
+ public function testFisherInformation() : void
{
$l = 4.6;
self::assertEquals(1 / $l, PoissonDistribution::getFisherInformation($l));
}
- public function testMgf()
+ public function testMgf() : void
{
$l = 4.6;
$t = 3;
diff --git a/tests/Math/Stochastic/Distribution/TDistributionTest.php b/tests/Math/Stochastic/Distribution/TDistributionTest.php
index 3d0f66f62..8943b4934 100644
--- a/tests/Math/Stochastic/Distribution/TDistributionTest.php
+++ b/tests/Math/Stochastic/Distribution/TDistributionTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Math\Stochastic\Distribution;
class TDistributionTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Math/Stochastic/Distribution/UniformDistributionContinuousTest.php b/tests/Math/Stochastic/Distribution/UniformDistributionContinuousTest.php
index 5143ebb93..946b6f1b7 100644
--- a/tests/Math/Stochastic/Distribution/UniformDistributionContinuousTest.php
+++ b/tests/Math/Stochastic/Distribution/UniformDistributionContinuousTest.php
@@ -17,7 +17,7 @@ use phpOMS\Math\Stochastic\Distribution\UniformDistributionContinuous;
class UniformDistributionContinuousTest extends \PHPUnit\Framework\TestCase
{
- public function testPdf()
+ public function testPdf() : void
{
$a = 1;
$b = 4;
@@ -27,7 +27,7 @@ class UniformDistributionContinuousTest extends \PHPUnit\Framework\TestCase
self::assertEquals(0, UniformDistributionContinuous::getPdf(5, $a, $b));
}
- public function testCdf()
+ public function testCdf() : void
{
$a = 1;
$b = 4;
@@ -38,7 +38,7 @@ class UniformDistributionContinuousTest extends \PHPUnit\Framework\TestCase
self::assertEquals(1, UniformDistributionContinuous::getCdf(5, $a, $b));
}
- public function testMode()
+ public function testMode() : void
{
$a = 1;
$b = 4;
@@ -52,7 +52,7 @@ class UniformDistributionContinuousTest extends \PHPUnit\Framework\TestCase
);
}
- public function testMean()
+ public function testMean() : void
{
$a = 1;
$b = 4;
@@ -60,7 +60,7 @@ class UniformDistributionContinuousTest extends \PHPUnit\Framework\TestCase
self::assertEquals(1 / 2 * ($b + $a), UniformDistributionContinuous::getMean($a, $b));
}
- public function testMedian()
+ public function testMedian() : void
{
$a = 1;
$b = 4;
@@ -68,7 +68,7 @@ class UniformDistributionContinuousTest extends \PHPUnit\Framework\TestCase
self::assertEquals(1 / 2 * ($b + $a), UniformDistributionContinuous::getMedian($a, $b));
}
- public function testVariance()
+ public function testVariance() : void
{
$a = 1;
$b = 4;
@@ -76,12 +76,12 @@ class UniformDistributionContinuousTest extends \PHPUnit\Framework\TestCase
self::assertEquals(1 / 12 * ($b - $a) ** 2, UniformDistributionContinuous::getVariance($a, $b));
}
- public function testSkewness()
+ public function testSkewness() : void
{
self::assertEquals(0, UniformDistributionContinuous::getSkewness());
}
- public function testExKurtosis()
+ public function testExKurtosis() : void
{
self::assertEquals(-6 / 5, UniformDistributionContinuous::getExKurtosis());
}
diff --git a/tests/Math/Stochastic/Distribution/UniformDistributionDiscreteTest.php b/tests/Math/Stochastic/Distribution/UniformDistributionDiscreteTest.php
index 65967610e..0e7ac0ede 100644
--- a/tests/Math/Stochastic/Distribution/UniformDistributionDiscreteTest.php
+++ b/tests/Math/Stochastic/Distribution/UniformDistributionDiscreteTest.php
@@ -17,7 +17,7 @@ use phpOMS\Math\Stochastic\Distribution\UniformDistributionDiscrete;
class UniformDistributionDiscreteTest extends \PHPUnit\Framework\TestCase
{
- public function testPmf()
+ public function testPmf() : void
{
$a = 1;
$b = 4;
@@ -25,7 +25,7 @@ class UniformDistributionDiscreteTest extends \PHPUnit\Framework\TestCase
self::assertEquals(1 / ($b - $a + 1), UniformDistributionDiscrete::getPmf($a, $b));
}
- public function testCdf()
+ public function testCdf() : void
{
$a = 1;
$b = 4;
@@ -34,12 +34,12 @@ class UniformDistributionDiscreteTest extends \PHPUnit\Framework\TestCase
self::assertEquals(($k - $a + 1) / ($b - $a + 1), UniformDistributionDiscrete::getCdf($k, $a, $b));
}
- public function testSkewness()
+ public function testSkewness() : void
{
self::assertEquals(0, UniformDistributionDiscrete::getSkewness());
}
- public function testMean()
+ public function testMean() : void
{
$a = 1;
$b = 4;
@@ -47,7 +47,7 @@ class UniformDistributionDiscreteTest extends \PHPUnit\Framework\TestCase
self::assertEquals(1 / 2 * ($a + $b), UniformDistributionDiscrete::getMean($a, $b));
}
- public function testMedian()
+ public function testMedian() : void
{
$a = 1;
$b = 4;
@@ -55,7 +55,7 @@ class UniformDistributionDiscreteTest extends \PHPUnit\Framework\TestCase
self::assertEquals(1 / 2 * ($a + $b), UniformDistributionDiscrete::getMedian($a, $b));
}
- public function testVariance()
+ public function testVariance() : void
{
$a = 1;
$b = 4;
@@ -63,7 +63,7 @@ class UniformDistributionDiscreteTest extends \PHPUnit\Framework\TestCase
self::assertEquals((($b - $a + 1) ** 2 - 1) / 12, UniformDistributionDiscrete::getVariance($a, $b));
}
- public function testExKurtosis()
+ public function testExKurtosis() : void
{
$a = 1;
$b = 4;
@@ -75,7 +75,7 @@ class UniformDistributionDiscreteTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \OutOfBoundsException
*/
- public function testCdfExceptionUpper()
+ public function testCdfExceptionUpper() : void
{
UniformDistributionDiscrete::getCdf(5, 2, 4);
}
@@ -83,7 +83,7 @@ class UniformDistributionDiscreteTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \OutOfBoundsException
*/
- public function testCdfExceptionLower()
+ public function testCdfExceptionLower() : void
{
UniformDistributionDiscrete::getCdf(1, 2, 4);
}
diff --git a/tests/Math/Stochastic/Distribution/WeibullDistributionTest.php b/tests/Math/Stochastic/Distribution/WeibullDistributionTest.php
index 80298130e..48d904610 100644
--- a/tests/Math/Stochastic/Distribution/WeibullDistributionTest.php
+++ b/tests/Math/Stochastic/Distribution/WeibullDistributionTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Math\Stochastic\Distribution;
class WeibullDistributionTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Math/Stochastic/Distribution/ZTestTest.php b/tests/Math/Stochastic/Distribution/ZTestTest.php
index 52c9bf894..bb50e8496 100644
--- a/tests/Math/Stochastic/Distribution/ZTestTest.php
+++ b/tests/Math/Stochastic/Distribution/ZTestTest.php
@@ -18,7 +18,7 @@ use phpOMS\Math\Stochastic\Distribution\ZTest;
class ZTestTest extends \PHPUnit\Framework\TestCase
{
// http://sphweb.bumc.bu.edu/otlt/MPH-Modules/BS/BS704_HypothesisTesting-ChiSquare/BS704_HypothesisTesting-ChiSquare_print.html
- public function testHypothesisFalse()
+ public function testHypothesisFalse() : void
{
$a = 0.95;
$observed = 0.512;
diff --git a/tests/Math/Stochastic/NaiveBayesFilterTest.php b/tests/Math/Stochastic/NaiveBayesFilterTest.php
index 5b083ba06..8b94de6e3 100644
--- a/tests/Math/Stochastic/NaiveBayesFilterTest.php
+++ b/tests/Math/Stochastic/NaiveBayesFilterTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Math\Stochastic;
class NaiveBayesFilterTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Message/Console/HeaderTest.php b/tests/Message/Console/HeaderTest.php
index bc2d3cb1d..a4a4d6941 100644
--- a/tests/Message/Console/HeaderTest.php
+++ b/tests/Message/Console/HeaderTest.php
@@ -18,7 +18,7 @@ use phpOMS\Message\Console\Header;
class HeaderTest extends \PHPUnit\Framework\TestCase
{
- public function testDefaults()
+ public function testDefaults() : void
{
$header = new Header();
self::assertFalse($header->isLocked());
@@ -31,7 +31,7 @@ class HeaderTest extends \PHPUnit\Framework\TestCase
self::assertEquals(0, $header->getAccount());
}
- public function testGetSet()
+ public function testGetSet() : void
{
$header = new Header();
@@ -53,7 +53,7 @@ class HeaderTest extends \PHPUnit\Framework\TestCase
self::AssertEquals(2, $header->getAccount(2));
}
- public function testLockedHeaderSet()
+ public function testLockedHeaderSet() : void
{
$header = new Header();
$header->lock();
@@ -61,7 +61,7 @@ class HeaderTest extends \PHPUnit\Framework\TestCase
self::assertFalse($header->set('key', 'value'));
}
- public function testLockedHeaderRemove()
+ public function testLockedHeaderRemove() : void
{
$header = new Header();
$header->lock();
diff --git a/tests/Message/Console/RequestTest.php b/tests/Message/Console/RequestTest.php
index 9656824a5..58b72d6de 100644
--- a/tests/Message/Console/RequestTest.php
+++ b/tests/Message/Console/RequestTest.php
@@ -22,7 +22,7 @@ use phpOMS\Uri\Argument;
class RequestTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
$request = new Request();
@@ -39,7 +39,7 @@ class RequestTest extends \PHPUnit\Framework\TestCase
self::assertEquals(null, $request->getData('key'));
}
- public function testSetGet()
+ public function testSetGet() : void
{
$request = new Request(new Argument('get:some/test/path'), $l11n = new Localization());
@@ -80,7 +80,7 @@ class RequestTest extends \PHPUnit\Framework\TestCase
self::assertEquals('get:some/test/path2', $request->__toString());
}
- public function testToString()
+ public function testToString() : void
{
$request = new Request(new Argument('get:some/test/path'));
self::assertEquals('get:some/test/path', $request->__toString());
@@ -96,7 +96,7 @@ class RequestTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \Exception
*/
- public function testInvalidRouteVerb()
+ public function testInvalidRouteVerb() : void
{
$request = new Request(new Argument('get:some/test/path'));
$request->setMethod('failure');
diff --git a/tests/Message/Console/ResponseTest.php b/tests/Message/Console/ResponseTest.php
index c55544a6c..5e0505579 100644
--- a/tests/Message/Console/ResponseTest.php
+++ b/tests/Message/Console/ResponseTest.php
@@ -18,7 +18,7 @@ use phpOMS\Message\Console\Response;
class ResponseTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
$response = new Response(new Localization());
self::assertEquals('', $response->getBody());
@@ -28,7 +28,7 @@ class ResponseTest extends \PHPUnit\Framework\TestCase
self::assertInstanceOf('\phpOMS\Message\Console\Header', $response->getHeader());
}
- public function testSetGet()
+ public function testSetGet() : void
{
$response = new Response(new Localization());
diff --git a/tests/Message/HeaderAbstractTest.php b/tests/Message/HeaderAbstractTest.php
index 2b0b6ed82..dde15f111 100644
--- a/tests/Message/HeaderAbstractTest.php
+++ b/tests/Message/HeaderAbstractTest.php
@@ -21,7 +21,7 @@ class HeaderAbstractTest extends \PHPUnit\Framework\TestCase
{
protected $header = null;
- protected function setUp()
+ protected function setUp() : void
{
$this->header = new class extends HeaderAbstract
{
@@ -51,7 +51,7 @@ class HeaderAbstractTest extends \PHPUnit\Framework\TestCase
};
}
- public function testSetGet()
+ public function testSetGet() : void
{
$this->header->setStatusCode(2);
self::assertEquals(2, $this->header->getStatusCode());
diff --git a/tests/Message/Http/BrowserTypeTest.php b/tests/Message/Http/BrowserTypeTest.php
index fb7ff1bb6..6f11e71c3 100644
--- a/tests/Message/Http/BrowserTypeTest.php
+++ b/tests/Message/Http/BrowserTypeTest.php
@@ -17,7 +17,7 @@ use phpOMS\Message\Http\BrowserType;
class BrowserTypeTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(12, BrowserType::count());
self::assertEquals(BrowserType::getConstants(), array_unique(BrowserType::getConstants()));
diff --git a/tests/Message/Http/HeaderTest.php b/tests/Message/Http/HeaderTest.php
index 5e8337b13..f4306fa22 100644
--- a/tests/Message/Http/HeaderTest.php
+++ b/tests/Message/Http/HeaderTest.php
@@ -19,7 +19,7 @@ use phpOMS\Message\Http\RequestStatusCode;
class HeaderTest extends \PHPUnit\Framework\TestCase
{
- public function testDefaults()
+ public function testDefaults() : void
{
$header = new Header();
self::assertFalse($header->isLocked());
@@ -33,7 +33,7 @@ class HeaderTest extends \PHPUnit\Framework\TestCase
self::assertEquals(0, $header->getAccount());
}
- public function testSecurityHeader()
+ public function testSecurityHeader() : void
{
self::assertTrue(Header::isSecurityHeader('content-security-policy'));
self::assertTrue(Header::isSecurityHeader('X-xss-protection'));
@@ -42,7 +42,7 @@ class HeaderTest extends \PHPUnit\Framework\TestCase
self::assertFalse(Header::isSecurityHeader('x-frame-optionss'));
}
- public function testGetSet()
+ public function testGetSet() : void
{
$header = new Header();
@@ -64,7 +64,7 @@ class HeaderTest extends \PHPUnit\Framework\TestCase
self::AssertEquals(2, $header->getAccount(2));
}
- public function testLockedHeaderSet()
+ public function testLockedHeaderSet() : void
{
$header = new Header();
$header->lock();
@@ -72,7 +72,7 @@ class HeaderTest extends \PHPUnit\Framework\TestCase
self::assertFalse($header->set('key', 'value'));
}
- public function testLockedHeaderRemove()
+ public function testLockedHeaderRemove() : void
{
$header = new Header();
$header->lock();
@@ -80,7 +80,7 @@ class HeaderTest extends \PHPUnit\Framework\TestCase
self::assertFalse($header->remove('key'));
}
- public function testGeneration()
+ public function testGeneration() : void
{
$header = new Header();
@@ -103,7 +103,7 @@ class HeaderTest extends \PHPUnit\Framework\TestCase
self::assertEquals(500, \http_response_code());
}
- public function testOverwriteSecurityHeader()
+ public function testOverwriteSecurityHeader() : void
{
$header = new Header();
self::assertTrue($header->set('content-security-policy', 'header'));
diff --git a/tests/Message/Http/OSTypeTest.php b/tests/Message/Http/OSTypeTest.php
index 6eab8f7da..28b6d7314 100644
--- a/tests/Message/Http/OSTypeTest.php
+++ b/tests/Message/Http/OSTypeTest.php
@@ -17,7 +17,7 @@ use phpOMS\Message\Http\OSType;
class OSTypeTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(24, \count(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 86b67f5f9..f7fc383bb 100644
--- a/tests/Message/Http/RequestMethodTest.php
+++ b/tests/Message/Http/RequestMethodTest.php
@@ -17,7 +17,7 @@ use phpOMS\Message\Http\RequestMethod;
class RequestMethodTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(6, \count(RequestMethod::getConstants()));
self::assertEquals(RequestMethod::getConstants(), array_unique(RequestMethod::getConstants()));
diff --git a/tests/Message/Http/RequestStatusCodeTest.php b/tests/Message/Http/RequestStatusCodeTest.php
index f27d79713..e5823fbd2 100644
--- a/tests/Message/Http/RequestStatusCodeTest.php
+++ b/tests/Message/Http/RequestStatusCodeTest.php
@@ -17,7 +17,7 @@ use phpOMS\Message\Http\RequestStatusCode;
class RequestStatusCodeTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(55, \count(RequestStatusCode::getConstants()));
self::assertEquals(RequestStatusCode::getConstants(), array_unique(RequestStatusCode::getConstants()));
diff --git a/tests/Message/Http/RequestStatusTest.php b/tests/Message/Http/RequestStatusTest.php
index 1806a7651..6d848dbff 100644
--- a/tests/Message/Http/RequestStatusTest.php
+++ b/tests/Message/Http/RequestStatusTest.php
@@ -17,7 +17,7 @@ use phpOMS\Message\Http\RequestStatus;
class RequestStatusTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(55, \count(RequestStatus::getConstants()));
self::assertEquals(RequestStatus::getConstants(), array_unique(RequestStatus::getConstants()));
diff --git a/tests/Message/Http/RequestTest.php b/tests/Message/Http/RequestTest.php
index e9050d77c..2162059e1 100644
--- a/tests/Message/Http/RequestTest.php
+++ b/tests/Message/Http/RequestTest.php
@@ -23,7 +23,7 @@ use phpOMS\Uri\Http;
class RequestTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
$request = new Request();
@@ -47,7 +47,7 @@ class RequestTest extends \PHPUnit\Framework\TestCase
self::assertEquals(null, $request->getData('key'));
}
- public function testSetGet()
+ public function testSetGet() : void
{
$request = new Request(new Http('http://www.google.com/test/path'), $l11n = new Localization());
@@ -91,7 +91,7 @@ class RequestTest extends \PHPUnit\Framework\TestCase
self::assertEquals('http://www.google.com/test/path2', $request->__toString());
}
- public function testToString()
+ public function testToString() : void
{
$request = new Request(new Http('http://www.google.com/test/path'));
self::assertEquals('http://www.google.com/test/path', $request->__toString());
@@ -108,7 +108,7 @@ class RequestTest extends \PHPUnit\Framework\TestCase
self::assertEquals('http://www.google.com/test/path?test=var&test=data&test2=3', $request->__toString());
}
- public function testRestRequest()
+ public function testRestRequest() : void
{
$request = new Request(new Http('http://orange-management.de/phpOMS/LICENSE.txt'));
$request->setMethod(RequestMethod::GET);
@@ -122,7 +122,7 @@ class RequestTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \OutOfRangeException
*/
- public function testInvalidHttpsPort()
+ public function testInvalidHttpsPort() : void
{
$request = new Request(new Http('http://www.google.com/test/path'));
$request->isHttps(-1);
@@ -131,7 +131,7 @@ class RequestTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \Exception
*/
- public function testInvalidRouteVerb()
+ public function testInvalidRouteVerb() : void
{
$request = new Request(new Http('http://www.google.com/test/path'));
$request->setMethod('failure');
diff --git a/tests/Message/Http/ResponseTest.php b/tests/Message/Http/ResponseTest.php
index 9d94fd0f5..e3e9b4d5a 100644
--- a/tests/Message/Http/ResponseTest.php
+++ b/tests/Message/Http/ResponseTest.php
@@ -18,7 +18,7 @@ use phpOMS\Message\Http\Response;
class ResponseTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
$response = new Response(new Localization());
self::assertEquals('', $response->getBody());
@@ -28,7 +28,7 @@ class ResponseTest extends \PHPUnit\Framework\TestCase
self::assertInstanceOf('\phpOMS\Message\Http\Header', $response->getHeader());
}
- public function testSetGet()
+ public function testSetGet() : void
{
$response = new Response(new Localization());
diff --git a/tests/Message/Http/RestTest.php b/tests/Message/Http/RestTest.php
index 4b0babdd4..214dad3f8 100644
--- a/tests/Message/Http/RestTest.php
+++ b/tests/Message/Http/RestTest.php
@@ -20,7 +20,7 @@ use phpOMS\Uri\Http;
class RestTest extends \PHPUnit\Framework\TestCase
{
- public function testRequest()
+ public function testRequest() : void
{
$request = new Request(new Http('http://orange-management.de/phpOMS/LICENSE.txt'));
$request->setMethod(RequestMethod::GET);
@@ -31,7 +31,7 @@ class RestTest extends \PHPUnit\Framework\TestCase
);
}
- public function testPost()
+ public function testPost() : void
{
$request = new Request(new Http('http://httpbin.org/post'));
$request->setMethod(RequestMethod::POST);
@@ -39,7 +39,7 @@ class RestTest extends \PHPUnit\Framework\TestCase
self::assertEquals('abc', \json_decode(REST::request($request), true)['form']['pdata']);
}
- public function testPut()
+ public function testPut() : void
{
$request = new Request(new Http('http://httpbin.org/put'));
$request->setMethod(RequestMethod::PUT);
@@ -47,7 +47,7 @@ class RestTest extends \PHPUnit\Framework\TestCase
self::assertEquals('abc', \json_decode(REST::request($request), true)['form']['pdata']);
}
- public function testDelete()
+ public function testDelete() : void
{
$request = new Request(new Http('http://httpbin.org/delete'));
$request->setMethod(RequestMethod::DELETE);
@@ -55,7 +55,7 @@ class RestTest extends \PHPUnit\Framework\TestCase
self::assertEquals('abc', \json_decode(REST::request($request), true)['form']['ddata']);
}
- public function testGet()
+ public function testGet() : void
{
$request = new Request(new Http('http://httpbin.org/get'));
$request->setMethod(RequestMethod::GET);
diff --git a/tests/Message/Mail/ImapTest.php b/tests/Message/Mail/ImapTest.php
index 09d5f1a4b..87a2f1fa2 100644
--- a/tests/Message/Mail/ImapTest.php
+++ b/tests/Message/Mail/ImapTest.php
@@ -17,7 +17,7 @@ use phpOMS\Message\Mail\Imap;
class ImapTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
$email = new Imap(
$GLOBALS['CONFIG']['mail']['imap']['host'],
diff --git a/tests/Message/Mail/MailTest.php b/tests/Message/Mail/MailTest.php
index 586de72a9..e3ded7be8 100644
--- a/tests/Message/Mail/MailTest.php
+++ b/tests/Message/Mail/MailTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Message\Mail;
class MailTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Message/Mail/NntpTest.php b/tests/Message/Mail/NntpTest.php
index f9d458bf8..0abc8d17d 100644
--- a/tests/Message/Mail/NntpTest.php
+++ b/tests/Message/Mail/NntpTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Message\Mail;
class NntpTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Message/Mail/Pop3Test.php b/tests/Message/Mail/Pop3Test.php
index 152ff7b31..3047145c5 100644
--- a/tests/Message/Mail/Pop3Test.php
+++ b/tests/Message/Mail/Pop3Test.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Message\Mail;
class Pop3Test extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Message/RequestSourceTest.php b/tests/Message/RequestSourceTest.php
index f466ddefe..006fc6d27 100644
--- a/tests/Message/RequestSourceTest.php
+++ b/tests/Message/RequestSourceTest.php
@@ -19,7 +19,7 @@ use phpOMS\Message\RequestSource;
class RequestSourceTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(4, \count(RequestSource::getConstants()));
self::assertEquals(0, RequestSource::WEB);
diff --git a/tests/Message/ResponseAbstractTest.php b/tests/Message/ResponseAbstractTest.php
index 737e6204a..b3e668b1a 100644
--- a/tests/Message/ResponseAbstractTest.php
+++ b/tests/Message/ResponseAbstractTest.php
@@ -21,7 +21,7 @@ class ResponseAbstractTest extends \PHPUnit\Framework\TestCase
{
protected $response = null;
- protected function setUp()
+ protected function setUp() : void
{
$this->response = new class extends ResponseAbstract
{
@@ -37,13 +37,13 @@ class ResponseAbstractTest extends \PHPUnit\Framework\TestCase
};
}
- public function testDefault()
+ public function testDefault() : void
{
self::assertEquals(null, $this->response->get('asdf'));
self::assertEquals('', $this->response->getBody());
}
- public function testSetGet()
+ public function testSetGet() : void
{
self::assertEquals([1], $this->response->jsonSerialize());
diff --git a/tests/Message/ResponseTypeTest.php b/tests/Message/ResponseTypeTest.php
index e82399695..1396e1e02 100644
--- a/tests/Message/ResponseTypeTest.php
+++ b/tests/Message/ResponseTypeTest.php
@@ -19,7 +19,7 @@ use phpOMS\Message\ResponseType;
class ResponseTypeTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(3, \count(ResponseType::getConstants()));
self::assertEquals(0, ResponseType::HTTP);
diff --git a/tests/Message/Socket/RequestTest.php b/tests/Message/Socket/RequestTest.php
index 4c29d9321..956c7fab0 100644
--- a/tests/Message/Socket/RequestTest.php
+++ b/tests/Message/Socket/RequestTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Message\Socket;
class RequestTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Message/Socket/ResponseTest.php b/tests/Message/Socket/ResponseTest.php
index edf1e2961..44ab1031c 100644
--- a/tests/Message/Socket/ResponseTest.php
+++ b/tests/Message/Socket/ResponseTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Message\Socket;
class ResponseTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Model/Html/HeadTest.php b/tests/Model/Html/HeadTest.php
index 4ef772260..78fa5b408 100644
--- a/tests/Model/Html/HeadTest.php
+++ b/tests/Model/Html/HeadTest.php
@@ -18,7 +18,7 @@ use phpOMS\Model\Html\Head;
class HeadTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
$head = new Head();
self::assertInstanceOf('\phpOMS\Model\Html\Meta', $head->getMeta());
@@ -33,7 +33,7 @@ class HeadTest extends \PHPUnit\Framework\TestCase
self::assertEquals('', $head->render());
}
- public function testSetGet()
+ public function testSetGet() : void
{
$head = new Head();
diff --git a/tests/Model/Html/MetaTest.php b/tests/Model/Html/MetaTest.php
index 6c4dde037..b2807b412 100644
--- a/tests/Model/Html/MetaTest.php
+++ b/tests/Model/Html/MetaTest.php
@@ -17,7 +17,7 @@ use phpOMS\Model\Html\Meta;
class MetaTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
$meta = new Meta();
self::assertEquals('', $meta->getDescription());
@@ -27,7 +27,7 @@ class MetaTest extends \PHPUnit\Framework\TestCase
self::assertEquals('', $meta->render());
}
- public function testGetSet()
+ public function testGetSet() : void
{
$meta = new Meta();
diff --git a/tests/Model/Message/DomActionTest.php b/tests/Model/Message/DomActionTest.php
index 31241ac06..0d85d1615 100644
--- a/tests/Model/Message/DomActionTest.php
+++ b/tests/Model/Message/DomActionTest.php
@@ -17,7 +17,7 @@ use phpOMS\Model\Message\DomAction;
class DomActionTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(9, count(DomAction::getConstants()));
self::assertEquals(DomAction::getConstants(), array_unique(DomAction::getConstants()));
diff --git a/tests/Model/Message/DomTest.php b/tests/Model/Message/DomTest.php
index 8524145da..cbf23fdeb 100644
--- a/tests/Model/Message/DomTest.php
+++ b/tests/Model/Message/DomTest.php
@@ -19,7 +19,7 @@ use phpOMS\Model\Message\DomAction;
class DomTest extends \PHPUnit\Framework\TestCase
{
- public function testAttributes()
+ public function testAttributes() : void
{
$obj = new Dom();
self::assertInstanceOf('\phpOMS\Model\Message\Dom', $obj);
@@ -31,7 +31,7 @@ class DomTest extends \PHPUnit\Framework\TestCase
self::assertObjectHasAttribute('action', $obj);
}
- public function testDefault()
+ public function testDefault() : void
{
$obj = new Dom();
@@ -42,7 +42,7 @@ class DomTest extends \PHPUnit\Framework\TestCase
self::assertEquals(DomAction::MODIFY, $obj->toArray()['action']);
}
- public function testSetGet()
+ public function testSetGet() : void
{
$obj = new Dom();
$obj->setDelay(3);
diff --git a/tests/Model/Message/FormValidationTest.php b/tests/Model/Message/FormValidationTest.php
index b41bd0215..6d4f21488 100644
--- a/tests/Model/Message/FormValidationTest.php
+++ b/tests/Model/Message/FormValidationTest.php
@@ -18,7 +18,7 @@ use phpOMS\Model\Message\FormValidation;
class FormValidationTest extends \PHPUnit\Framework\TestCase
{
- public function testAttributes()
+ public function testAttributes() : void
{
$obj = new FormValidation([]);
self::assertInstanceOf('\phpOMS\Model\Message\FormValidation', $obj);
@@ -27,7 +27,7 @@ class FormValidationTest extends \PHPUnit\Framework\TestCase
self::assertObjectHasAttribute('validation', $obj);
}
- public function testDefault()
+ public function testDefault() : void
{
$obj = new FormValidation([]);
@@ -35,7 +35,7 @@ class FormValidationTest extends \PHPUnit\Framework\TestCase
self::assertEmpty($obj->toArray()['validation']);
}
- public function testSetGet()
+ public function testSetGet() : void
{
$arr = ['a' => true, 'b' => false];
$obj = new FormValidation($arr);
diff --git a/tests/Model/Message/NotifyTest.php b/tests/Model/Message/NotifyTest.php
index dca6136a6..6c525a66e 100644
--- a/tests/Model/Message/NotifyTest.php
+++ b/tests/Model/Message/NotifyTest.php
@@ -19,7 +19,7 @@ use phpOMS\Model\Message\NotifyType;
class NotifyTest extends \PHPUnit\Framework\TestCase
{
- public function testAttributes()
+ public function testAttributes() : void
{
$obj = new Notify();
self::assertInstanceOf('\phpOMS\Model\Message\Notify', $obj);
@@ -32,7 +32,7 @@ class NotifyTest extends \PHPUnit\Framework\TestCase
self::assertObjectHasAttribute('level', $obj);
}
- public function testDefault()
+ public function testDefault() : void
{
$obj = new Notify();
@@ -44,7 +44,7 @@ class NotifyTest extends \PHPUnit\Framework\TestCase
self::assertEquals(NotifyType::INFO, $obj->toArray()['level']);
}
- public function testSetGet()
+ public function testSetGet() : void
{
$obj = new Notify('message', NotifyType::WARNING);
$obj->setDelay(3);
diff --git a/tests/Model/Message/NotifyTypeTest.php b/tests/Model/Message/NotifyTypeTest.php
index bd9c064a9..ad023f217 100644
--- a/tests/Model/Message/NotifyTypeTest.php
+++ b/tests/Model/Message/NotifyTypeTest.php
@@ -17,7 +17,7 @@ use phpOMS\Model\Message\NotifyType;
class NotifyTypeTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(5, count(NotifyType::getConstants()));
self::assertEquals(NotifyType::getConstants(), array_unique(NotifyType::getConstants()));
diff --git a/tests/Model/Message/RedirectTest.php b/tests/Model/Message/RedirectTest.php
index 13f601dd7..501217f9b 100644
--- a/tests/Model/Message/RedirectTest.php
+++ b/tests/Model/Message/RedirectTest.php
@@ -18,7 +18,7 @@ use phpOMS\Model\Message\Redirect;
class RedirectTest extends \PHPUnit\Framework\TestCase
{
- public function testAttributes()
+ public function testAttributes() : void
{
$obj = new Redirect('');
self::assertInstanceOf('\phpOMS\Model\Message\Redirect', $obj);
@@ -29,7 +29,7 @@ class RedirectTest extends \PHPUnit\Framework\TestCase
self::assertObjectHasAttribute('new', $obj);
}
- public function testDefault()
+ public function testDefault() : void
{
$obj = new Redirect('');
@@ -39,7 +39,7 @@ class RedirectTest extends \PHPUnit\Framework\TestCase
self::assertEquals(false, $obj->toArray()['new']);
}
- public function testSetGet()
+ public function testSetGet() : void
{
$obj = new Redirect('url', true);
diff --git a/tests/Model/Message/ReloadTest.php b/tests/Model/Message/ReloadTest.php
index a58193d8a..dd176ce70 100644
--- a/tests/Model/Message/ReloadTest.php
+++ b/tests/Model/Message/ReloadTest.php
@@ -18,7 +18,7 @@ use phpOMS\Model\Message\Reload;
class ReloadTest extends \PHPUnit\Framework\TestCase
{
- public function testAttributes()
+ public function testAttributes() : void
{
$obj = new Reload();
self::assertInstanceOf('\phpOMS\Model\Message\Reload', $obj);
@@ -27,7 +27,7 @@ class ReloadTest extends \PHPUnit\Framework\TestCase
self::assertObjectHasAttribute('delay', $obj);
}
- public function testDefault()
+ public function testDefault() : void
{
$obj = new Reload();
@@ -35,7 +35,7 @@ class ReloadTest extends \PHPUnit\Framework\TestCase
self::assertEquals(0, $obj->toArray()['time']);
}
- public function testSetGet()
+ public function testSetGet() : void
{
$obj = new Reload(5);
diff --git a/tests/Module/Exception/InvalidModuleExceptionTest.php b/tests/Module/Exception/InvalidModuleExceptionTest.php
index 5810ab339..c209d912b 100644
--- a/tests/Module/Exception/InvalidModuleExceptionTest.php
+++ b/tests/Module/Exception/InvalidModuleExceptionTest.php
@@ -17,7 +17,7 @@ use phpOMS\Module\Exception\InvalidModuleException;
class InvalidModuleExceptionTest extends \PHPUnit\Framework\TestCase
{
- public function testException()
+ public function testException() : void
{
self::assertInstanceOf(\UnexpectedValueException::class, new InvalidModuleException(''));
}
diff --git a/tests/Module/Exception/InvalidThemeExceptionTest.php b/tests/Module/Exception/InvalidThemeExceptionTest.php
index 6fc8384e1..aeb53a97e 100644
--- a/tests/Module/Exception/InvalidThemeExceptionTest.php
+++ b/tests/Module/Exception/InvalidThemeExceptionTest.php
@@ -17,7 +17,7 @@ use phpOMS\Module\Exception\InvalidThemeException;
class InvalidThemeExceptionTest extends \PHPUnit\Framework\TestCase
{
- public function testException()
+ public function testException() : void
{
self::assertInstanceOf(\UnexpectedValueException::class, new InvalidThemeException(''));
}
diff --git a/tests/Module/InfoManagerTest.php b/tests/Module/InfoManagerTest.php
index 2c0d09a04..6aa437d6f 100644
--- a/tests/Module/InfoManagerTest.php
+++ b/tests/Module/InfoManagerTest.php
@@ -19,7 +19,7 @@ use phpOMS\Module\InfoManager;
class InfoManagerTest extends \PHPUnit\Framework\TestCase
{
- public function testInfoManager()
+ public function testInfoManager() : void
{
$info = new InfoManager(__DIR__ . '/info-test.json');
$info->load();
@@ -53,7 +53,7 @@ class InfoManagerTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidPathLoad()
+ public function testInvalidPathLoad() : void
{
$info = new InfoManager(__DIR__ . '/invalid.json');
$info->load();
@@ -62,7 +62,7 @@ class InfoManagerTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidPathUpdate()
+ public function testInvalidPathUpdate() : void
{
$info = new InfoManager(__DIR__ . '/invalid.json');
$info->update();
@@ -71,7 +71,7 @@ class InfoManagerTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidDataSet()
+ public function testInvalidDataSet() : void
{
$info = new InfoManager(__DIR__ . '/info-test.json');
$info->load();
@@ -79,7 +79,7 @@ class InfoManagerTest extends \PHPUnit\Framework\TestCase
$testObj = new class {
public $test = 1;
- public function test()
+ public function test() : void
{
echo $this->test;
}
diff --git a/tests/Module/ModuleAbstractTest.php b/tests/Module/ModuleAbstractTest.php
index 629e22cc6..ca2713cb8 100644
--- a/tests/Module/ModuleAbstractTest.php
+++ b/tests/Module/ModuleAbstractTest.php
@@ -19,7 +19,7 @@ use phpOMS\Module\ModuleAbstract;
class ModuleAbstractTest extends \PHPUnit\Framework\TestCase
{
- public function testModuleAbstract()
+ public function testModuleAbstract() : void
{
$moduleClass = new class(null) extends ModuleAbstract {
const MODULE_VERSION = '1.2.3';
diff --git a/tests/Module/ModuleFactoryTest.php b/tests/Module/ModuleFactoryTest.php
index 89bd0a064..66daa63d9 100644
--- a/tests/Module/ModuleFactoryTest.php
+++ b/tests/Module/ModuleFactoryTest.php
@@ -21,7 +21,7 @@ use phpOMS\Module\NullModule;
class ModuleFactoryTest extends \PHPUnit\Framework\TestCase
{
- public function testFactory()
+ public function testFactory() : void
{
$instance = NullModule::class;
if (\file_exists(__DIR__ . '/../../../Modules')) {
diff --git a/tests/Module/ModuleManagerTest.php b/tests/Module/ModuleManagerTest.php
index 3a98310b6..426f4d4f1 100644
--- a/tests/Module/ModuleManagerTest.php
+++ b/tests/Module/ModuleManagerTest.php
@@ -24,7 +24,7 @@ class ModuleManagerTest extends \PHPUnit\Framework\TestCase
{
protected $app = null;
- protected function setUp()
+ protected function setUp() : void
{
$this->app = new class extends ApplicationAbstract { protected $appName = 'Api'; };
$this->app->appName = 'Api';
@@ -32,7 +32,7 @@ class ModuleManagerTest extends \PHPUnit\Framework\TestCase
$this->app->dispatcher = new Dispatcher($this->app);
}
- public function testAttributes()
+ public function testAttributes() : void
{
$moduleManager = new ModuleManager($this->app, __DIR__ . '/../../../Modules');
self::assertInstanceOf('\phpOMS\Module\ModuleManager', $moduleManager);
@@ -44,20 +44,20 @@ class ModuleManagerTest extends \PHPUnit\Framework\TestCase
self::assertObjectHasAttribute('uriLoad', $moduleManager);
}
- public function testUnknownModuleInit()
+ public function testUnknownModuleInit() : void
{
$moduleManager = new ModuleManager($this->app, __DIR__ . '/../../../Modules');
$moduleManager->initModule('doesNotExist');
self::assertInstanceOf('\phpOMS\Module\NullModule', $moduleManager->get('doesNotExist'));
}
- public function testUnknownModuleGet()
+ public function testUnknownModuleGet() : void
{
$moduleManager = new ModuleManager($this->app, __DIR__ . '/../../../Modules');
self::assertInstanceOf('\phpOMS\Module\NullModule', $moduleManager->get('doesNotExist2'));
}
- public function testUnknwonModuleModification()
+ public function testUnknwonModuleModification() : void
{
$moduleManager = new ModuleManager($this->app, __DIR__ . '/../../../Modules');
@@ -65,7 +65,7 @@ class ModuleManagerTest extends \PHPUnit\Framework\TestCase
self::assertFalse($moduleManager->deactivate('randomErrorTest1'));
}
- public function testGetSet()
+ public function testGetSet() : void
{
$this->app->router = new Router();
$this->app->dispatcher = new Dispatcher($this->app);
diff --git a/tests/Module/NullModuleTest.php b/tests/Module/NullModuleTest.php
index 6b8085337..9bde20f66 100644
--- a/tests/Module/NullModuleTest.php
+++ b/tests/Module/NullModuleTest.php
@@ -20,7 +20,7 @@ use phpOMS\Module\NullModule;
class NullModuleTest extends \PHPUnit\Framework\TestCase
{
- public function testModule()
+ public function testModule() : void
{
$app = new class extends ApplicationAbstract
{
diff --git a/tests/Module/PackageManagerTest.php b/tests/Module/PackageManagerTest.php
index 2dfcca373..7e0297a9d 100644
--- a/tests/Module/PackageManagerTest.php
+++ b/tests/Module/PackageManagerTest.php
@@ -21,7 +21,7 @@ use phpOMS\Utils\IO\Zip\Zip;
class PackageManagerTest extends \PHPUnit\Framework\TestCase
{
- public static function setUpBeforeClass()
+ public static function setUpBeforeClass() : void
{
if (file_exists(__DIR__ . '/testPackage.zip')) {
unlink(__DIR__ . '/testPackage.zip');
@@ -75,7 +75,7 @@ class PackageManagerTest extends \PHPUnit\Framework\TestCase
);
}
- public function testPackageValid()
+ public function testPackageValid() : void
{
$package = new PackageManager(
__DIR__ . '/testPackage.zip',
@@ -88,7 +88,7 @@ class PackageManagerTest extends \PHPUnit\Framework\TestCase
self::assertTrue($package->isValid());
}
- public function testPackageInvalidKey()
+ public function testPackageInvalidKey() : void
{
$package = new PackageManager(
__DIR__ . '/testPackage.zip',
@@ -101,7 +101,7 @@ class PackageManagerTest extends \PHPUnit\Framework\TestCase
self::assertFalse($package->isValid());
}
- public function testPackageInvalidContent()
+ public function testPackageInvalidContent() : void
{
$package = new PackageManager(
__DIR__ . '/testPackage.zip',
@@ -115,7 +115,7 @@ class PackageManagerTest extends \PHPUnit\Framework\TestCase
self::assertFalse($package->isValid());
}
- public function testCleanup()
+ public function testCleanup() : void
{
$package = new PackageManager(
__DIR__ . '/testPackage.zip',
@@ -130,7 +130,7 @@ class PackageManagerTest extends \PHPUnit\Framework\TestCase
self::assertFalse(file_exists(__DIR__ . '/testPackageExtracted'));
}
- public static function tearDownAfterClass()
+ public static function tearDownAfterClass() : void
{
if (file_exists(__DIR__ . '/testPackage.zip')) {
unlink(__DIR__ . '/testPackage.zip');
diff --git a/tests/Router/RouteVerbTest.php b/tests/Router/RouteVerbTest.php
index f5a1524f7..4f344c4ea 100644
--- a/tests/Router/RouteVerbTest.php
+++ b/tests/Router/RouteVerbTest.php
@@ -19,7 +19,7 @@ use phpOMS\Router\RouteVerb;
class RouteVerbTest extends \PHPUnit\Framework\TestCase
{
- public function testEnum()
+ public function testEnum() : void
{
self::assertTrue(\defined('phpOMS\Router\RouteVerb::GET'));
self::assertTrue(\defined('phpOMS\Router\RouteVerb::PUT'));
@@ -28,7 +28,7 @@ class RouteVerbTest extends \PHPUnit\Framework\TestCase
self::assertTrue(\defined('phpOMS\Router\RouteVerb::ANY'));
}
- public function testEnumUnique()
+ public function testEnumUnique() : void
{
$values = RouteVerb::getConstants();
self::assertEquals(\count($values), array_sum(array_count_values($values)));
diff --git a/tests/Router/RouterTest.php b/tests/Router/RouterTest.php
index 5df7df8c7..922741eb1 100644
--- a/tests/Router/RouterTest.php
+++ b/tests/Router/RouterTest.php
@@ -22,21 +22,21 @@ require_once __DIR__ . '/../Autoloader.php';
class RouterTest extends \PHPUnit\Framework\TestCase
{
- public function testAttributes()
+ public function testAttributes() : void
{
$router = new Router();
self::assertInstanceOf('\phpOMS\Router\Router', $router);
self::assertObjectHasAttribute('routes', $router);
}
- public function testDefault()
+ public function testDefault() : void
{
$router = new Router();
self::assertEmpty($router->route(new Request(new Http('http://test.com'))));
self::assertEmpty($router->route('http://test.com'));
}
- public function testGetSet()
+ public function testGetSet() : void
{
$router = new Router();
self::assertFalse($router->importFromFile(__Dir__ . '/invalidFile.php'));
diff --git a/tests/Security/PhpCodeTest.php b/tests/Security/PhpCodeTest.php
index 9e9a4060c..f03784bb6 100644
--- a/tests/Security/PhpCodeTest.php
+++ b/tests/Security/PhpCodeTest.php
@@ -19,7 +19,7 @@ use phpOMS\Security\PhpCode;
class RouteVerbTest extends \PHPUnit\Framework\TestCase
{
- public function testHasUnicode()
+ public function testHasUnicode() : void
{
self::assertTrue(
PhpCode::hasUnicode(
@@ -38,13 +38,13 @@ class RouteVerbTest extends \PHPUnit\Framework\TestCase
);
}
- public function testDisabledFunctions()
+ public function testDisabledFunctions() : void
{
self::assertFalse(PhpCode::isDisabled(['file_get_contents']));
self::assertFalse(PhpCode::isDisabled(['eval', 'file_get_contents']));
}
- public function testHasDeprecatedFunction()
+ public function testHasDeprecatedFunction() : void
{
self::assertTrue(
PhpCode::hasDeprecatedFunction(
@@ -63,13 +63,13 @@ class RouteVerbTest extends \PHPUnit\Framework\TestCase
);
}
- public function testFileIntegrity()
+ public function testFileIntegrity() : void
{
self::assertTrue(PhpCode::validateFileIntegrity(__DIR__ . '/Sample/hasDeprecated.php', \md5_file(__DIR__ . '/Sample/hasDeprecated.php')));
self::assertFalse(PhpCode::validateFileIntegrity(__DIR__ . '/Sample/hasUnicode.php', \md5_file(__DIR__ . '/Sample/hasDeprecated.php')));
}
- public function testStringIntegrity()
+ public function testStringIntegrity() : void
{
self::assertTrue(PhpCode::validateStringIntegrity('aa', 'aa'));
self::assertFalse(PhpCode::validateStringIntegrity('aa', 'aA'));
diff --git a/tests/Socket/Client/ClientConnectionTest.php b/tests/Socket/Client/ClientConnectionTest.php
index 5421bc789..a40ead203 100644
--- a/tests/Socket/Client/ClientConnectionTest.php
+++ b/tests/Socket/Client/ClientConnectionTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Socket\Client;
class ClientConnectionTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Socket/Client/ClientTest.php b/tests/Socket/Client/ClientTest.php
index 124f39f36..9666dad42 100644
--- a/tests/Socket/Client/ClientTest.php
+++ b/tests/Socket/Client/ClientTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Socket\Client;
class ClientTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Socket/Client/NullClientConnectionTest.php b/tests/Socket/Client/NullClientConnectionTest.php
index 308581abc..ef885f282 100644
--- a/tests/Socket/Client/NullClientConnectionTest.php
+++ b/tests/Socket/Client/NullClientConnectionTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Socket\Client;
class NullClientConnectionTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Socket/CommandManagerTest.php b/tests/Socket/CommandManagerTest.php
index 3b4c21257..a3584cfed 100644
--- a/tests/Socket/CommandManagerTest.php
+++ b/tests/Socket/CommandManagerTest.php
@@ -18,7 +18,7 @@ require_once __DIR__ . '/../Autoloader.php';
class CommandManagerTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Socket/Packets/HeaderTest.php b/tests/Socket/Packets/HeaderTest.php
index 0f9ecbf0b..99bdf180d 100644
--- a/tests/Socket/Packets/HeaderTest.php
+++ b/tests/Socket/Packets/HeaderTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Socket\Packets;
class HeaderTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Socket/Packets/PacketManagerTest.php b/tests/Socket/Packets/PacketManagerTest.php
index 2f2759b1f..e9de552bc 100644
--- a/tests/Socket/Packets/PacketManagerTest.php
+++ b/tests/Socket/Packets/PacketManagerTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Socket\Packets;
class PacketManagerTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Socket/Packets/PacketTypeTest.php b/tests/Socket/Packets/PacketTypeTest.php
index 1ce712e81..9cac1ce19 100644
--- a/tests/Socket/Packets/PacketTypeTest.php
+++ b/tests/Socket/Packets/PacketTypeTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Socket\Packets;
class PacketTypeTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Socket/Server/ClientManagerTest.php b/tests/Socket/Server/ClientManagerTest.php
index 4cfe2dd0b..c530de602 100644
--- a/tests/Socket/Server/ClientManagerTest.php
+++ b/tests/Socket/Server/ClientManagerTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Socket\Server;
class ClientManagerTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Socket/Server/ServerTest.php b/tests/Socket/Server/ServerTest.php
index acd69be22..3deabb6d1 100644
--- a/tests/Socket/Server/ServerTest.php
+++ b/tests/Socket/Server/ServerTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Socket\Server;
class ServerTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Socket/SocketTypeTest.php b/tests/Socket/SocketTypeTest.php
index 07ef242c3..e7c03e6b8 100644
--- a/tests/Socket/SocketTypeTest.php
+++ b/tests/Socket/SocketTypeTest.php
@@ -18,7 +18,7 @@ require_once __DIR__ . '/../Autoloader.php';
class SocketTypeTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Stdlib/Base/AddressTest.php b/tests/Stdlib/Base/AddressTest.php
index f51b7e021..ae7d3190c 100644
--- a/tests/Stdlib/Base/AddressTest.php
+++ b/tests/Stdlib/Base/AddressTest.php
@@ -18,7 +18,7 @@ use phpOMS\Stdlib\Base\Location;
class AddressTest extends \PHPUnit\Framework\TestCase
{
- public function testAttributes()
+ public function testAttributes() : void
{
$address = new Address();
self::assertObjectHasAttribute('recipient', $address);
@@ -26,7 +26,7 @@ class AddressTest extends \PHPUnit\Framework\TestCase
self::assertObjectHasAttribute('location', $address);
}
- public function testDefault()
+ public function testDefault() : void
{
$expected = [
'recipient' => '',
@@ -52,7 +52,7 @@ class AddressTest extends \PHPUnit\Framework\TestCase
self::assertEquals($expected, $address->jsonSerialize());
}
- public function testGetSet()
+ public function testGetSet() : void
{
$expected = [
'recipient' => 'recipient',
diff --git a/tests/Stdlib/Base/AddressTypeTest.php b/tests/Stdlib/Base/AddressTypeTest.php
index aaf39a09e..5dcc75b5e 100644
--- a/tests/Stdlib/Base/AddressTypeTest.php
+++ b/tests/Stdlib/Base/AddressTypeTest.php
@@ -17,7 +17,7 @@ use phpOMS\Stdlib\Base\AddressType;
class AddressTypeTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(7, \count(AddressType::getconstants()));
self::assertEquals(1, AddressType::HOME);
diff --git a/tests/Stdlib/Base/EnumArrayTest.php b/tests/Stdlib/Base/EnumArrayTest.php
index 5629c1405..a46b97411 100644
--- a/tests/Stdlib/Base/EnumArrayTest.php
+++ b/tests/Stdlib/Base/EnumArrayTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Stdlib\Base;
class EnumArrayTest extends \PHPUnit\Framework\TestCase
{
- public function testGetSet()
+ public function testGetSet() : void
{
self::assertEquals(1, EnumArrayDemo::get('ENUM1'));
self::assertEquals('abc', EnumArrayDemo::get('ENUM2'));
@@ -34,7 +34,7 @@ class EnumArrayTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \OutOfBoundsException
*/
- public function testInvalidConstantException()
+ public function testInvalidConstantException() : void
{
EnumArrayDemo::get('enum2');
}
diff --git a/tests/Stdlib/Base/EnumTest.php b/tests/Stdlib/Base/EnumTest.php
index cc0df2963..4904d84b2 100644
--- a/tests/Stdlib/Base/EnumTest.php
+++ b/tests/Stdlib/Base/EnumTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Stdlib\Base;
class EnumTest extends \PHPUnit\Framework\TestCase
{
- public function testGetSet()
+ public function testGetSet() : void
{
self::assertTrue(EnumDemo::isValidName('ENUM1'));
self::assertFalse(EnumDemo::isValidName('enum1'));
@@ -37,7 +37,7 @@ class EnumTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \Exception
*/
- public function testEmailException()
+ public function testEmailException() : void
{
EnumDemo::getByName('ENUM3');
}
diff --git a/tests/Stdlib/Base/Exception/InvalidEnumNameTest.php b/tests/Stdlib/Base/Exception/InvalidEnumNameTest.php
index a9f2659b3..67a9b76f9 100644
--- a/tests/Stdlib/Base/Exception/InvalidEnumNameTest.php
+++ b/tests/Stdlib/Base/Exception/InvalidEnumNameTest.php
@@ -17,7 +17,7 @@ use phpOMS\Stdlib\Base\Exception\InvalidEnumName;
class InvalidEnumNameTest extends \PHPUnit\Framework\TestCase
{
- public function testException()
+ public function testException() : void
{
self::assertInstanceOf(\UnexpectedValueException::class, new InvalidEnumName(''));
}
diff --git a/tests/Stdlib/Base/Exception/InvalidEnumValueTest.php b/tests/Stdlib/Base/Exception/InvalidEnumValueTest.php
index 3c05db311..327668654 100644
--- a/tests/Stdlib/Base/Exception/InvalidEnumValueTest.php
+++ b/tests/Stdlib/Base/Exception/InvalidEnumValueTest.php
@@ -17,7 +17,7 @@ use phpOMS\Stdlib\Base\Exception\InvalidEnumValue;
class InvalidEnumValueTest extends \PHPUnit\Framework\TestCase
{
- public function testException()
+ public function testException() : void
{
self::assertInstanceOf(\UnexpectedValueException::class, new InvalidEnumValue(''));
}
diff --git a/tests/Stdlib/Base/IbanTest.php b/tests/Stdlib/Base/IbanTest.php
index b367d8da6..e15665255 100644
--- a/tests/Stdlib/Base/IbanTest.php
+++ b/tests/Stdlib/Base/IbanTest.php
@@ -18,13 +18,13 @@ use phpOMS\Stdlib\Base\Iban;
class IbanTest extends \PHPUnit\Framework\TestCase
{
- public function testAttributes()
+ public function testAttributes() : void
{
$iban = new Iban('DE22 6008 0000 0960 0280 00');
self::assertObjectHasAttribute('iban', $iban);
}
- public function testMethods()
+ public function testMethods() : void
{
$strRepresentation = 'DE22 6008 0000 0960 0280 00';
$iban = new Iban($strRepresentation);
@@ -52,7 +52,7 @@ class IbanTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidIbanCountry()
+ public function testInvalidIbanCountry() : void
{
$iban = new Iban('ZZ22 6008 0000 0960 0280 00');
}
@@ -60,7 +60,7 @@ class IbanTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidIbanLength()
+ public function testInvalidIbanLength() : void
{
$iban = new Iban('DE22 6008 0000 0960 0280 0');
}
@@ -68,7 +68,7 @@ class IbanTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidIbanChecksum()
+ public function testInvalidIbanChecksum() : void
{
$iban = new Iban('DEA9 6008 0000 0960 0280 00');
}
diff --git a/tests/Stdlib/Base/LocationTest.php b/tests/Stdlib/Base/LocationTest.php
index 79e699623..1385b783f 100644
--- a/tests/Stdlib/Base/LocationTest.php
+++ b/tests/Stdlib/Base/LocationTest.php
@@ -18,7 +18,7 @@ use phpOMS\Stdlib\Base\Location;
class LocationTest extends \PHPUnit\Framework\TestCase
{
- public function testAttributes()
+ public function testAttributes() : void
{
$location = new Location();
self::assertObjectHasAttribute('postal', $location);
@@ -29,7 +29,7 @@ class LocationTest extends \PHPUnit\Framework\TestCase
self::assertObjectHasAttribute('geo', $location);
}
- public function testDefault()
+ public function testDefault() : void
{
$expected = [
'postal' => '',
@@ -56,7 +56,7 @@ class LocationTest extends \PHPUnit\Framework\TestCase
self::assertEquals($expected, $location->jsonSerialize());
}
- public function testGetSet()
+ public function testGetSet() : void
{
$expected = [
'postal' => '0123456789',
diff --git a/tests/Stdlib/Base/NullLocationTest.php b/tests/Stdlib/Base/NullLocationTest.php
index 8654d379f..d8403b18e 100644
--- a/tests/Stdlib/Base/NullLocationTest.php
+++ b/tests/Stdlib/Base/NullLocationTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Stdlib\Base;
class NullLocationTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Stdlib/Base/PhoneTypeTest.php b/tests/Stdlib/Base/PhoneTypeTest.php
index 144387b75..90ea961ac 100644
--- a/tests/Stdlib/Base/PhoneTypeTest.php
+++ b/tests/Stdlib/Base/PhoneTypeTest.php
@@ -17,7 +17,7 @@ use phpOMS\Stdlib\Base\PhoneType;
class PhoneTypeTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(4, \count(PhoneType::getConstants()));
self::assertEquals(1, PhoneType::HOME);
diff --git a/tests/Stdlib/Base/SmartDateTimeTest.php b/tests/Stdlib/Base/SmartDateTimeTest.php
index fae82da34..20ec00d0d 100644
--- a/tests/Stdlib/Base/SmartDateTimeTest.php
+++ b/tests/Stdlib/Base/SmartDateTimeTest.php
@@ -17,13 +17,13 @@ use phpOMS\Stdlib\Base\SmartDateTime;
class SmartDateTimeTest extends \PHPUnit\Framework\TestCase
{
- public function testAttributes()
+ public function testAttributes() : void
{
$datetime = new SmartDateTime();
self::assertInstanceOf('\DateTime', $datetime);
}
- public function testGetSet()
+ public function testGetSet() : void
{
$datetime = new SmartDateTime('1970-01-01');
self::assertEquals('1970-01-01', $datetime->format('Y-m-d'));
diff --git a/tests/Stdlib/Graph/BinaryTreeTest.php b/tests/Stdlib/Graph/BinaryTreeTest.php
index 6e63d4a34..02fe1a459 100644
--- a/tests/Stdlib/Graph/BinaryTreeTest.php
+++ b/tests/Stdlib/Graph/BinaryTreeTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Stdlib\Graph;
class BinaryTreeTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Stdlib/Graph/EdgeTest.php b/tests/Stdlib/Graph/EdgeTest.php
index a1f7229ab..e548ee535 100644
--- a/tests/Stdlib/Graph/EdgeTest.php
+++ b/tests/Stdlib/Graph/EdgeTest.php
@@ -18,7 +18,7 @@ use phpOMS\Stdlib\Graph\Node;
class EdgeTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
$edge = new Edge(new Node(), new Node());
self::assertEquals([new Node(), new Node()], $edge->getNodes());
diff --git a/tests/Stdlib/Graph/GraphTest.php b/tests/Stdlib/Graph/GraphTest.php
index 932066cd9..e479d1e4d 100644
--- a/tests/Stdlib/Graph/GraphTest.php
+++ b/tests/Stdlib/Graph/GraphTest.php
@@ -17,7 +17,7 @@ use phpOMS\Stdlib\Graph\Graph;
class GraphTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
$graph = new Graph();
diff --git a/tests/Stdlib/Graph/NodeTest.php b/tests/Stdlib/Graph/NodeTest.php
index db7f67b2f..bc5dbe807 100644
--- a/tests/Stdlib/Graph/NodeTest.php
+++ b/tests/Stdlib/Graph/NodeTest.php
@@ -17,13 +17,13 @@ use phpOMS\Stdlib\Graph\Node;
class NodeTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
$node = new Node();
self::assertEquals(null, $node->getData());
}
- public function testGetSet()
+ public function testGetSet() : void
{
$node = new Node(1);
self::assertEquals(1, $node->getData());
diff --git a/tests/Stdlib/Graph/TreeTest.php b/tests/Stdlib/Graph/TreeTest.php
index 4fef51ccf..2509ac7a8 100644
--- a/tests/Stdlib/Graph/TreeTest.php
+++ b/tests/Stdlib/Graph/TreeTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Stdlib\Graph;
class TreeTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Stdlib/Map/KeyTypeTest.php b/tests/Stdlib/Map/KeyTypeTest.php
index 6cdd1106c..79bd5275d 100644
--- a/tests/Stdlib/Map/KeyTypeTest.php
+++ b/tests/Stdlib/Map/KeyTypeTest.php
@@ -17,7 +17,7 @@ use phpOMS\Stdlib\Map\KeyType;
class KeyTypeTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(2, \count(KeyType::getConstants()));
self::assertEquals(0, KeyType::SINGLE);
diff --git a/tests/Stdlib/Map/MultiMapTest.php b/tests/Stdlib/Map/MultiMapTest.php
index a15886134..e94672bf9 100644
--- a/tests/Stdlib/Map/MultiMapTest.php
+++ b/tests/Stdlib/Map/MultiMapTest.php
@@ -19,7 +19,7 @@ use phpOMS\Stdlib\Map\OrderType;
class MultiMapTest extends \PHPUnit\Framework\TestCase
{
- public function testAttributes()
+ public function testAttributes() : void
{
$map = new MultiMap();
self::assertInstanceOf('\phpOMS\Stdlib\Map\MultiMap', $map);
@@ -29,7 +29,7 @@ class MultiMapTest extends \PHPUnit\Framework\TestCase
self::assertObjectHasAttribute('keys', $map);
}
- public function testDefault()
+ public function testDefault() : void
{
$map = new MultiMap();
@@ -45,7 +45,7 @@ class MultiMapTest extends \PHPUnit\Framework\TestCase
self::assertFalse($map->remove('someKey'));
}
- public function testBasicAddAny()
+ public function testBasicAddAny() : void
{
$map = new MultiMap();
@@ -56,7 +56,7 @@ class MultiMapTest extends \PHPUnit\Framework\TestCase
self::assertEquals('val1', $map->get('b'));
}
- public function testOverwriteAny()
+ public function testOverwriteAny() : void
{
$map = new MultiMap();
@@ -68,7 +68,7 @@ class MultiMapTest extends \PHPUnit\Framework\TestCase
self::assertEquals('val2', $map->get('b'));
}
- public function testOverwritePartialFalseAny()
+ public function testOverwritePartialFalseAny() : void
{
$map = new MultiMap();
@@ -81,7 +81,7 @@ class MultiMapTest extends \PHPUnit\Framework\TestCase
self::assertEquals('val3', $map->get('c'));
}
- public function testOverwriteFalseFalseAny()
+ public function testOverwriteFalseFalseAny() : void
{
$map = new MultiMap();
@@ -95,7 +95,7 @@ class MultiMapTest extends \PHPUnit\Framework\TestCase
self::assertEquals('val3', $map->get('c'));
}
- public function testSetAny()
+ public function testSetAny() : void
{
$map = new MultiMap();
@@ -114,7 +114,7 @@ class MultiMapTest extends \PHPUnit\Framework\TestCase
self::assertEquals('val3', $map->get('c'));
}
- public function testRemapAny()
+ public function testRemapAny() : void
{
$map = new MultiMap();
@@ -144,7 +144,7 @@ class MultiMapTest extends \PHPUnit\Framework\TestCase
self::assertEquals('val3', $map->get('c'));
}
- public function testMapInfoAny()
+ public function testMapInfoAny() : void
{
$map = new MultiMap();
@@ -161,7 +161,7 @@ class MultiMapTest extends \PHPUnit\Framework\TestCase
self::assertTrue(\is_array($map->values()));
}
- public function testSiblingsAny()
+ public function testSiblingsAny() : void
{
$map = new MultiMap();
@@ -179,7 +179,7 @@ class MultiMapTest extends \PHPUnit\Framework\TestCase
self::assertEquals(['a'], $siblings);
}
- public function testRemoveAny()
+ public function testRemoveAny() : void
{
$map = new MultiMap();
@@ -206,7 +206,7 @@ class MultiMapTest extends \PHPUnit\Framework\TestCase
self::assertEquals(1, \count($map->values()));
}
- public function testBasicAddExact()
+ public function testBasicAddExact() : void
{
$map = new MultiMap(KeyType::MULTIPLE);
@@ -217,7 +217,7 @@ class MultiMapTest extends \PHPUnit\Framework\TestCase
self::assertEquals('val1', $map->get(['b', 'a']));
}
- public function testBasicAddExactOrdered()
+ public function testBasicAddExactOrdered() : void
{
$map = new MultiMap(KeyType::MULTIPLE, OrderType::STRICT);
@@ -228,7 +228,7 @@ class MultiMapTest extends \PHPUnit\Framework\TestCase
self::assertEquals(null, $map->get(['b', 'a']));
}
- public function testOverwriteExact()
+ public function testOverwriteExact() : void
{
$map = new MultiMap(KeyType::MULTIPLE);
@@ -239,7 +239,7 @@ class MultiMapTest extends \PHPUnit\Framework\TestCase
self::assertEquals('val2', $map->get(['a', 'b']));
}
- public function testOverwritePartialFalseExact()
+ public function testOverwritePartialFalseExact() : void
{
$map = new MultiMap(KeyType::MULTIPLE);
@@ -251,7 +251,7 @@ class MultiMapTest extends \PHPUnit\Framework\TestCase
self::assertEquals('val3', $map->get(['c', 'a']));
}
- public function testOverwriteFalseFalseExact()
+ public function testOverwriteFalseFalseExact() : void
{
$map = new MultiMap(KeyType::MULTIPLE);
@@ -264,7 +264,7 @@ class MultiMapTest extends \PHPUnit\Framework\TestCase
self::assertEquals('val3', $map->get(['a', 'c']));
}
- public function testSetExact()
+ public function testSetExact() : void
{
$map = new MultiMap(KeyType::MULTIPLE);
@@ -282,7 +282,7 @@ class MultiMapTest extends \PHPUnit\Framework\TestCase
self::assertEquals('val4', $map->get(['b', 'a']));
}
- public function testSetExactOrdered()
+ public function testSetExactOrdered() : void
{
$map = new MultiMap(KeyType::MULTIPLE, OrderType::STRICT);
@@ -303,7 +303,7 @@ class MultiMapTest extends \PHPUnit\Framework\TestCase
self::assertFalse($set);
}
- public function testRemapExact()
+ public function testRemapExact() : void
{
$map = new MultiMap(KeyType::MULTIPLE);
@@ -313,7 +313,7 @@ class MultiMapTest extends \PHPUnit\Framework\TestCase
self::assertFalse($remap);
}
- public function testSiblingsExact()
+ public function testSiblingsExact() : void
{
$map = new MultiMap(KeyType::MULTIPLE);
@@ -321,7 +321,7 @@ class MultiMapTest extends \PHPUnit\Framework\TestCase
self::assertEquals([['a', 'b'], ['b', 'a']], $map->getSiblings(['a', 'b']));
}
- public function testSiblingsExactOrdered()
+ public function testSiblingsExactOrdered() : void
{
$map = new MultiMap(KeyType::MULTIPLE, OrderType::STRICT);
@@ -329,7 +329,7 @@ class MultiMapTest extends \PHPUnit\Framework\TestCase
self::assertEquals([], $map->getSiblings(['a', 'b']));
}
- public function testRemoveExact()
+ public function testRemoveExact() : void
{
$map = new MultiMap(KeyType::MULTIPLE);
@@ -350,7 +350,7 @@ class MultiMapTest extends \PHPUnit\Framework\TestCase
self::assertFalse($map->removeKey(['a', 'b']));
}
- public function testRemoveExactOrdered()
+ public function testRemoveExactOrdered() : void
{
$map = new MultiMap(KeyType::MULTIPLE, OrderType::STRICT);
diff --git a/tests/Stdlib/Map/OrderTypeTest.php b/tests/Stdlib/Map/OrderTypeTest.php
index 99a74f780..8d3580861 100644
--- a/tests/Stdlib/Map/OrderTypeTest.php
+++ b/tests/Stdlib/Map/OrderTypeTest.php
@@ -17,7 +17,7 @@ use phpOMS\Stdlib\Map\OrderType;
class OrderTypeTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(2, \count(OrderType::getConstants()));
self::assertEquals(0, OrderType::LOOSE);
diff --git a/tests/Stdlib/Queue/PriorityModeTest.php b/tests/Stdlib/Queue/PriorityModeTest.php
index c69758a5d..121b28838 100644
--- a/tests/Stdlib/Queue/PriorityModeTest.php
+++ b/tests/Stdlib/Queue/PriorityModeTest.php
@@ -17,7 +17,7 @@ use phpOMS\Stdlib\Queue\PriorityMode;
class PriorityModeTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(4, \count(PriorityMode::getConstants()));
self::assertEquals(1, PriorityMode::FIFO);
diff --git a/tests/Stdlib/Queue/PriorityQueueTest.php b/tests/Stdlib/Queue/PriorityQueueTest.php
index e8f4131b3..2a3d02e7b 100644
--- a/tests/Stdlib/Queue/PriorityQueueTest.php
+++ b/tests/Stdlib/Queue/PriorityQueueTest.php
@@ -18,7 +18,7 @@ use phpOMS\Stdlib\Queue\PriorityQueue;
class PriorityQueueTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
$queue = new PriorityQueue();
self::assertEquals(0, $queue->count());
@@ -28,7 +28,7 @@ class PriorityQueueTest extends \PHPUnit\Framework\TestCase
self::assertEquals(PriorityMode::FIFO, $queue->getType());
}
- public function testGeneral()
+ public function testGeneral() : void
{
$queue = new PriorityQueue();
@@ -58,7 +58,7 @@ class PriorityQueueTest extends \PHPUnit\Framework\TestCase
self::assertEquals($queue->serialize(), $queue2->serialize());
}
- public function testFIFO()
+ public function testFIFO() : void
{
$queue = new PriorityQueue(PriorityMode::FIFO);
@@ -97,7 +97,7 @@ class PriorityQueueTest extends \PHPUnit\Framework\TestCase
self::assertEquals(1, $queue->count());
}
- public function testLIFO()
+ public function testLIFO() : void
{
$queue = new PriorityQueue(PriorityMode::LIFO);
@@ -135,7 +135,7 @@ class PriorityQueueTest extends \PHPUnit\Framework\TestCase
self::assertEquals(1, $queue->count());
}
- public function testHighest()
+ public function testHighest() : void
{
$queue = new PriorityQueue(PriorityMode::HIGHEST);
@@ -173,7 +173,7 @@ class PriorityQueueTest extends \PHPUnit\Framework\TestCase
self::assertEquals(1, $queue->count());
}
- public function testLowest()
+ public function testLowest() : void
{
$queue = new PriorityQueue(PriorityMode::LOWEST);
@@ -214,7 +214,7 @@ class PriorityQueueTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\Stdlib\Base\Exception\InvalidEnumValue
*/
- public function testInvalidPriority()
+ public function testInvalidPriority() : void
{
$queue = new PriorityQueue(99999);
}
diff --git a/tests/System/File/ContentPutModeTest.php b/tests/System/File/ContentPutModeTest.php
index e99f42928..1f888b6bc 100644
--- a/tests/System/File/ContentPutModeTest.php
+++ b/tests/System/File/ContentPutModeTest.php
@@ -17,7 +17,7 @@ use phpOMS\System\File\ContentPutMode;
class ContentPutModeTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(4, \count(ContentPutMode::getConstants()));
self::assertEquals(ContentPutMode::getConstants(), array_unique(ContentPutMode::getConstants()));
diff --git a/tests/System/File/ExtensionTypeTest.php b/tests/System/File/ExtensionTypeTest.php
index c530b41b9..d3fe7eca8 100644
--- a/tests/System/File/ExtensionTypeTest.php
+++ b/tests/System/File/ExtensionTypeTest.php
@@ -17,7 +17,7 @@ use phpOMS\System\File\ExtensionType;
class ExtensionTypeTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(10, \count(ExtensionType::getConstants()));
self::assertEquals(ExtensionType::getConstants(), array_unique(ExtensionType::getConstants()));
diff --git a/tests/System/File/FileUtilsTest.php b/tests/System/File/FileUtilsTest.php
index 0cb7f7fbc..a75b926cd 100644
--- a/tests/System/File/FileUtilsTest.php
+++ b/tests/System/File/FileUtilsTest.php
@@ -18,7 +18,7 @@ use phpOMS\System\File\FileUtils;
class FileUtilsTest extends \PHPUnit\Framework\TestCase
{
- public function testExtension()
+ public function testExtension() : void
{
self::assertEquals(ExtensionType::UNKNOWN, FileUtils::getExtensionType('test'));
self::assertEquals(ExtensionType::CODE, FileUtils::getExtensionType('php'));
@@ -32,7 +32,7 @@ class FileUtilsTest extends \PHPUnit\Framework\TestCase
self::assertEquals(ExtensionType::IMAGE, FileUtils::getExtensionType('png'));
}
- public function testAbsolute()
+ public function testAbsolute() : void
{
self::assertEquals('/test/ative', FileUtils::absolute('/test/path/for/../rel/../../ative'));
}
diff --git a/tests/System/File/Ftp/DirectoryTest.php b/tests/System/File/Ftp/DirectoryTest.php
index c730196cc..64f1727b0 100644
--- a/tests/System/File/Ftp/DirectoryTest.php
+++ b/tests/System/File/Ftp/DirectoryTest.php
@@ -21,7 +21,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase
const TEST = false;
const BASE = 'ftp://user:password@localhost';
- public function testStatic()
+ public function testStatic() : void
{
if (!self::TEST) {
return;
@@ -54,7 +54,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase
self::assertGreaterThan(0, Directory::permission($dirTestPath));
}
- public function testStaticMove()
+ public function testStaticMove() : void
{
if (!self::TEST) {
return;
@@ -81,7 +81,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidListPath()
+ public function testInvalidListPath() : void
{
if (!self::TEST) {
throw new PathException('');
@@ -93,7 +93,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidCopyPath()
+ public function testInvalidCopyPath() : void
{
if (!self::TEST) {
throw new PathException('');
@@ -105,7 +105,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidMovePath()
+ public function testInvalidMovePath() : void
{
if (!self::TEST) {
throw new PathException('');
@@ -117,7 +117,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidCreatedPath()
+ public function testInvalidCreatedPath() : void
{
if (!self::TEST) {
throw new PathException('');
@@ -129,7 +129,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidChangedPath()
+ public function testInvalidChangedPath() : void
{
if (!self::TEST) {
throw new PathException('');
@@ -141,7 +141,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidSizePath()
+ public function testInvalidSizePath() : void
{
if (!self::TEST) {
throw new PathException('');
@@ -153,7 +153,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidPermissionPath()
+ public function testInvalidPermissionPath() : void
{
if (!self::TEST) {
throw new PathException('');
@@ -165,7 +165,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidOwnerPath()
+ public function testInvalidOwnerPath() : void
{
if (!self::TEST) {
throw new PathException('');
diff --git a/tests/System/File/Ftp/FileTest.php b/tests/System/File/Ftp/FileTest.php
index b39f49e59..862cd8cb6 100644
--- a/tests/System/File/Ftp/FileTest.php
+++ b/tests/System/File/Ftp/FileTest.php
@@ -22,7 +22,7 @@ class FileTest extends \PHPUnit\Framework\TestCase
const TEST = false;
const BASE = 'ftp://user:password@localhost';
- public function testStatic()
+ public function testStatic() : void
{
if (!self::TEST) {
return;
@@ -90,7 +90,7 @@ class FileTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidGetPath()
+ public function testInvalidGetPath() : void
{
if (!self::TEST) {
throw new PathException('');
@@ -102,7 +102,7 @@ class FileTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidCopyPath()
+ public function testInvalidCopyPath() : void
{
if (!self::TEST) {
throw new PathException('');
@@ -114,7 +114,7 @@ class FileTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidMovePath()
+ public function testInvalidMovePath() : void
{
if (!self::TEST) {
throw new PathException('');
@@ -126,7 +126,7 @@ class FileTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidCreatedPath()
+ public function testInvalidCreatedPath() : void
{
if (!self::TEST) {
throw new PathException('');
@@ -138,7 +138,7 @@ class FileTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidChangedPath()
+ public function testInvalidChangedPath() : void
{
if (!self::TEST) {
throw new PathException('');
@@ -150,7 +150,7 @@ class FileTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidSizePath()
+ public function testInvalidSizePath() : void
{
if (!self::TEST) {
throw new PathException('');
@@ -162,7 +162,7 @@ class FileTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidPermissionPath()
+ public function testInvalidPermissionPath() : void
{
if (!self::TEST) {
throw new PathException('');
@@ -174,7 +174,7 @@ class FileTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidOwnerPath()
+ public function testInvalidOwnerPath() : void
{
if (!self::TEST) {
throw new PathException('');
diff --git a/tests/System/File/Ftp/FtpStorageTest.php b/tests/System/File/Ftp/FtpStorageTest.php
index 7e871bc6e..a4f61f77e 100644
--- a/tests/System/File/Ftp/FtpStorageTest.php
+++ b/tests/System/File/Ftp/FtpStorageTest.php
@@ -22,7 +22,7 @@ class FtpStorageTest extends \PHPUnit\Framework\TestCase
const TEST = false;
const BASE = 'ftp://user:password@localhost';
- public function testFile()
+ public function testFile() : void
{
if (!self::TEST) {
return;
@@ -87,7 +87,7 @@ class FtpStorageTest extends \PHPUnit\Framework\TestCase
\unlink($testFile);
}
- public function testDirectory()
+ public function testDirectory() : void
{
if (!self::TEST) {
return;
@@ -119,7 +119,7 @@ class FtpStorageTest extends \PHPUnit\Framework\TestCase
self::assertGreaterThan(0, FtpStorage::permission($dirTestPath));
}
- public function testDirectoryMove()
+ public function testDirectoryMove() : void
{
if (!self::TEST) {
return;
@@ -144,7 +144,7 @@ class FtpStorageTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidPutPath()
+ public function testInvalidPutPath() : void
{
if (!self::TEST) {
throw new PathException('');
@@ -156,7 +156,7 @@ class FtpStorageTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidGetPath()
+ public function testInvalidGetPath() : void
{
if (!self::TEST) {
throw new PathException('');
@@ -168,7 +168,7 @@ class FtpStorageTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidListPath()
+ public function testInvalidListPath() : void
{
if (!self::TEST) {
throw new PathException('');
@@ -180,7 +180,7 @@ class FtpStorageTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidSetPath()
+ public function testInvalidSetPath() : void
{
if (!self::TEST) {
throw new PathException('');
@@ -192,7 +192,7 @@ class FtpStorageTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidAppendPath()
+ public function testInvalidAppendPath() : void
{
if (!self::TEST) {
throw new PathException('');
@@ -204,7 +204,7 @@ class FtpStorageTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidPrependPath()
+ public function testInvalidPrependPath() : void
{
if (!self::TEST) {
throw new PathException('');
@@ -216,7 +216,7 @@ class FtpStorageTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidExtensionPath()
+ public function testInvalidExtensionPath() : void
{
if (!self::TEST) {
throw new PathException('');
diff --git a/tests/System/File/Local/DirectoryTest.php b/tests/System/File/Local/DirectoryTest.php
index f11ea6204..114408317 100644
--- a/tests/System/File/Local/DirectoryTest.php
+++ b/tests/System/File/Local/DirectoryTest.php
@@ -17,7 +17,7 @@ use phpOMS\System\File\Local\Directory;
class DirectoryTest extends \PHPUnit\Framework\TestCase
{
- public function testStatic()
+ public function testStatic() : void
{
$dirPath = __DIR__ . '/test';
self::assertTrue(Directory::create($dirPath));
@@ -47,7 +47,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase
self::assertGreaterThan(0, Directory::permission($dirTestPath));
}
- public function testStaticMove()
+ public function testStaticMove() : void
{
$dirTestPath = __DIR__ . '/dirtest';
@@ -70,7 +70,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidListPath()
+ public function testInvalidListPath() : void
{
Directory::list(__DIR__ . '/invalid.txt');
}
@@ -78,7 +78,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidCopyPath()
+ public function testInvalidCopyPath() : void
{
Directory::copy(__DIR__ . '/invalid', __DIR__ . '/invalid2');
}
@@ -86,7 +86,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidMovePath()
+ public function testInvalidMovePath() : void
{
Directory::move(__DIR__ . '/invalid', __DIR__ . '/invalid2');
}
@@ -94,7 +94,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidCreatedPath()
+ public function testInvalidCreatedPath() : void
{
Directory::created(__DIR__ . '/invalid');
}
@@ -102,7 +102,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidChangedPath()
+ public function testInvalidChangedPath() : void
{
Directory::changed(__DIR__ . '/invalid');
}
@@ -110,7 +110,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidSizePath()
+ public function testInvalidSizePath() : void
{
Directory::size(__DIR__ . '/invalid');
}
@@ -118,7 +118,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidPermissionPath()
+ public function testInvalidPermissionPath() : void
{
Directory::permission(__DIR__ . '/invalid');
}
@@ -126,7 +126,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidOwnerPath()
+ public function testInvalidOwnerPath() : void
{
Directory::owner(__DIR__ . '/invalid');
}
diff --git a/tests/System/File/Local/FileTest.php b/tests/System/File/Local/FileTest.php
index 0f9b38475..0e68e5b7b 100644
--- a/tests/System/File/Local/FileTest.php
+++ b/tests/System/File/Local/FileTest.php
@@ -18,7 +18,7 @@ use phpOMS\System\File\Local\File;
class FileTest extends \PHPUnit\Framework\TestCase
{
- public function testStatic()
+ public function testStatic() : void
{
$testFile = __DIR__ . '/test.txt';
self::assertFalse(File::put($testFile, 'test', ContentPutMode::REPLACE));
@@ -82,7 +82,7 @@ class FileTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidGetPath()
+ public function testInvalidGetPath() : void
{
File::get(__DIR__ . '/invalid.txt');
}
@@ -90,7 +90,7 @@ class FileTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidCopyPath()
+ public function testInvalidCopyPath() : void
{
File::copy(__DIR__ . '/invalid.txt', __DIR__ . '/invalid2.txt');
}
@@ -98,7 +98,7 @@ class FileTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidMovePath()
+ public function testInvalidMovePath() : void
{
File::move(__DIR__ . '/invalid.txt', __DIR__ . '/invalid2.txt');
}
@@ -106,7 +106,7 @@ class FileTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidCreatedPath()
+ public function testInvalidCreatedPath() : void
{
File::created(__DIR__ . '/invalid.txt');
}
@@ -114,7 +114,7 @@ class FileTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidChangedPath()
+ public function testInvalidChangedPath() : void
{
File::changed(__DIR__ . '/invalid.txt');
}
@@ -122,7 +122,7 @@ class FileTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidSizePath()
+ public function testInvalidSizePath() : void
{
File::size(__DIR__ . '/invalid.txt');
}
@@ -130,7 +130,7 @@ class FileTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidPermissionPath()
+ public function testInvalidPermissionPath() : void
{
File::permission(__DIR__ . '/invalid.txt');
}
@@ -138,7 +138,7 @@ class FileTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidOwnerPath()
+ public function testInvalidOwnerPath() : void
{
File::owner(__DIR__ . '/invalid.txt');
}
diff --git a/tests/System/File/Local/LocalStorageTest.php b/tests/System/File/Local/LocalStorageTest.php
index 948e823ea..5841c1876 100644
--- a/tests/System/File/Local/LocalStorageTest.php
+++ b/tests/System/File/Local/LocalStorageTest.php
@@ -18,7 +18,7 @@ use phpOMS\System\File\Local\LocalStorage;
class LocalStorageTest extends \PHPUnit\Framework\TestCase
{
- public function testFile()
+ public function testFile() : void
{
$testFile = __DIR__ . '/test.txt';
self::assertFalse(LocalStorage::put($testFile, 'test', ContentPutMode::REPLACE));
@@ -79,7 +79,7 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase
\unlink($testFile);
}
- public function testDirectory()
+ public function testDirectory() : void
{
$dirPath = __DIR__ . '/test';
self::assertTrue(LocalStorage::create($dirPath));
@@ -107,7 +107,7 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase
self::assertGreaterThan(0, LocalStorage::permission($dirTestPath));
}
- public function testDirectoryMove()
+ public function testDirectoryMove() : void
{
$dirTestPath = __DIR__ . '/dirtest';
self::assertTrue(LocalStorage::copy($dirTestPath, __DIR__ . '/newdirtest'));
@@ -128,7 +128,7 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidPutPath()
+ public function testInvalidPutPath() : void
{
LocalStorage::put(__DIR__, 'Test');
}
@@ -136,7 +136,7 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidGetPath()
+ public function testInvalidGetPath() : void
{
LocalStorage::get(__DIR__);
}
@@ -144,7 +144,7 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidListPath()
+ public function testInvalidListPath() : void
{
LocalStorage::list(__DIR__ . '/LocalStorageTest.php');
}
@@ -152,7 +152,7 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidSetPath()
+ public function testInvalidSetPath() : void
{
LocalStorage::set(__DIR__, 'Test');
}
@@ -160,7 +160,7 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidAppendPath()
+ public function testInvalidAppendPath() : void
{
LocalStorage::append(__DIR__, 'Test');
}
@@ -168,7 +168,7 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidPrependPath()
+ public function testInvalidPrependPath() : void
{
LocalStorage::prepend(__DIR__, 'Test');
}
@@ -176,7 +176,7 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testInvalidExtensionPath()
+ public function testInvalidExtensionPath() : void
{
LocalStorage::extension(__DIR__);
}
diff --git a/tests/System/File/PathExceptionTest.php b/tests/System/File/PathExceptionTest.php
index cb9609058..09b6ba601 100644
--- a/tests/System/File/PathExceptionTest.php
+++ b/tests/System/File/PathExceptionTest.php
@@ -17,7 +17,7 @@ use phpOMS\System\File\PathException;
class PathExceptionTest extends \PHPUnit\Framework\TestCase
{
- public function testConstructor()
+ public function testConstructor() : void
{
$e = new PathException('test.file');
self::assertContains('test.file', $e->getMessage());
diff --git a/tests/System/File/PermissionExceptionTest.php b/tests/System/File/PermissionExceptionTest.php
index efeb23d4a..9cbc20e46 100644
--- a/tests/System/File/PermissionExceptionTest.php
+++ b/tests/System/File/PermissionExceptionTest.php
@@ -17,7 +17,7 @@ use phpOMS\System\File\PermissionException;
class PermissionExceptionTest extends \PHPUnit\Framework\TestCase
{
- public function testConstructor()
+ public function testConstructor() : void
{
$e = new PermissionException('test.file');
self::assertContains('test.file', $e->getMessage());
diff --git a/tests/System/File/StorageTest.php b/tests/System/File/StorageTest.php
index b459d6b6f..fdebad525 100644
--- a/tests/System/File/StorageTest.php
+++ b/tests/System/File/StorageTest.php
@@ -18,7 +18,7 @@ use phpOMS\System\File\Storage;
class StorageTest extends \PHPUnit\Framework\TestCase
{
- public function testStorage()
+ public function testStorage() : void
{
self::assertInstanceOf('\phpOMS\System\File\Local\LocalStorage', Storage::env('local'));
self::assertInstanceOf('\phpOMS\System\File\Local\LocalStorage', Storage::env());
@@ -32,7 +32,7 @@ class StorageTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \Exception
*/
- public function testInvalidStorage()
+ public function testInvalidStorage() : void
{
self::assertInstanceOf('\phpOMS\System\File\Local\LocalStorage', Storage::env('invalid'));
}
diff --git a/tests/System/MimeTypeTest.php b/tests/System/MimeTypeTest.php
index 7d5a65d31..af00ce374 100644
--- a/tests/System/MimeTypeTest.php
+++ b/tests/System/MimeTypeTest.php
@@ -19,7 +19,7 @@ use phpOMS\System\MimeType;
class MimeTypeTest extends \PHPUnit\Framework\TestCase
{
- public function testEnum()
+ public function testEnum() : void
{
$enums = MimeType::getConstants();
diff --git a/tests/System/OperatingSystemTest.php b/tests/System/OperatingSystemTest.php
index 25b21a07e..795edc1ab 100644
--- a/tests/System/OperatingSystemTest.php
+++ b/tests/System/OperatingSystemTest.php
@@ -20,7 +20,7 @@ use phpOMS\System\SystemType;
class OperatingSystemTest extends \PHPUnit\Framework\TestCase
{
- public function testSystem()
+ public function testSystem() : void
{
self::assertNotEquals(SystemType::UNKNOWN, OperatingSystem::getSystem());
}
diff --git a/tests/System/SystemTypeTest.php b/tests/System/SystemTypeTest.php
index 730f452fd..13879224b 100644
--- a/tests/System/SystemTypeTest.php
+++ b/tests/System/SystemTypeTest.php
@@ -19,7 +19,7 @@ use phpOMS\System\SystemType;
class SystemTypeTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(4, \count(SystemType::getConstants()));
self::assertEquals(1, SystemType::UNKNOWN);
diff --git a/tests/System/SystemUtilsTest.php b/tests/System/SystemUtilsTest.php
index 621ba4a97..8cc80abe7 100644
--- a/tests/System/SystemUtilsTest.php
+++ b/tests/System/SystemUtilsTest.php
@@ -19,7 +19,7 @@ require_once __DIR__ . '/../Autoloader.php';
class SystemUtilsTest extends \PHPUnit\Framework\TestCase
{
- public function testSystem()
+ public function testSystem() : void
{
self::assertGreaterThan(0, SystemUtils::getRAM());
self::assertGreaterThan(0, SystemUtils::getCpuUsage());
diff --git a/tests/UnhandledHandlerTest.php b/tests/UnhandledHandlerTest.php
index f6a47ed39..4399895b7 100644
--- a/tests/UnhandledHandlerTest.php
+++ b/tests/UnhandledHandlerTest.php
@@ -17,7 +17,7 @@ use phpOMS\UnhandledHandler;
class UnhandledHandlerTest extends \PHPUnit\Framework\TestCase
{
- public function testErrorHandling()
+ public function testErrorHandling() : void
{
\set_exception_handler(['\phpOMS\UnhandledHandler', 'exceptionHandler']);
\set_error_handler(['\phpOMS\UnhandledHandler', 'errorHandler']);
diff --git a/tests/Uri/ArgumentTest.php b/tests/Uri/ArgumentTest.php
index 18dd5f371..78e5f44a3 100644
--- a/tests/Uri/ArgumentTest.php
+++ b/tests/Uri/ArgumentTest.php
@@ -19,7 +19,7 @@ use phpOMS\Uri\Argument;
class ArgumentTest extends \PHPUnit\Framework\TestCase
{
- public function testAttributes()
+ public function testAttributes() : void
{
$obj = new Argument('');
@@ -38,7 +38,7 @@ class ArgumentTest extends \PHPUnit\Framework\TestCase
self::assertObjectHasAttribute('base', $obj);
}
- public function testHelper()
+ public function testHelper() : void
{
self::assertTrue(Argument::isValid('http://www.google.de'));
self::assertTrue(Argument::isValid('http://google.de'));
@@ -47,7 +47,7 @@ class ArgumentTest extends \PHPUnit\Framework\TestCase
self::assertTrue(Argument::isValid('https:/google.de'));
}
- public function testSetGet()
+ public function testSetGet() : void
{
$obj = new Argument($uri = ':modules/admin/test/path.php ?para1=abc ?para2=2 #frag');
diff --git a/tests/Uri/HttpTest.php b/tests/Uri/HttpTest.php
index c49aebb4b..5ef50502a 100644
--- a/tests/Uri/HttpTest.php
+++ b/tests/Uri/HttpTest.php
@@ -19,7 +19,7 @@ use phpOMS\Uri\Http;
class HttpTest extends \PHPUnit\Framework\TestCase
{
- public function testAttributes()
+ public function testAttributes() : void
{
$obj = new Http('');
@@ -38,7 +38,7 @@ class HttpTest extends \PHPUnit\Framework\TestCase
self::assertObjectHasAttribute('base', $obj);
}
- public function testHelper()
+ public function testHelper() : void
{
self::assertTrue(Http::isValid('http://www.google.de'));
self::assertTrue(Http::isValid('http://google.de'));
@@ -46,7 +46,7 @@ class HttpTest extends \PHPUnit\Framework\TestCase
self::assertFalse(Http::isValid('https:/google.de'));
}
- public function testSetGet()
+ public function testSetGet() : void
{
$obj = new Http($uri = 'https://www.google.com/test/path.php?para1=abc¶2=2#frag');
diff --git a/tests/Uri/InvalidUriExceptionTest.php b/tests/Uri/InvalidUriExceptionTest.php
index 8ca811246..2b666d047 100644
--- a/tests/Uri/InvalidUriExceptionTest.php
+++ b/tests/Uri/InvalidUriExceptionTest.php
@@ -19,7 +19,7 @@ use phpOMS\Uri\InvalidUriException;
class InvalidUriExceptionTest extends \PHPUnit\Framework\TestCase
{
- public function testException()
+ public function testException() : void
{
self::assertInstanceOf(\UnexpectedValueException::class, new InvalidUriException(''));
}
diff --git a/tests/Uri/UriFactoryTest.php b/tests/Uri/UriFactoryTest.php
index 1ac7a0b37..ad27986bf 100644
--- a/tests/Uri/UriFactoryTest.php
+++ b/tests/Uri/UriFactoryTest.php
@@ -21,12 +21,12 @@ require_once __DIR__ . '/../Autoloader.php';
class UriFactoryTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
self::assertNull(UriFactory::getQuery('Invalid'));
}
- public function testSetGet()
+ public function testSetGet() : void
{
self::assertTrue(UriFactory::setQuery('Valid', 'query1'));
self::assertEquals('query1', UriFactory::getQuery('Valid'));
@@ -41,7 +41,7 @@ class UriFactoryTest extends \PHPUnit\Framework\TestCase
self::assertEquals('query4', UriFactory::getQuery('/valid2'));
}
- public function testClearing()
+ public function testClearing() : void
{
self::assertTrue(UriFactory::clear('Valid'));
self::assertFalse(UriFactory::clear('Valid'));
@@ -64,7 +64,7 @@ class UriFactoryTest extends \PHPUnit\Framework\TestCase
self::assertNull(UriFactory::getQuery('/abc'));
}
- public function testBuilder()
+ public function testBuilder() : void
{
$uri = 'www.test-uri.com?id={@ID}&test={.mTest}&two={/path}&hash={#hash}&none=#none&found={/not}?v={/valid2}';
@@ -82,7 +82,7 @@ class UriFactoryTest extends \PHPUnit\Framework\TestCase
self::assertEquals($expected, UriFactory::build($uri, $vars));
}
- public function testSetup()
+ public function testSetup() : void
{
$uri = 'http://www.test-uri.com/path/here?id=123&ab=c#fragi';
diff --git a/tests/Uri/UriSchemeTest.php b/tests/Uri/UriSchemeTest.php
index 497aa4b07..1bc1ad125 100644
--- a/tests/Uri/UriSchemeTest.php
+++ b/tests/Uri/UriSchemeTest.php
@@ -19,7 +19,7 @@ use phpOMS\Uri\UriScheme;
class UriSchemeTest extends \PHPUnit\Framework\TestCase
{
- public function testEnum()
+ public function testEnum() : void
{
self::assertTrue(\defined('phpOMS\Uri\UriScheme::HTTP'));
self::assertTrue(\defined('phpOMS\Uri\UriScheme::FILE'));
@@ -38,7 +38,7 @@ class UriSchemeTest extends \PHPUnit\Framework\TestCase
self::assertTrue(\defined('phpOMS\Uri\UriScheme::ITMS'));
}
- public function testEnumUnique()
+ public function testEnumUnique() : void
{
$values = UriScheme::getConstants();
self::assertEquals(\count($values), array_sum(array_count_values($values)));
diff --git a/tests/Utils/ArrayUtilsTest.php b/tests/Utils/ArrayUtilsTest.php
index 502972377..5cb9398c0 100644
--- a/tests/Utils/ArrayUtilsTest.php
+++ b/tests/Utils/ArrayUtilsTest.php
@@ -19,7 +19,7 @@ require_once __DIR__ . '/../Autoloader.php';
class ArrayUtilsTest extends \PHPUnit\Framework\TestCase
{
- public function testArrayGetSet()
+ public function testArrayGetSet() : void
{
$expected = [
'a' => [
@@ -50,7 +50,7 @@ class ArrayUtilsTest extends \PHPUnit\Framework\TestCase
self::assertEquals('ab0', ArrayUtils::getArray('a/ab/1', $expected));
}
- public function testArrayInRecursive()
+ public function testArrayInRecursive() : void
{
$expected = [
'a' => [
@@ -70,7 +70,7 @@ class ArrayUtilsTest extends \PHPUnit\Framework\TestCase
self::assertFalse(ArrayUtils::inArrayRecursive('aba', ArrayUtils::unsetArray('a/ab', $expected, '/')));
}
- public function testArrayConversion()
+ public function testArrayConversion() : void
{
$expected = [
'a' => [
@@ -91,7 +91,7 @@ class ArrayUtilsTest extends \PHPUnit\Framework\TestCase
self::assertEquals('2;3;1;"""Text;"' . "\n", ArrayUtils::arrayToCsv(['a' => 2, 3, 1, '"Text;'], ';', '"', '\\'));
}
- public function testArrayRecursiveManipulation()
+ public function testArrayRecursiveManipulation() : void
{
$numArr = [1, 2, 3, 4];
$numArrRec = [1, [2, [3, 4]]];
@@ -99,7 +99,7 @@ class ArrayUtilsTest extends \PHPUnit\Framework\TestCase
self::assertEquals($numArr, ArrayUtils::arrayFlatten($numArrRec));
}
- public function testArraySum()
+ public function testArraySum() : void
{
$numArr = [1, 2, 3, 4];
self::assertEquals(10, ArrayUtils::arraySum($numArr));
@@ -107,7 +107,7 @@ class ArrayUtilsTest extends \PHPUnit\Framework\TestCase
self::assertEquals(5, ArrayUtils::arraySum($numArr, 1, 2));
}
- public function testArrayAllIn()
+ public function testArrayAllIn() : void
{
$numArr = [1, 2, 3, 4];
self::assertTrue(ArrayUtils::allInArray([], $numArr));
@@ -116,14 +116,14 @@ class ArrayUtilsTest extends \PHPUnit\Framework\TestCase
self::assertFalse(ArrayUtils::allInArray([1, 5, 3], $numArr));
}
- public function testArrayAnyIn()
+ public function testArrayAnyIn() : void
{
$numArr = [1, 2, 3, 4];
self::assertTrue(ArrayUtils::anyInArray($numArr, [2, 6, 8]));
self::assertFalse(ArrayUtils::anyInArray($numArr, [10, 22]));
}
- public function testArg()
+ public function testArg() : void
{
self::assertEquals(null, ArrayUtils::hasArg('--testNull', $_SERVER['argv']));
self::assertEquals(null, ArrayUtils::getArg('--testNull', $_SERVER['argv']));
diff --git a/tests/Utils/Barcode/AztecTest.php b/tests/Utils/Barcode/AztecTest.php
index 0f917eddd..a011d816e 100644
--- a/tests/Utils/Barcode/AztecTest.php
+++ b/tests/Utils/Barcode/AztecTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Utils\Barcode;
class AztecTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Utils/Barcode/C128AbstractTest.php b/tests/Utils/Barcode/C128AbstractTest.php
index 82fb0596e..845eeabc2 100644
--- a/tests/Utils/Barcode/C128AbstractTest.php
+++ b/tests/Utils/Barcode/C128AbstractTest.php
@@ -19,12 +19,12 @@ class C128AbstractTest extends \PHPUnit\Framework\TestCase
{
protected $obj = null;
- protected function setUp()
+ protected function setUp() : void
{
$this->obj = new class extends C128Abstract {};
}
- public function testSetGet()
+ public function testSetGet() : void
{
$this->obj->setContent('abc');
self::assertEquals('abc', $this->obj->getContent());
@@ -33,7 +33,7 @@ class C128AbstractTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \OutOfBoundsException
*/
- public function testInvalidDimensionWidth()
+ public function testInvalidDimensionWidth() : void
{
$this->obj->setDimension(-2, 1);
}
@@ -41,7 +41,7 @@ class C128AbstractTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \OutOfBoundsException
*/
- public function testInvalidDimensionHeight()
+ public function testInvalidDimensionHeight() : void
{
$this->obj->setDimension(1, -2);
}
@@ -49,7 +49,7 @@ class C128AbstractTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\Stdlib\Base\Exception\InvalidEnumValue
*/
- public function testInvalidOrientation()
+ public function testInvalidOrientation() : void
{
$this->obj->setOrientation(99);
}
diff --git a/tests/Utils/Barcode/C128aTest.php b/tests/Utils/Barcode/C128aTest.php
index 1a9499812..5b7f23fec 100644
--- a/tests/Utils/Barcode/C128aTest.php
+++ b/tests/Utils/Barcode/C128aTest.php
@@ -18,7 +18,7 @@ use phpOMS\Utils\Barcode\OrientationType;
class C128aTest extends \PHPUnit\Framework\TestCase
{
- protected function setUp()
+ protected function setUp() : void
{
if (!extension_loaded('gd')) {
$this->markTestSkipped(
@@ -27,7 +27,7 @@ class C128aTest extends \PHPUnit\Framework\TestCase
}
}
- public function testImagePng()
+ public function testImagePng() : void
{
$path = __DIR__ . '/c128a.png';
if (\file_exists($path)) {
@@ -40,7 +40,7 @@ class C128aTest extends \PHPUnit\Framework\TestCase
self::assertTrue(\file_exists($path));
}
- public function testImageJpg()
+ public function testImageJpg() : void
{
$path = __DIR__ . '/c128a.jpg';
if (\file_exists($path)) {
@@ -53,7 +53,7 @@ class C128aTest extends \PHPUnit\Framework\TestCase
self::assertTrue(\file_exists($path));
}
- public function testOrientationAndMargin()
+ public function testOrientationAndMargin() : void
{
$path = __DIR__ . '/c128a_vertical.png';
if (\file_exists($path)) {
@@ -67,7 +67,7 @@ class C128aTest extends \PHPUnit\Framework\TestCase
self::assertTrue(\file_exists($path));
}
- public function testValidString()
+ public function testValidString() : void
{
self::assertTrue(C128a::isValidString('ABCDEFG0123+-'));
self::assertFalse(C128a::isValidString('ABCDE~FG0123+-'));
diff --git a/tests/Utils/Barcode/C128bTest.php b/tests/Utils/Barcode/C128bTest.php
index db4ad90ec..9dd0b3c22 100644
--- a/tests/Utils/Barcode/C128bTest.php
+++ b/tests/Utils/Barcode/C128bTest.php
@@ -18,7 +18,7 @@ use phpOMS\Utils\Barcode\OrientationType;
class C128bTest extends \PHPUnit\Framework\TestCase
{
- protected function setUp()
+ protected function setUp() : void
{
if (!extension_loaded('gd')) {
$this->markTestSkipped(
@@ -27,7 +27,7 @@ class C128bTest extends \PHPUnit\Framework\TestCase
}
}
- public function testImagePng()
+ public function testImagePng() : void
{
$path = __DIR__ . '/c128b.png';
if (\file_exists($path)) {
@@ -40,7 +40,7 @@ class C128bTest extends \PHPUnit\Framework\TestCase
self::assertTrue(\file_exists($path));
}
- public function testImageJpg()
+ public function testImageJpg() : void
{
$path = __DIR__ . '/c128b.jpg';
if (\file_exists($path)) {
@@ -53,7 +53,7 @@ class C128bTest extends \PHPUnit\Framework\TestCase
self::assertTrue(\file_exists($path));
}
- public function testOrientationAndMargin()
+ public function testOrientationAndMargin() : void
{
$path = __DIR__ . '/c128b_vertical.png';
if (\file_exists($path)) {
@@ -67,7 +67,7 @@ class C128bTest extends \PHPUnit\Framework\TestCase
self::assertTrue(\file_exists($path));
}
- public function testValidString()
+ public function testValidString() : void
{
self::assertTrue(C128b::isValidString('ABCDE~FG0123+-'));
}
diff --git a/tests/Utils/Barcode/C128cTest.php b/tests/Utils/Barcode/C128cTest.php
index ad3feb114..07917084c 100644
--- a/tests/Utils/Barcode/C128cTest.php
+++ b/tests/Utils/Barcode/C128cTest.php
@@ -18,7 +18,7 @@ use phpOMS\Utils\Barcode\OrientationType;
class C128cTest extends \PHPUnit\Framework\TestCase
{
- protected function setUp()
+ protected function setUp() : void
{
if (!extension_loaded('gd')) {
$this->markTestSkipped(
@@ -27,7 +27,7 @@ class C128cTest extends \PHPUnit\Framework\TestCase
}
}
- public function testImagePng()
+ public function testImagePng() : void
{
$path = __DIR__ . '/c128c.png';
if (\file_exists($path)) {
@@ -40,7 +40,7 @@ class C128cTest extends \PHPUnit\Framework\TestCase
self::assertTrue(\file_exists($path));
}
- public function testImageJpg()
+ public function testImageJpg() : void
{
$path = __DIR__ . '/c128c.jpg';
if (\file_exists($path)) {
@@ -53,7 +53,7 @@ class C128cTest extends \PHPUnit\Framework\TestCase
self::assertTrue(\file_exists($path));
}
- public function testOrientationAndMargin()
+ public function testOrientationAndMargin() : void
{
$path = __DIR__ . '/c128c_vertical.png';
if (\file_exists($path)) {
diff --git a/tests/Utils/Barcode/C25Test.php b/tests/Utils/Barcode/C25Test.php
index d5b532738..b3452eecf 100644
--- a/tests/Utils/Barcode/C25Test.php
+++ b/tests/Utils/Barcode/C25Test.php
@@ -18,7 +18,7 @@ use phpOMS\Utils\Barcode\OrientationType;
class C25Test extends \PHPUnit\Framework\TestCase
{
- protected function setUp()
+ protected function setUp() : void
{
if (!extension_loaded('gd')) {
$this->markTestSkipped(
@@ -27,7 +27,7 @@ class C25Test extends \PHPUnit\Framework\TestCase
}
}
- public function testImagePng()
+ public function testImagePng() : void
{
$path = __DIR__ . '/c25.png';
if (\file_exists($path)) {
@@ -40,7 +40,7 @@ class C25Test extends \PHPUnit\Framework\TestCase
self::assertTrue(\file_exists($path));
}
- public function testImageJpg()
+ public function testImageJpg() : void
{
$path = __DIR__ . '/c25.jpg';
if (\file_exists($path)) {
@@ -53,7 +53,7 @@ class C25Test extends \PHPUnit\Framework\TestCase
self::assertTrue(\file_exists($path));
}
- public function testOrientationAndMargin()
+ public function testOrientationAndMargin() : void
{
$path = __DIR__ . '/c25_vertical.png';
if (\file_exists($path)) {
@@ -67,7 +67,7 @@ class C25Test extends \PHPUnit\Framework\TestCase
self::assertTrue(\file_exists($path));
}
- public function testValidString()
+ public function testValidString() : void
{
self::assertTrue(C25::isValidString('1234567890'));
self::assertFalse(C25::isValidString('1234567A890'));
@@ -76,7 +76,7 @@ class C25Test extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidOrientation()
+ public function testInvalidOrientation() : void
{
$img = new C25('45f!a?12');
}
diff --git a/tests/Utils/Barcode/C39Test.php b/tests/Utils/Barcode/C39Test.php
index bee485f4d..523c2057c 100644
--- a/tests/Utils/Barcode/C39Test.php
+++ b/tests/Utils/Barcode/C39Test.php
@@ -18,7 +18,7 @@ use phpOMS\Utils\Barcode\OrientationType;
class C39Test extends \PHPUnit\Framework\TestCase
{
- protected function setUp()
+ protected function setUp() : void
{
if (!extension_loaded('gd')) {
$this->markTestSkipped(
@@ -27,7 +27,7 @@ class C39Test extends \PHPUnit\Framework\TestCase
}
}
- public function testImagePng()
+ public function testImagePng() : void
{
$path = __DIR__ . '/c39.png';
if (\file_exists($path)) {
@@ -40,7 +40,7 @@ class C39Test extends \PHPUnit\Framework\TestCase
self::assertTrue(\file_exists($path));
}
- public function testImageJpg()
+ public function testImageJpg() : void
{
$path = __DIR__ . '/c39.jpg';
if (\file_exists($path)) {
@@ -53,7 +53,7 @@ class C39Test extends \PHPUnit\Framework\TestCase
self::assertTrue(\file_exists($path));
}
- public function testOrientationAndMargin()
+ public function testOrientationAndMargin() : void
{
$path = __DIR__ . '/c39_vertical.png';
if (\file_exists($path)) {
@@ -67,7 +67,7 @@ class C39Test extends \PHPUnit\Framework\TestCase
self::assertTrue(\file_exists($path));
}
- public function testValidString()
+ public function testValidString() : void
{
self::assertTrue(C39::isValidString('ABCDEFG0123+-'));
self::assertFalse(C39::isValidString('ABC(DEFG0123+-'));
diff --git a/tests/Utils/Barcode/CodebarTest.php b/tests/Utils/Barcode/CodebarTest.php
index 568f14866..5c642aa8b 100644
--- a/tests/Utils/Barcode/CodebarTest.php
+++ b/tests/Utils/Barcode/CodebarTest.php
@@ -18,7 +18,7 @@ use phpOMS\Utils\Barcode\OrientationType;
class CodebarTest extends \PHPUnit\Framework\TestCase
{
- protected function setUp()
+ protected function setUp() : void
{
if (!extension_loaded('gd')) {
$this->markTestSkipped(
@@ -27,7 +27,7 @@ class CodebarTest extends \PHPUnit\Framework\TestCase
}
}
- public function testImagePng()
+ public function testImagePng() : void
{
$path = __DIR__ . '/codebar.png';
if (\file_exists($path)) {
@@ -40,7 +40,7 @@ class CodebarTest extends \PHPUnit\Framework\TestCase
self::assertTrue(\file_exists($path));
}
- public function testImageJpg()
+ public function testImageJpg() : void
{
$path = __DIR__ . '/codebar.jpg';
if (\file_exists($path)) {
@@ -53,7 +53,7 @@ class CodebarTest extends \PHPUnit\Framework\TestCase
self::assertTrue(\file_exists($path));
}
- public function testOrientationAndMargin()
+ public function testOrientationAndMargin() : void
{
$path = __DIR__ . '/ccodebar_vertical.png';
if (\file_exists($path)) {
@@ -67,7 +67,7 @@ class CodebarTest extends \PHPUnit\Framework\TestCase
self::assertTrue(\file_exists($path));
}
- public function testValidString()
+ public function testValidString() : void
{
self::assertTrue(Codebar::isValidString('412163'));
self::assertFalse(Codebar::isValidString('412163F'));
diff --git a/tests/Utils/Barcode/DatamatrixTest.php b/tests/Utils/Barcode/DatamatrixTest.php
index 88eefe389..100b0e9cb 100644
--- a/tests/Utils/Barcode/DatamatrixTest.php
+++ b/tests/Utils/Barcode/DatamatrixTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Utils\Barcode;
class DatamatrixTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Utils/Barcode/HIBCCTest.php b/tests/Utils/Barcode/HIBCCTest.php
index d7d90dd66..c4ba06c1a 100644
--- a/tests/Utils/Barcode/HIBCCTest.php
+++ b/tests/Utils/Barcode/HIBCCTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Utils\Barcode;
class HIBCCTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Utils/Barcode/OrientationTypeTest.php b/tests/Utils/Barcode/OrientationTypeTest.php
index 17540a20e..aa1f55c82 100644
--- a/tests/Utils/Barcode/OrientationTypeTest.php
+++ b/tests/Utils/Barcode/OrientationTypeTest.php
@@ -17,7 +17,7 @@ use phpOMS\Utils\Barcode\OrientationType;
class OrientationTypeTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(2, \count(OrientationType::getConstants()));
self::assertEquals(OrientationType::getConstants(), array_unique(OrientationType::getConstants()));
diff --git a/tests/Utils/Barcode/QRTest.php b/tests/Utils/Barcode/QRTest.php
index eaf2425bc..97b766948 100644
--- a/tests/Utils/Barcode/QRTest.php
+++ b/tests/Utils/Barcode/QRTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Utils\Barcode;
class QRTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Utils/ColorUtilsTest.php b/tests/Utils/ColorUtilsTest.php
index 43f9a28d5..15d978684 100644
--- a/tests/Utils/ColorUtilsTest.php
+++ b/tests/Utils/ColorUtilsTest.php
@@ -19,7 +19,7 @@ use phpOMS\Utils\ColorUtils;
class ColorUtilsTest extends \PHPUnit\Framework\TestCase
{
- public function testColor()
+ public function testColor() : void
{
self::assertEquals(['r' => 0xbc, 'g' => 0x39, 'b' => 0x6c], ColorUtils::intToRgb(12335468));
self::assertEquals(12335468, ColorUtils::rgbToInt(['r' => 0xbc, 'g' => 0x39, 'b' => 0x6c]));
diff --git a/tests/Utils/Compression/LZWTest.php b/tests/Utils/Compression/LZWTest.php
index a060a22ed..fe1073d30 100644
--- a/tests/Utils/Compression/LZWTest.php
+++ b/tests/Utils/Compression/LZWTest.php
@@ -17,7 +17,7 @@ use phpOMS\Utils\Compression\LZW;
class LZWTest extends \PHPUnit\Framework\TestCase
{
- public function testLZW()
+ public function testLZW() : void
{
$expected = 'This is a test';
$compression = new LZW();
diff --git a/tests/Utils/Converter/AngleTypeTest.php b/tests/Utils/Converter/AngleTypeTest.php
index 7e70e0491..fc66c13ba 100644
--- a/tests/Utils/Converter/AngleTypeTest.php
+++ b/tests/Utils/Converter/AngleTypeTest.php
@@ -17,7 +17,7 @@ use phpOMS\Utils\Converter\AngleType;
class AngleTypeTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(10, \count(AngleType::getConstants()));
self::assertEquals(AngleType::getConstants(), array_unique(AngleType::getConstants()));
diff --git a/tests/Utils/Converter/AreaTypeTest.php b/tests/Utils/Converter/AreaTypeTest.php
index 3c5f1dfcf..f2c7a50d9 100644
--- a/tests/Utils/Converter/AreaTypeTest.php
+++ b/tests/Utils/Converter/AreaTypeTest.php
@@ -17,7 +17,7 @@ use phpOMS\Utils\Converter\AreaType;
class AreaTypeTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(13, \count(AreaType::getConstants()));
self::assertEquals(AreaType::getConstants(), array_unique(AreaType::getConstants()));
diff --git a/tests/Utils/Converter/CurrencyTest.php b/tests/Utils/Converter/CurrencyTest.php
index 15f43c33f..0b8484f81 100644
--- a/tests/Utils/Converter/CurrencyTest.php
+++ b/tests/Utils/Converter/CurrencyTest.php
@@ -18,7 +18,7 @@ use phpOMS\Utils\Converter\Currency;
class CurrencyTest extends \PHPUnit\Framework\TestCase
{
- public function testCurrency()
+ public function testCurrency() : void
{
self::assertGreaterThan(0, Currency::fromEurTo(1, ISO4217CharEnum::_USD));
self::assertGreaterThan(0, Currency::fromToEur(1, ISO4217CharEnum::_USD));
@@ -30,7 +30,7 @@ class CurrencyTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidFromEur()
+ public function testInvalidFromEur() : void
{
Currency::fromEurTo(1, 'ERROR');
}
@@ -38,7 +38,7 @@ class CurrencyTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidToEur()
+ public function testInvalidToEur() : void
{
Currency::fromToEur(1, 'ERROR');
}
@@ -46,7 +46,7 @@ class CurrencyTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidConvert()
+ public function testInvalidConvert() : void
{
Currency::convertCurrency(1, 'ERROR', 'TEST');
}
diff --git a/tests/Utils/Converter/EnergyPowerTypeTest.php b/tests/Utils/Converter/EnergyPowerTypeTest.php
index fbca4001b..427ba6464 100644
--- a/tests/Utils/Converter/EnergyPowerTypeTest.php
+++ b/tests/Utils/Converter/EnergyPowerTypeTest.php
@@ -17,7 +17,7 @@ use phpOMS\Utils\Converter\EnergyPowerType;
class EnergyPowerTypeTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(9, \count(EnergyPowerType::getConstants()));
self::assertEquals(EnergyPowerType::getConstants(), array_unique(EnergyPowerType::getConstants()));
diff --git a/tests/Utils/Converter/FileSizeTypeTest.php b/tests/Utils/Converter/FileSizeTypeTest.php
index 634faf902..07003b801 100644
--- a/tests/Utils/Converter/FileSizeTypeTest.php
+++ b/tests/Utils/Converter/FileSizeTypeTest.php
@@ -17,7 +17,7 @@ use phpOMS\Utils\Converter\FileSizeType;
class FileSizeTypeTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(10, \count(FileSizeType::getConstants()));
self::assertEquals('TB', FileSizeType::TERRABYTE);
diff --git a/tests/Utils/Converter/FileTest.php b/tests/Utils/Converter/FileTest.php
index 46819cf97..c2b04dc85 100644
--- a/tests/Utils/Converter/FileTest.php
+++ b/tests/Utils/Converter/FileTest.php
@@ -17,7 +17,7 @@ use phpOMS\Utils\Converter\File;
class FileTest extends \PHPUnit\Framework\TestCase
{
- public function testByteSizeToString()
+ public function testByteSizeToString() : void
{
self::assertEquals('400b', File::byteSizeToString(400));
self::assertEquals('5kb', File::byteSizeToString(5000));
@@ -25,7 +25,7 @@ class FileTest extends \PHPUnit\Framework\TestCase
self::assertEquals('1.5gb', File::byteSizeToString(1500000000));
}
- public function testKilobyteSizeToString()
+ public function testKilobyteSizeToString() : void
{
self::assertEquals('500kb', File::kilobyteSizeToString(500));
self::assertEquals('5mb', File::kilobyteSizeToString(5000));
diff --git a/tests/Utils/Converter/IpTest.php b/tests/Utils/Converter/IpTest.php
index c042db16e..45a4579c4 100644
--- a/tests/Utils/Converter/IpTest.php
+++ b/tests/Utils/Converter/IpTest.php
@@ -17,7 +17,7 @@ use phpOMS\Utils\Converter\Ip;
class IpTest extends \PHPUnit\Framework\TestCase
{
- public function testIp()
+ public function testIp() : void
{
self::assertTrue(\abs(1527532998.0 - Ip::ip2Float('91.12.77.198')) < 1);
}
diff --git a/tests/Utils/Converter/LengthTypeTest.php b/tests/Utils/Converter/LengthTypeTest.php
index 0119a8562..660459eb7 100644
--- a/tests/Utils/Converter/LengthTypeTest.php
+++ b/tests/Utils/Converter/LengthTypeTest.php
@@ -17,7 +17,7 @@ use phpOMS\Utils\Converter\LengthType;
class LengthTypeTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(21, \count(LengthType::getConstants()));
self::assertEquals(LengthType::getConstants(), array_unique(LengthType::getConstants()));
diff --git a/tests/Utils/Converter/MeasurementTest.php b/tests/Utils/Converter/MeasurementTest.php
index 44fc9bbe9..559a80b9b 100644
--- a/tests/Utils/Converter/MeasurementTest.php
+++ b/tests/Utils/Converter/MeasurementTest.php
@@ -28,7 +28,7 @@ use phpOMS\Utils\Converter\WeightType;
class MeasurementTest extends \PHPUnit\Framework\TestCase
{
- public function testTemperature()
+ public function testTemperature() : void
{
$temps = TemperatureType::getConstants();
@@ -40,7 +40,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase
}
}
- public function testWeight()
+ public function testWeight() : void
{
$weights = WeightType::getConstants();
@@ -52,7 +52,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase
}
}
- public function testLength()
+ public function testLength() : void
{
$lengths = LengthType::getConstants();
@@ -64,7 +64,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase
}
}
- public function testArea()
+ public function testArea() : void
{
$areas = AreaType::getConstants();
@@ -76,7 +76,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase
}
}
- public function testVolume()
+ public function testVolume() : void
{
$volumes = VolumeType::getConstants();
@@ -88,7 +88,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase
}
}
- public function testSpeed()
+ public function testSpeed() : void
{
$speeds = SpeedType::getConstants();
@@ -100,7 +100,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase
}
}
- public function testTime()
+ public function testTime() : void
{
$times = TimeType::getConstants();
@@ -112,7 +112,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase
}
}
- public function testAngle()
+ public function testAngle() : void
{
$angles = AngleType::getConstants();
@@ -124,7 +124,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase
}
}
- public function testPressure()
+ public function testPressure() : void
{
$pressures = PressureType::getConstants();
@@ -136,7 +136,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase
}
}
- public function testEnergy()
+ public function testEnergy() : void
{
$energies = EnergyPowerType::getConstants();
@@ -148,7 +148,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase
}
}
- public function testFileSize()
+ public function testFileSize() : void
{
$fileSizes = FileSizeType::getConstants();
@@ -163,7 +163,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidTemperatureFrom()
+ public function testInvalidTemperatureFrom() : void
{
Measurement::convertTemperature(1.1, 'invalid', TemperatureType::CELSIUS);
}
@@ -171,7 +171,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidTemperatureTo()
+ public function testInvalidTemperatureTo() : void
{
Measurement::convertTemperature(1.1, TemperatureType::CELSIUS, 'invalid');
}
@@ -179,7 +179,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidWeightFrom()
+ public function testInvalidWeightFrom() : void
{
Measurement::convertWeight(1.1, 'invalid', WeightType::KILOGRAM);
}
@@ -187,7 +187,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidWeightTo()
+ public function testInvalidWeightTo() : void
{
Measurement::convertWeight(1.1, WeightType::KILOGRAM, 'invalid');
}
@@ -195,7 +195,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidLengthFrom()
+ public function testInvalidLengthFrom() : void
{
Measurement::convertLength(1.1, 'invalid', LengthType::METERS);
}
@@ -203,7 +203,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidLengthTo()
+ public function testInvalidLengthTo() : void
{
Measurement::convertLength(1.1, LengthType::METERS, 'invalid');
}
@@ -211,7 +211,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidAreaFrom()
+ public function testInvalidAreaFrom() : void
{
Measurement::convertArea(1.1, 'invalid', AreaType::SQUARE_METERS);
}
@@ -219,7 +219,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidAreaTo()
+ public function testInvalidAreaTo() : void
{
Measurement::convertArea(1.1, AreaType::SQUARE_METERS, 'invalid');
}
@@ -227,7 +227,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidVolumeFrom()
+ public function testInvalidVolumeFrom() : void
{
Measurement::convertVolume(1.1, 'invalid', VolumeType::LITER);
}
@@ -235,7 +235,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidVolumeTo()
+ public function testInvalidVolumeTo() : void
{
Measurement::convertVolume(1.1, VolumeType::LITER, 'invalid');
}
@@ -243,7 +243,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidSpeedFrom()
+ public function testInvalidSpeedFrom() : void
{
Measurement::convertSpeed(1.1, 'invalid', SpeedType::KILOMETERS_PER_HOUR);
}
@@ -251,7 +251,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidSpeedTo()
+ public function testInvalidSpeedTo() : void
{
Measurement::convertSpeed(1.1, SpeedType::KILOMETERS_PER_HOUR, 'invalid');
}
@@ -259,7 +259,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidTimeFrom()
+ public function testInvalidTimeFrom() : void
{
Measurement::convertTime(1.1, 'invalid', TimeType::HOURS);
}
@@ -267,7 +267,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidTimeTo()
+ public function testInvalidTimeTo() : void
{
Measurement::convertTime(1.1, TimeType::HOURS, 'invalid');
}
@@ -275,7 +275,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidAngleFrom()
+ public function testInvalidAngleFrom() : void
{
Measurement::convertAngle(1.1, 'invalid', AngleType::RADIAN);
}
@@ -283,7 +283,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidAngleTo()
+ public function testInvalidAngleTo() : void
{
Measurement::convertAngle(1.1, AngleType::RADIAN, 'invalid');
}
@@ -291,7 +291,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidPressureFrom()
+ public function testInvalidPressureFrom() : void
{
Measurement::convertPressure(1.1, 'invalid', PressureType::BAR);
}
@@ -299,7 +299,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidPressureTo()
+ public function testInvalidPressureTo() : void
{
Measurement::convertPressure(1.1, PressureType::BAR, 'invalid');
}
@@ -307,7 +307,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidEnergyPowerFrom()
+ public function testInvalidEnergyPowerFrom() : void
{
Measurement::convertEnergy(1.1, 'invalid', EnergyPowerType::JOULS);
}
@@ -315,7 +315,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidEnergyPowerTo()
+ public function testInvalidEnergyPowerTo() : void
{
Measurement::convertEnergy(1.1, EnergyPowerType::JOULS, 'invalid');
}
@@ -323,7 +323,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidFileSizeFrom()
+ public function testInvalidFileSizeFrom() : void
{
Measurement::convertFileSize(1.1, 'invalid', FileSizeType::KILOBYTE);
}
@@ -331,7 +331,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidFileSizeTo()
+ public function testInvalidFileSizeTo() : void
{
Measurement::convertFileSize(1.1, FileSizeType::KILOBYTE, 'invalid');
}
diff --git a/tests/Utils/Converter/NumericTest.php b/tests/Utils/Converter/NumericTest.php
index f759caa81..53868f214 100644
--- a/tests/Utils/Converter/NumericTest.php
+++ b/tests/Utils/Converter/NumericTest.php
@@ -17,7 +17,7 @@ use phpOMS\Utils\Converter\Numeric;
class NumericTest extends \PHPUnit\Framework\TestCase
{
- public function testArabicRoman()
+ public function testArabicRoman() : void
{
$rand = mt_rand(1, 9999);
self::assertEquals($rand, Numeric::romanToArabic(Numeric::arabicToRoman($rand)));
@@ -28,7 +28,7 @@ class NumericTest extends \PHPUnit\Framework\TestCase
self::assertEquals('XI', Numeric::arabicToRoman(11));
}
- public function testAlphaNumeric()
+ public function testAlphaNumeric() : void
{
self::assertEquals(0, Numeric::alphaToNumeric('A'));
self::assertEquals(1, Numeric::alphaToNumeric('B'));
@@ -39,7 +39,7 @@ class NumericTest extends \PHPUnit\Framework\TestCase
self::assertEquals('BB', Numeric::numericToAlpha(53));
}
- public function testBase()
+ public function testBase() : void
{
self::assertEquals('443', Numeric::convertBase('123', '0123456789', '01234'));
self::assertEquals('7B', Numeric::convertBase('123', '0123456789', '0123456789ABCDEF'));
diff --git a/tests/Utils/Converter/PressureTypeTest.php b/tests/Utils/Converter/PressureTypeTest.php
index c43d6ddf9..f8e8df60e 100644
--- a/tests/Utils/Converter/PressureTypeTest.php
+++ b/tests/Utils/Converter/PressureTypeTest.php
@@ -17,7 +17,7 @@ use phpOMS\Utils\Converter\PressureType;
class PressureTypeTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(13, \count(PressureType::getConstants()));
self::assertEquals(PressureType::getConstants(), array_unique(PressureType::getConstants()));
diff --git a/tests/Utils/Converter/SpeedTypeTest.php b/tests/Utils/Converter/SpeedTypeTest.php
index ec7d97bf5..de6a97c79 100644
--- a/tests/Utils/Converter/SpeedTypeTest.php
+++ b/tests/Utils/Converter/SpeedTypeTest.php
@@ -17,7 +17,7 @@ use phpOMS\Utils\Converter\SpeedType;
class SpeedTypeTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(34, \count(SpeedType::getConstants()));
self::assertEquals(SpeedType::getConstants(), array_unique(SpeedType::getConstants()));
diff --git a/tests/Utils/Converter/TemperatureTypeTest.php b/tests/Utils/Converter/TemperatureTypeTest.php
index 0b64cc396..6eba62e42 100644
--- a/tests/Utils/Converter/TemperatureTypeTest.php
+++ b/tests/Utils/Converter/TemperatureTypeTest.php
@@ -17,7 +17,7 @@ use phpOMS\Utils\Converter\TemperatureType;
class TemperatureTypeTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(8, \count(TemperatureType::getConstants()));
self::assertEquals(TemperatureType::getConstants(), array_unique(TemperatureType::getConstants()));
diff --git a/tests/Utils/Converter/TimeTypeTest.php b/tests/Utils/Converter/TimeTypeTest.php
index e06acca13..62b177f8c 100644
--- a/tests/Utils/Converter/TimeTypeTest.php
+++ b/tests/Utils/Converter/TimeTypeTest.php
@@ -17,7 +17,7 @@ use phpOMS\Utils\Converter\TimeType;
class TimeTypeTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(9, \count(TimeType::getConstants()));
self::assertEquals(TimeType::getConstants(), array_unique(TimeType::getConstants()));
diff --git a/tests/Utils/Converter/VolumeTypeTest.php b/tests/Utils/Converter/VolumeTypeTest.php
index c8c99e4cc..a09819015 100644
--- a/tests/Utils/Converter/VolumeTypeTest.php
+++ b/tests/Utils/Converter/VolumeTypeTest.php
@@ -17,7 +17,7 @@ use phpOMS\Utils\Converter\VolumeType;
class VolumeTypeTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(38, \count(VolumeType::getConstants()));
self::assertEquals(VolumeType::getConstants(), array_unique(VolumeType::getConstants()));
diff --git a/tests/Utils/Converter/WeightTypeTest.php b/tests/Utils/Converter/WeightTypeTest.php
index 5d417043f..7d541956e 100644
--- a/tests/Utils/Converter/WeightTypeTest.php
+++ b/tests/Utils/Converter/WeightTypeTest.php
@@ -17,7 +17,7 @@ use phpOMS\Utils\Converter\WeightType;
class WeightTypeTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(14, \count(WeightType::getConstants()));
self::assertEquals(WeightType::getConstants(), array_unique(WeightType::getConstants()));
diff --git a/tests/Utils/Encoding/CaesarTest.php b/tests/Utils/Encoding/CaesarTest.php
index 70fda433a..bdfcb70f4 100644
--- a/tests/Utils/Encoding/CaesarTest.php
+++ b/tests/Utils/Encoding/CaesarTest.php
@@ -18,7 +18,7 @@ use phpOMS\Utils\RnG\StringUtils;
class CaesarTest extends \PHPUnit\Framework\TestCase
{
- public function testVolume()
+ public function testVolume() : void
{
for ($i = 0; $i < 100; ++$i) {
$raw = StringUtils::generateString(1, 100);
diff --git a/tests/Utils/Encoding/GrayTest.php b/tests/Utils/Encoding/GrayTest.php
index 1747bf045..597a570eb 100644
--- a/tests/Utils/Encoding/GrayTest.php
+++ b/tests/Utils/Encoding/GrayTest.php
@@ -17,13 +17,13 @@ use phpOMS\Utils\Encoding\Gray;
class GrayTest extends \PHPUnit\Framework\TestCase
{
- public function testEncoding()
+ public function testEncoding() : void
{
self::assertEquals(55, Gray::encode(37));
self::assertEquals(37, Gray::decode(55));
}
- public function testVolume()
+ public function testVolume() : void
{
for ($i = 0; $i < 100; ++$i) {
$raw = mt_rand(0, 2040140512);
diff --git a/tests/Utils/Encoding/Huffman/DictionaryTest.php b/tests/Utils/Encoding/Huffman/DictionaryTest.php
index ae9468040..45e6d008e 100644
--- a/tests/Utils/Encoding/Huffman/DictionaryTest.php
+++ b/tests/Utils/Encoding/Huffman/DictionaryTest.php
@@ -20,7 +20,7 @@ class DictionaryTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidGetCharacter()
+ public function testInvalidGetCharacter() : void
{
$dict = new Dictionary();
$dict->get('as');
@@ -29,7 +29,7 @@ class DictionaryTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testNotExistingGetCharacter()
+ public function testNotExistingGetCharacter() : void
{
$dict = new Dictionary();
$dict->get('a');
@@ -38,7 +38,7 @@ class DictionaryTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidSetCharacter()
+ public function testInvalidSetCharacter() : void
{
$dict = new Dictionary();
$dict->set('as', 'test');
@@ -47,7 +47,7 @@ class DictionaryTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidSetDuplicateCharacter()
+ public function testInvalidSetDuplicateCharacter() : void
{
$dict = new Dictionary();
$dict->set('a', '1');
@@ -57,7 +57,7 @@ class DictionaryTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testInvalidFormattedValue()
+ public function testInvalidFormattedValue() : void
{
$dict = new Dictionary();
$dict->set('a', '1a');
diff --git a/tests/Utils/Encoding/Huffman/HuffmanTest.php b/tests/Utils/Encoding/Huffman/HuffmanTest.php
index 36a1f9a8d..9732ff61a 100644
--- a/tests/Utils/Encoding/Huffman/HuffmanTest.php
+++ b/tests/Utils/Encoding/Huffman/HuffmanTest.php
@@ -17,7 +17,7 @@ use phpOMS\Utils\Encoding\Huffman\Huffman;
class HuffmanTest extends \PHPUnit\Framework\TestCase
{
- public function testHuffman()
+ public function testHuffman() : void
{
$huff = new Huffman();
diff --git a/tests/Utils/Encoding/XorEncodingTest.php b/tests/Utils/Encoding/XorEncodingTest.php
index 62bb3a4e9..1fa9cffb6 100644
--- a/tests/Utils/Encoding/XorEncodingTest.php
+++ b/tests/Utils/Encoding/XorEncodingTest.php
@@ -18,14 +18,14 @@ use phpOMS\Utils\RnG\StringUtils;
class XorEncodingTest extends \PHPUnit\Framework\TestCase
{
- public function testEncoding()
+ public function testEncoding() : void
{
$test = XorEncoding::encode('This is a test.', 'abcd');
self::assertEquals(hex2bin('350a0a17410b10440042170112164d'), XorEncoding::encode('This is a test.', 'abcd'));
self::assertEquals('This is a test.', XorEncoding::decode(hex2bin('350a0a17410b10440042170112164d'), 'abcd'));
}
- public function testVolume()
+ public function testVolume() : void
{
for ($i = 0; $i < 100; ++$i) {
$raw = StringUtils::generateString(1, 100);
diff --git a/tests/Utils/Excel/ExcelTest.php b/tests/Utils/Excel/ExcelTest.php
index afc520bd0..55aab36c1 100644
--- a/tests/Utils/Excel/ExcelTest.php
+++ b/tests/Utils/Excel/ExcelTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Utils\Excel;
class ExcelTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Utils/Git/AuthorTest.php b/tests/Utils/Git/AuthorTest.php
index be728e8ca..c6ea58aa5 100644
--- a/tests/Utils/Git/AuthorTest.php
+++ b/tests/Utils/Git/AuthorTest.php
@@ -17,7 +17,7 @@ use phpOMS\Utils\Git\Author;
class AuthorTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
$author = new Author();
self::assertEquals('', $author->getName());
@@ -27,7 +27,7 @@ class AuthorTest extends \PHPUnit\Framework\TestCase
self::assertEquals(0, $author->getRemovalCount());
}
- public function testGetSet()
+ public function testGetSet() : void
{
$author = new Author('test', 'email');
self::assertEquals('test', $author->getName());
diff --git a/tests/Utils/Git/BranchTest.php b/tests/Utils/Git/BranchTest.php
index 4d3b45a25..08207b9ba 100644
--- a/tests/Utils/Git/BranchTest.php
+++ b/tests/Utils/Git/BranchTest.php
@@ -17,13 +17,13 @@ use phpOMS\Utils\Git\Branch;
class BranchTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
$branch = new Branch();
self::assertEquals('', $branch->getName());
}
- public function testGetSet()
+ public function testGetSet() : void
{
$branch = new Branch('test');
self::assertEquals('test', $branch->getName());
diff --git a/tests/Utils/Git/CommitTest.php b/tests/Utils/Git/CommitTest.php
index 8260f9fca..7851fdfa4 100644
--- a/tests/Utils/Git/CommitTest.php
+++ b/tests/Utils/Git/CommitTest.php
@@ -21,7 +21,7 @@ use phpOMS\Utils\Git\Tag;
class CommitTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
$commit = new Commit();
self::assertEquals('', $commit->getId());
@@ -34,7 +34,7 @@ class CommitTest extends \PHPUnit\Framework\TestCase
self::assertInstanceOf('\DateTime', $commit->getDate());
}
- public function testAddRemoveFile()
+ public function testAddRemoveFile() : void
{
$commit = new Commit();
@@ -53,7 +53,7 @@ class CommitTest extends \PHPUnit\Framework\TestCase
], $commit->getFiles());
}
- public function testChanges()
+ public function testChanges() : void
{
$commit = new Commit();
@@ -72,14 +72,14 @@ class CommitTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \Exception
*/
- public function testDuplicateLineChange()
+ public function testDuplicateLineChange() : void
{
$commit = new Commit();
$commit->addChanges(__DIR__ . '/CommitTest.php', 1, 'addChanges(__DIR__ . '/CommitTest.php', 1, 'getMessage());
}
- public function testAuthor()
+ public function testAuthor() : void
{
$commit = new Commit();
@@ -95,7 +95,7 @@ class CommitTest extends \PHPUnit\Framework\TestCase
self::assertEquals('Orange', $commit->getAuthor()->getName());
}
- public function testBranch()
+ public function testBranch() : void
{
$commit = new Commit();
@@ -103,7 +103,7 @@ class CommitTest extends \PHPUnit\Framework\TestCase
self::assertEquals('develop', $commit->getBranch()->getName());
}
- public function testTag()
+ public function testTag() : void
{
$commit = new Commit();
@@ -111,7 +111,7 @@ class CommitTest extends \PHPUnit\Framework\TestCase
self::assertEquals('1.0.0', $commit->getTag()->getName());
}
- public function testDate()
+ public function testDate() : void
{
$commit = new Commit();
@@ -119,7 +119,7 @@ class CommitTest extends \PHPUnit\Framework\TestCase
self::assertEquals($date->format('Y-m-d'), $commit->getDate()->format('Y-m-d'));
}
- public function testRepository()
+ public function testRepository() : void
{
$commit = new Commit();
diff --git a/tests/Utils/Git/GitTest.php b/tests/Utils/Git/GitTest.php
index a329f8e0b..79280100d 100644
--- a/tests/Utils/Git/GitTest.php
+++ b/tests/Utils/Git/GitTest.php
@@ -17,7 +17,7 @@ use phpOMS\Utils\Git\Git;
class GitTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
self::assertEquals('/usr/bin/git', Git::getBin());
}
diff --git a/tests/Utils/Git/RepositoryTest.php b/tests/Utils/Git/RepositoryTest.php
index 199e9398e..bbc02248e 100644
--- a/tests/Utils/Git/RepositoryTest.php
+++ b/tests/Utils/Git/RepositoryTest.php
@@ -17,7 +17,7 @@ use phpOMS\Utils\Git\Repository;
class RepositoryTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
$repo = new Repository(\realpath(__DIR__ . '/../../../'));
self::assertTrue('phpOMS' === $repo->getName() || 'build' === $repo->getName());
diff --git a/tests/Utils/Git/TagTest.php b/tests/Utils/Git/TagTest.php
index 7fd78e376..c688cfd74 100644
--- a/tests/Utils/Git/TagTest.php
+++ b/tests/Utils/Git/TagTest.php
@@ -17,14 +17,14 @@ use phpOMS\Utils\Git\Tag;
class TagTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
$tag = new Tag();
self::assertEquals('', $tag->getMessage());
self::assertEquals('', $tag->getName());
}
- public function testGetSet()
+ public function testGetSet() : void
{
$tag = new Tag('test');
self::assertEquals('test', $tag->getName());
diff --git a/tests/Utils/IO/Csv/CsvSettingsTest.php b/tests/Utils/IO/Csv/CsvSettingsTest.php
index daf6f5dab..12ff86974 100644
--- a/tests/Utils/IO/Csv/CsvSettingsTest.php
+++ b/tests/Utils/IO/Csv/CsvSettingsTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Utils\IO\Csv;
class CsvSettingsTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Utils/IO/Excel/ExcelDatabaseMapperTest.php b/tests/Utils/IO/Excel/ExcelDatabaseMapperTest.php
index 7f9368f45..e40a3a8b1 100644
--- a/tests/Utils/IO/Excel/ExcelDatabaseMapperTest.php
+++ b/tests/Utils/IO/Excel/ExcelDatabaseMapperTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Utils\IO\Excel;
class ExcelDatabaseMapperTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Utils/IO/IODatabaseMapperTest.php b/tests/Utils/IO/IODatabaseMapperTest.php
index 32b4de379..e66964054 100644
--- a/tests/Utils/IO/IODatabaseMapperTest.php
+++ b/tests/Utils/IO/IODatabaseMapperTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Utils\IO;
class IODatabaseMapperTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Utils/IO/Json/InvalidJsonExceptionTest.php b/tests/Utils/IO/Json/InvalidJsonExceptionTest.php
index 895fc33ff..3e6ed29ba 100644
--- a/tests/Utils/IO/Json/InvalidJsonExceptionTest.php
+++ b/tests/Utils/IO/Json/InvalidJsonExceptionTest.php
@@ -17,7 +17,7 @@ use phpOMS\Utils\IO\Json\InvalidJsonException;
class InvalidJsonExceptionTest extends \PHPUnit\Framework\TestCase
{
- public function testException()
+ public function testException() : void
{
self::assertInstanceOf(\UnexpectedValueException::class, new InvalidJsonException(''));
}
diff --git a/tests/Utils/IO/Zip/GzTest.php b/tests/Utils/IO/Zip/GzTest.php
index b6c823a33..68e6db2db 100644
--- a/tests/Utils/IO/Zip/GzTest.php
+++ b/tests/Utils/IO/Zip/GzTest.php
@@ -17,7 +17,7 @@ use phpOMS\Utils\IO\Zip\Gz;
class GzTest extends \PHPUnit\Framework\TestCase
{
- public function testGz()
+ public function testGz() : void
{
self::assertTrue(Gz::pack(
__DIR__ . '/test a.txt',
diff --git a/tests/Utils/IO/Zip/TarGzTest.php b/tests/Utils/IO/Zip/TarGzTest.php
index 69264a113..682ff7879 100644
--- a/tests/Utils/IO/Zip/TarGzTest.php
+++ b/tests/Utils/IO/Zip/TarGzTest.php
@@ -17,7 +17,7 @@ use phpOMS\Utils\IO\Zip\TarGz;
class TarGzTest extends \PHPUnit\Framework\TestCase
{
- protected function setUp()
+ protected function setUp() : void
{
if (!extension_loaded('phar')) {
$this->markTestSkipped(
@@ -26,7 +26,7 @@ class TarGzTest extends \PHPUnit\Framework\TestCase
}
}
- public function testTarGz()
+ public function testTarGz() : void
{
self::assertTrue(TarGz::pack(
[
diff --git a/tests/Utils/IO/Zip/TarTest.php b/tests/Utils/IO/Zip/TarTest.php
index 2c394e794..cc1323b1b 100644
--- a/tests/Utils/IO/Zip/TarTest.php
+++ b/tests/Utils/IO/Zip/TarTest.php
@@ -17,7 +17,7 @@ use phpOMS\Utils\IO\Zip\Tar;
class TarTest extends \PHPUnit\Framework\TestCase
{
- protected function setUp()
+ protected function setUp() : void
{
if (!extension_loaded('phar')) {
$this->markTestSkipped(
@@ -26,7 +26,7 @@ class TarTest extends \PHPUnit\Framework\TestCase
}
}
- public function testTar()
+ public function testTar() : void
{
self::assertTrue(Tar::pack(
[
diff --git a/tests/Utils/IO/Zip/ZipTest.php b/tests/Utils/IO/Zip/ZipTest.php
index f80345ebc..d4798d98f 100644
--- a/tests/Utils/IO/Zip/ZipTest.php
+++ b/tests/Utils/IO/Zip/ZipTest.php
@@ -17,7 +17,7 @@ use phpOMS\Utils\IO\Zip\Zip;
class ZipTest extends \PHPUnit\Framework\TestCase
{
- protected function setUp()
+ protected function setUp() : void
{
if (!extension_loaded('zip')) {
$this->markTestSkipped(
@@ -26,7 +26,7 @@ class ZipTest extends \PHPUnit\Framework\TestCase
}
}
- public function testZip()
+ public function testZip() : void
{
self::assertTrue(Zip::pack(
[
diff --git a/tests/Utils/ImageUtilsTest.php b/tests/Utils/ImageUtilsTest.php
index 74fb42faf..6a2af784e 100644
--- a/tests/Utils/ImageUtilsTest.php
+++ b/tests/Utils/ImageUtilsTest.php
@@ -19,7 +19,7 @@ use phpOMS\Utils\ImageUtils;
class ImageUtilsTest extends \PHPUnit\Framework\TestCase
{
- public function testImage()
+ public function testImage() : void
{
self::assertEquals(
\file_get_contents(__DIR__ . '/logo.png'),
diff --git a/tests/Utils/JsonBuilderTest.php b/tests/Utils/JsonBuilderTest.php
index a76ffb14a..c3c85bafb 100644
--- a/tests/Utils/JsonBuilderTest.php
+++ b/tests/Utils/JsonBuilderTest.php
@@ -19,7 +19,7 @@ require_once __DIR__ . '/../Autoloader.php';
class JsonBuilderTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
$builder = new JsonBuilder();
self::assertEquals([], $builder->getJson());
@@ -27,7 +27,7 @@ class JsonBuilderTest extends \PHPUnit\Framework\TestCase
self::assertEquals([], $builder->getJson());
}
- public function testBuilder()
+ public function testBuilder() : void
{
// main test is/should be done on ArrayUtils::setArray etc.
$builder = new JsonBuilder();
diff --git a/tests/Utils/PDF/PdfTest.php b/tests/Utils/PDF/PdfTest.php
index 43d96509c..44f1338a7 100644
--- a/tests/Utils/PDF/PdfTest.php
+++ b/tests/Utils/PDF/PdfTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Utils\PDF;
class PdfTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Utils/Parser/Markdown/MarkdownTest.php b/tests/Utils/Parser/Markdown/MarkdownTest.php
index a00eff509..bafefbf49 100644
--- a/tests/Utils/Parser/Markdown/MarkdownTest.php
+++ b/tests/Utils/Parser/Markdown/MarkdownTest.php
@@ -18,7 +18,7 @@ use phpOMS\Utils\Parser\Markdown\Markdown;
class MarkdownTest extends \PHPUnit\Framework\TestCase
{
- public function testParsing()
+ public function testParsing() : void
{
$files = Directory::list(__DIR__ . '/data');
diff --git a/tests/Utils/Parser/Php/ArrayParserTest.php b/tests/Utils/Parser/Php/ArrayParserTest.php
index ba1b95573..e96127537 100644
--- a/tests/Utils/Parser/Php/ArrayParserTest.php
+++ b/tests/Utils/Parser/Php/ArrayParserTest.php
@@ -17,11 +17,11 @@ use phpOMS\Utils\Parser\Php\ArrayParser;
class ArrayParserTest extends \PHPUnit\Framework\TestCase
{
- public function testParser()
+ public function testParser() : void
{
$serializable = new class implements \Serializable {
public function serialize() { return 2; }
- public function unserialize($raw) {}
+ public function unserialize($raw) : void {}
};
$jsonSerialize = new class implements \JsonSerializable {
@@ -62,7 +62,7 @@ class ArrayParserTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \UnexpectedValueException
*/
- public function testInvalidValueType()
+ public function testInvalidValueType() : void
{
ArrayParser::parseVariable(new class {});
}
diff --git a/tests/Utils/PermutationTest.php b/tests/Utils/PermutationTest.php
index 8f62748ad..535957c62 100644
--- a/tests/Utils/PermutationTest.php
+++ b/tests/Utils/PermutationTest.php
@@ -19,7 +19,7 @@ require_once __DIR__ . '/../Autoloader.php';
class PermutationTest extends \PHPUnit\Framework\TestCase
{
- public function testPermute()
+ public function testPermute() : void
{
$arr = ['a', 'b', 'c'];
$permutations = ['abc', 'acb', 'bac', 'bca', 'cab', 'cba'];
@@ -29,20 +29,20 @@ class PermutationTest extends \PHPUnit\Framework\TestCase
self::assertEquals($permutations2, Permutation::permut($arr, [], false));
}
- public function testIsPermutation()
+ public function testIsPermutation() : void
{
self::assertTrue(Permutation::isPermutation('abc', 'bca'));
self::assertFalse(Permutation::isPermutation('abc', 'bda'));
}
- public function testIsPalindrome()
+ public function testIsPalindrome() : void
{
self::assertTrue(Permutation::isPalindrome('abba'));
self::assertTrue(Permutation::isPalindrome('abb1a', 'a-z'));
self::assertFalse(Permutation::isPalindrome('abb1a'));
}
- public function testPermutate()
+ public function testPermutate() : void
{
self::assertEquals(['c', 'b', 'a'], Permutation::permutate(['a', 'b', 'c'], [2, 1, 1]));
}
@@ -50,7 +50,7 @@ class PermutationTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \InvalidArgumentException
*/
- public function testWrongPermuteParameterType()
+ public function testWrongPermuteParameterType() : void
{
Permutation::permutate(4, [2, 1, 1]);
}
@@ -58,7 +58,7 @@ class PermutationTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \OutOfBoundsException
*/
- public function testWrongPermuteKeyLength()
+ public function testWrongPermuteKeyLength() : void
{
Permutation::permutate('abc', [2, 1, 1, 6]);
}
diff --git a/tests/Utils/RnG/AddressTest.php b/tests/Utils/RnG/AddressTest.php
index 4740e04ab..c0677d24c 100644
--- a/tests/Utils/RnG/AddressTest.php
+++ b/tests/Utils/RnG/AddressTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Utils\RnG;
class AddressTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Utils/RnG/ArrayRandomizeTest.php b/tests/Utils/RnG/ArrayRandomizeTest.php
index 248618883..ca15b5f92 100644
--- a/tests/Utils/RnG/ArrayRandomizeTest.php
+++ b/tests/Utils/RnG/ArrayRandomizeTest.php
@@ -17,7 +17,7 @@ use phpOMS\Utils\RnG\ArrayRandomize;
class ArrayRandomizeTest extends \PHPUnit\Framework\TestCase
{
- public function testRandomize()
+ public function testRandomize() : void
{
$orig = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20];
diff --git a/tests/Utils/RnG/CityTest.php b/tests/Utils/RnG/CityTest.php
index 69a81f807..6f8897a19 100644
--- a/tests/Utils/RnG/CityTest.php
+++ b/tests/Utils/RnG/CityTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Utils\RnG;
class CityTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Utils/RnG/DateTimeTest.php b/tests/Utils/RnG/DateTimeTest.php
index 77e2d263f..8a0e235fe 100644
--- a/tests/Utils/RnG/DateTimeTest.php
+++ b/tests/Utils/RnG/DateTimeTest.php
@@ -17,7 +17,7 @@ use phpOMS\Utils\RnG\DateTime;
class DateTimeTest extends \PHPUnit\Framework\TestCase
{
- public function testRnG()
+ public function testRnG() : void
{
for ($i = 0; $i < 100; ++$i) {
$dateMin = new \DateTime();
diff --git a/tests/Utils/RnG/DistributionTypeTest.php b/tests/Utils/RnG/DistributionTypeTest.php
index 6b1dbfee3..df57d8a2e 100644
--- a/tests/Utils/RnG/DistributionTypeTest.php
+++ b/tests/Utils/RnG/DistributionTypeTest.php
@@ -17,7 +17,7 @@ use phpOMS\Utils\RnG\DistributionType;
class DistributionTypeTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(2, \count(DistributionType::getConstants()));
self::assertEquals(DistributionType::getConstants(), array_unique(DistributionType::getConstants()));
diff --git a/tests/Utils/RnG/EmailTest.php b/tests/Utils/RnG/EmailTest.php
index 149da4b82..c1a289c76 100644
--- a/tests/Utils/RnG/EmailTest.php
+++ b/tests/Utils/RnG/EmailTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Utils\RnG;
class EmailTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Utils/RnG/FileTest.php b/tests/Utils/RnG/FileTest.php
index 444839ff7..ee713687e 100644
--- a/tests/Utils/RnG/FileTest.php
+++ b/tests/Utils/RnG/FileTest.php
@@ -17,7 +17,7 @@ use phpOMS\Utils\RnG\File;
class FileTest extends \PHPUnit\Framework\TestCase
{
- public function testRnGExtension()
+ public function testRnGExtension() : void
{
self::assertRegExp('/^[a-z0-9]{1,5}$/', File::generateExtension());
}
diff --git a/tests/Utils/RnG/IBANTest.php b/tests/Utils/RnG/IBANTest.php
index 7d5465013..672ba5a1d 100644
--- a/tests/Utils/RnG/IBANTest.php
+++ b/tests/Utils/RnG/IBANTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Utils\RnG;
class IBANTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Utils/RnG/LinearCongruentialGeneratorTest.php b/tests/Utils/RnG/LinearCongruentialGeneratorTest.php
index 067d74d1b..69a256c9c 100644
--- a/tests/Utils/RnG/LinearCongruentialGeneratorTest.php
+++ b/tests/Utils/RnG/LinearCongruentialGeneratorTest.php
@@ -17,7 +17,7 @@ use phpOMS\Utils\RnG\LinearCongruentialGenerator;
class LinearCongruentialGeneratorTest extends \PHPUnit\Framework\TestCase
{
- public function testBsdRng()
+ public function testBsdRng() : void
{
self::assertEquals(12345, LinearCongruentialGenerator::bsd());
@@ -31,7 +31,7 @@ class LinearCongruentialGeneratorTest extends \PHPUnit\Framework\TestCase
self::assertNotEquals(LinearCongruentialGenerator::bsd(0), LinearCongruentialGenerator::bsd(1));
}
- public function testMsRng()
+ public function testMsRng() : void
{
self::assertEquals(38, LinearCongruentialGenerator::msvcrt());
self::assertEquals(7719, LinearCongruentialGenerator::msvcrt());
diff --git a/tests/Utils/RnG/NameTest.php b/tests/Utils/RnG/NameTest.php
index 260e13c10..8e88f7b33 100644
--- a/tests/Utils/RnG/NameTest.php
+++ b/tests/Utils/RnG/NameTest.php
@@ -17,7 +17,7 @@ use phpOMS\Utils\RnG\Name;
class NameTest extends \PHPUnit\Framework\TestCase
{
- public function testRandom()
+ public function testRandom() : void
{
self::assertNotEquals(Name::generateName(['female']), Name::generateName(['male']));
}
diff --git a/tests/Utils/RnG/NumericTest.php b/tests/Utils/RnG/NumericTest.php
index 31c218c54..f95a9f35b 100644
--- a/tests/Utils/RnG/NumericTest.php
+++ b/tests/Utils/RnG/NumericTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Utils\RnG;
class NumericTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Utils/RnG/PhoneTest.php b/tests/Utils/RnG/PhoneTest.php
index c1d1fe4cb..63206f4a2 100644
--- a/tests/Utils/RnG/PhoneTest.php
+++ b/tests/Utils/RnG/PhoneTest.php
@@ -17,7 +17,7 @@ use phpOMS\Utils\RnG\Phone;
class PhoneTest extends \PHPUnit\Framework\TestCase
{
- public function testRnG()
+ public function testRnG() : void
{
self::assertRegExp('/^\+\d{1,2} \(\d{3,4}\) \d{3,5}\-\d{3,8}$/', Phone::generatePhone());
}
diff --git a/tests/Utils/RnG/PostalZipTest.php b/tests/Utils/RnG/PostalZipTest.php
index 06eeb0712..9cc51c5df 100644
--- a/tests/Utils/RnG/PostalZipTest.php
+++ b/tests/Utils/RnG/PostalZipTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Utils\RnG;
class PostalZipTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Utils/RnG/StringUtilsTest.php b/tests/Utils/RnG/StringUtilsTest.php
index 7872f7db1..5824d2b26 100644
--- a/tests/Utils/RnG/StringUtilsTest.php
+++ b/tests/Utils/RnG/StringUtilsTest.php
@@ -20,7 +20,7 @@ class StringUtilsTest extends \PHPUnit\Framework\TestCase
/**
* @slowThreshold 1500
*/
- public function testStrings()
+ public function testStrings() : void
{
$haystack = [];
$outOfBounds = false;
diff --git a/tests/Utils/RnG/TextTest.php b/tests/Utils/RnG/TextTest.php
index 112d0bb0e..f19e64048 100644
--- a/tests/Utils/RnG/TextTest.php
+++ b/tests/Utils/RnG/TextTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Utils\RnG;
class TextTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Utils/StringCompareTest.php b/tests/Utils/StringCompareTest.php
index 4d936f08d..b2375ac29 100644
--- a/tests/Utils/StringCompareTest.php
+++ b/tests/Utils/StringCompareTest.php
@@ -19,7 +19,7 @@ use phpOMS\Utils\StringCompare;
class StringCompareTest extends \PHPUnit\Framework\TestCase
{
- public function testDictionary()
+ public function testDictionary() : void
{
$dict = new StringCompare(
[
diff --git a/tests/Utils/StringUtilsTest.php b/tests/Utils/StringUtilsTest.php
index 0f0cc1d74..cba678d4e 100644
--- a/tests/Utils/StringUtilsTest.php
+++ b/tests/Utils/StringUtilsTest.php
@@ -19,12 +19,12 @@ require_once __DIR__ . '/../Autoloader.php';
class StringUtilsTest extends \PHPUnit\Framework\TestCase
{
- public function testEvaluation()
+ public function testEvaluation() : void
{
self::assertTrue(\abs(2.5 - StringUtils::getEntropy('akj@!0aj')) < 0.1);
}
- public function testStartsEnds()
+ public function testStartsEnds() : void
{
$string = 'This is a test string.';
self::assertTrue(StringUtils::startsWith($string, 'This '));
@@ -38,7 +38,7 @@ class StringUtilsTest extends \PHPUnit\Framework\TestCase
self::assertFalse(StringUtils::mb_endsWith($string, 'strng.'));
}
- public function testTransform()
+ public function testTransform() : void
{
self::assertEquals('This ', StringUtils::mb_ucfirst('this '));
self::assertNotEquals('this ', StringUtils::mb_ucfirst('this '));
@@ -46,7 +46,7 @@ class StringUtilsTest extends \PHPUnit\Framework\TestCase
self::assertNotEquals('Thss', StringUtils::mb_lcfirst('Thss'));
}
- public function testTrim()
+ public function testTrim() : void
{
$string = 'This is a test string.';
@@ -62,7 +62,7 @@ class StringUtilsTest extends \PHPUnit\Framework\TestCase
self::assertEquals('asdf%', StringUtils::mb_ltrim('%asdf%', '%'));
}
- public function testContains()
+ public function testContains() : void
{
$string = 'This is a test string.';
@@ -73,14 +73,14 @@ class StringUtilsTest extends \PHPUnit\Framework\TestCase
self::assertFalse(StringUtils::mb_contains($string, ['iss', 'nothing', 'false']));
}
- public function testCount()
+ public function testCount() : void
{
self::assertEquals(5, StringUtils::mb_count_chars('αααααΕεΙιΜμΨψ')['α']);
self::assertEquals(4, StringUtils::countCharacterFromStart(' Test string', ' '));
self::assertEquals(0, StringUtils::countCharacterFromStart(' Test string', 's'));
}
- public function testStringify()
+ public function testStringify() : void
{
self::assertEquals('"abc"', StringUtils::stringify(new class implements \JsonSerializable {
public function jsonSerialize()
@@ -97,7 +97,7 @@ class StringUtilsTest extends \PHPUnit\Framework\TestCase
return 'abc';
}
- public function unserialize($val)
+ public function unserialize($val) : void
{
}
}));
diff --git a/tests/Utils/TaskSchedule/CronJobTest.php b/tests/Utils/TaskSchedule/CronJobTest.php
index 8afe3ca5b..9266abe45 100644
--- a/tests/Utils/TaskSchedule/CronJobTest.php
+++ b/tests/Utils/TaskSchedule/CronJobTest.php
@@ -17,7 +17,7 @@ use phpOMS\Utils\TaskSchedule\CronJob;
class CronJobTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
self::assertInstanceOf('\phpOMS\Utils\TaskSchedule\TaskAbstract', new CronJob(''));
}
diff --git a/tests/Utils/TaskSchedule/CronTest.php b/tests/Utils/TaskSchedule/CronTest.php
index e31a059bb..0d0cb804f 100644
--- a/tests/Utils/TaskSchedule/CronTest.php
+++ b/tests/Utils/TaskSchedule/CronTest.php
@@ -18,12 +18,12 @@ use phpOMS\Utils\TaskSchedule\CronJob;
class CronTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
self::assertInstanceOf('\phpOMS\Utils\TaskSchedule\SchedulerAbstract', new Cron());
}
- public function testCRUD()
+ public function testCRUD() : void
{
if (\stripos(PHP_OS, 'LINUX') !== false && \stripos(__DIR__, '/travis/') === false) {
self::assertTrue(Cron::guessBin());
diff --git a/tests/Utils/TaskSchedule/IntervalTest.php b/tests/Utils/TaskSchedule/IntervalTest.php
index 5af5771d3..df03b1eee 100644
--- a/tests/Utils/TaskSchedule/IntervalTest.php
+++ b/tests/Utils/TaskSchedule/IntervalTest.php
@@ -16,7 +16,7 @@ namespace phpOMS\tests\Utils\TaskSchedule;
class IntervalTest extends \PHPUnit\Framework\TestCase
{
- public function testPlaceholder()
+ public function testPlaceholder() : void
{
self::markTestIncomplete();
}
diff --git a/tests/Utils/TaskSchedule/ScheduleTest.php b/tests/Utils/TaskSchedule/ScheduleTest.php
index cf7bf393b..2542517a0 100644
--- a/tests/Utils/TaskSchedule/ScheduleTest.php
+++ b/tests/Utils/TaskSchedule/ScheduleTest.php
@@ -17,7 +17,7 @@ use phpOMS\Utils\TaskSchedule\Schedule;
class ScheduleTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
self::assertInstanceOf('\phpOMS\Utils\TaskSchedule\TaskAbstract', new Schedule(''));
}
diff --git a/tests/Utils/TaskSchedule/SchedulerAbstractTest.php b/tests/Utils/TaskSchedule/SchedulerAbstractTest.php
index f514830a4..a3a3f3871 100644
--- a/tests/Utils/TaskSchedule/SchedulerAbstractTest.php
+++ b/tests/Utils/TaskSchedule/SchedulerAbstractTest.php
@@ -17,7 +17,7 @@ use phpOMS\Utils\TaskSchedule\SchedulerAbstract;
class SchedulerAbstractTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
self::assertTrue(SchedulerAbstract::getBin() === '' || \file_exists(SchedulerAbstract::getBin() ));
}
diff --git a/tests/Utils/TaskSchedule/SchedulerFactoryTest.php b/tests/Utils/TaskSchedule/SchedulerFactoryTest.php
index 523f6fa0a..742f031a9 100644
--- a/tests/Utils/TaskSchedule/SchedulerFactoryTest.php
+++ b/tests/Utils/TaskSchedule/SchedulerFactoryTest.php
@@ -19,7 +19,7 @@ use phpOMS\Utils\TaskSchedule\TaskScheduler;
class SchedulerFactoryTest extends \PHPUnit\Framework\TestCase
{
- public function testFactory()
+ public function testFactory() : void
{
self::assertTrue((SchedulerFactory::create('') instanceof Cron) || (SchedulerFactory::create('') instanceof TaskScheduler));
diff --git a/tests/Utils/TaskSchedule/TaskAbstractTest.php b/tests/Utils/TaskSchedule/TaskAbstractTest.php
index ba3b07d5f..4d7fa5ffa 100644
--- a/tests/Utils/TaskSchedule/TaskAbstractTest.php
+++ b/tests/Utils/TaskSchedule/TaskAbstractTest.php
@@ -19,7 +19,7 @@ class TaskAbstractTest extends \PHPUnit\Framework\TestCase
{
private $class = null;
- protected function setUp()
+ protected function setUp() : void
{
$this->class = new class('') extends TaskAbstract {
public function __toString() : string
@@ -34,7 +34,7 @@ class TaskAbstractTest extends \PHPUnit\Framework\TestCase
};
}
- public function testDefault()
+ public function testDefault() : void
{
self::assertEquals('', $this->class->getId());
self::assertEquals('', $this->class->getCommand());
@@ -45,7 +45,7 @@ class TaskAbstractTest extends \PHPUnit\Framework\TestCase
self::assertEquals('', $this->class->getInterval());
}
- public function testGetSet()
+ public function testGetSet() : void
{
$this->class->setCommand('Command');
self::assertEquals('Command', $this->class->getCommand());
diff --git a/tests/Utils/TaskSchedule/TaskFactoryTest.php b/tests/Utils/TaskSchedule/TaskFactoryTest.php
index b35eb547e..7bd19c4cc 100644
--- a/tests/Utils/TaskSchedule/TaskFactoryTest.php
+++ b/tests/Utils/TaskSchedule/TaskFactoryTest.php
@@ -19,7 +19,7 @@ use phpOMS\Utils\TaskSchedule\TaskFactory;
class TaskFactoryTest extends \PHPUnit\Framework\TestCase
{
- public function testFactory()
+ public function testFactory() : void
{
self::assertTrue((TaskFactory::create('') instanceof CronJob) || (TaskFactory::create('') instanceof Schedule));
}
diff --git a/tests/Utils/TaskSchedule/TaskSchedulerTest.php b/tests/Utils/TaskSchedule/TaskSchedulerTest.php
index 9c98b1698..5f4247184 100644
--- a/tests/Utils/TaskSchedule/TaskSchedulerTest.php
+++ b/tests/Utils/TaskSchedule/TaskSchedulerTest.php
@@ -18,12 +18,12 @@ use phpOMS\Utils\TaskSchedule\TaskScheduler;
class TaskSchedulerTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
self::assertInstanceOf('\phpOMS\Utils\TaskSchedule\SchedulerAbstract', new TaskScheduler());
}
- public function testCRUD()
+ public function testCRUD() : void
{
if (\stristr(PHP_OS, 'WIN')) {
self::assertTrue(TaskScheduler::guessBin());
diff --git a/tests/Utils/TestUtilsTest.php b/tests/Utils/TestUtilsTest.php
index 20e242e27..94c25864d 100644
--- a/tests/Utils/TestUtilsTest.php
+++ b/tests/Utils/TestUtilsTest.php
@@ -19,7 +19,7 @@ use phpOMS\Utils\TestUtils;
class TestUtilsTest extends \PHPUnit\Framework\TestCase
{
- public function testGet()
+ public function testGet() : void
{
$class = new TestUtilsClass();
@@ -31,7 +31,7 @@ class TestUtilsTest extends \PHPUnit\Framework\TestCase
self::assertNull(TestUtils::getMember($class, 'e'));
}
- public function testSet()
+ public function testSet() : void
{
$class = new TestUtilsClass();
diff --git a/tests/Validation/Base/DateTimeTest.php b/tests/Validation/Base/DateTimeTest.php
index 771b34639..dabd5a899 100644
--- a/tests/Validation/Base/DateTimeTest.php
+++ b/tests/Validation/Base/DateTimeTest.php
@@ -17,7 +17,7 @@ use phpOMS\Validation\Base\DateTime;
class DateTimeTest extends \PHPUnit\Framework\TestCase
{
- public function testDateTime()
+ public function testDateTime() : void
{
self::assertTrue(DateTime::isValid('now'));
self::assertTrue(DateTime::isValid('10 September 2000'));
diff --git a/tests/Validation/Base/JsonTest.php b/tests/Validation/Base/JsonTest.php
index 6aa0ce8cc..a92221182 100644
--- a/tests/Validation/Base/JsonTest.php
+++ b/tests/Validation/Base/JsonTest.php
@@ -17,7 +17,7 @@ use phpOMS\Validation\Base\Json;
class JsonTest extends \PHPUnit\Framework\TestCase
{
- public function testJson()
+ public function testJson() : void
{
$template = \json_decode(file_get_contents(__DIR__ . '/json/template.json'), true);
diff --git a/tests/Validation/Finance/BICTest.php b/tests/Validation/Finance/BICTest.php
index 190feb6bf..256922d05 100644
--- a/tests/Validation/Finance/BICTest.php
+++ b/tests/Validation/Finance/BICTest.php
@@ -17,7 +17,7 @@ use phpOMS\Validation\Finance\BIC;
class BICTest extends \PHPUnit\Framework\TestCase
{
- public function testBic()
+ public function testBic() : void
{
self::assertTrue(BIC::isValid('ASPKAT2LXXX'));
self::assertTrue(BIC::isValid('ASPKAT2L'));
diff --git a/tests/Validation/Finance/CreditCardTest.php b/tests/Validation/Finance/CreditCardTest.php
index c7496d59a..edac194bb 100644
--- a/tests/Validation/Finance/CreditCardTest.php
+++ b/tests/Validation/Finance/CreditCardTest.php
@@ -17,7 +17,7 @@ use phpOMS\Validation\Finance\CreditCard;
class CreditCardTest extends \PHPUnit\Framework\TestCase
{
- public function testCreditCard()
+ public function testCreditCard() : void
{
self::assertTrue(CreditCard::isValid('4242424242424242'));
self::assertFalse(CreditCard::isValid('4242424242424241'));
diff --git a/tests/Validation/Finance/IbanEnumTest.php b/tests/Validation/Finance/IbanEnumTest.php
index 82e5e3e47..f3657058d 100644
--- a/tests/Validation/Finance/IbanEnumTest.php
+++ b/tests/Validation/Finance/IbanEnumTest.php
@@ -17,7 +17,7 @@ use phpOMS\Validation\Finance\IbanEnum;
class IbanEnumTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
$enums = IbanEnum::getConstants();
$ok = true;
diff --git a/tests/Validation/Finance/IbanErrorTypeTest.php b/tests/Validation/Finance/IbanErrorTypeTest.php
index e97dd5d97..07946890a 100644
--- a/tests/Validation/Finance/IbanErrorTypeTest.php
+++ b/tests/Validation/Finance/IbanErrorTypeTest.php
@@ -17,7 +17,7 @@ use phpOMS\Validation\Finance\IbanErrorType;
class IbanErrorTypeTest extends \PHPUnit\Framework\TestCase
{
- public function testEnums()
+ public function testEnums() : void
{
self::assertEquals(5, \count(IbanErrorType::getConstants()));
self::assertEquals(1, IbanErrorType::INVALID_COUNTRY);
diff --git a/tests/Validation/Finance/IbanTest.php b/tests/Validation/Finance/IbanTest.php
index 2aad40bb9..b9f5e11d5 100644
--- a/tests/Validation/Finance/IbanTest.php
+++ b/tests/Validation/Finance/IbanTest.php
@@ -17,7 +17,7 @@ use phpOMS\Validation\Finance\Iban;
class IbanTest extends \PHPUnit\Framework\TestCase
{
- public function testValid()
+ public function testValid() : void
{
self::assertTrue(Iban::isValid('DE22 6008 0000 0960 0280 00'));
self::assertFalse(Iban::isValid('DE22 6008 0000 0960 0280 0'));
diff --git a/tests/Validation/Network/EmailTest.php b/tests/Validation/Network/EmailTest.php
index dfbafed5b..b853ccef3 100644
--- a/tests/Validation/Network/EmailTest.php
+++ b/tests/Validation/Network/EmailTest.php
@@ -17,7 +17,7 @@ use phpOMS\Validation\Network\Email;
class EmailTest extends \PHPUnit\Framework\TestCase
{
- public function testValidation()
+ public function testValidation() : void
{
self::assertTrue(Email::isValid('test.string@email.com'));
self::assertFalse(Email::isValid('test.string@email'));
diff --git a/tests/Validation/Network/HostnameTest.php b/tests/Validation/Network/HostnameTest.php
index 522c2fd57..4502e64b0 100644
--- a/tests/Validation/Network/HostnameTest.php
+++ b/tests/Validation/Network/HostnameTest.php
@@ -17,7 +17,7 @@ use phpOMS\Validation\Network\Hostname;
class HostnameTest extends \PHPUnit\Framework\TestCase
{
- public function testHostname()
+ public function testHostname() : void
{
self::assertTrue(Hostname::isValid('test.com'));
self::assertFalse(Hostname::isValid('http://test.com'));
diff --git a/tests/Validation/Network/IpTest.php b/tests/Validation/Network/IpTest.php
index ec2d0c139..cbe16ee78 100644
--- a/tests/Validation/Network/IpTest.php
+++ b/tests/Validation/Network/IpTest.php
@@ -17,7 +17,7 @@ use phpOMS\Validation\Network\Ip;
class IpTest extends \PHPUnit\Framework\TestCase
{
- public function testValid()
+ public function testValid() : void
{
self::assertTrue(IP::isValid('192.168.178.1'));
self::assertTrue(IP::isValid('2001:0db8:85a3:0000:0000:8a2e:0370:7334'));
diff --git a/tests/Validation/ValidatorTest.php b/tests/Validation/ValidatorTest.php
index bfcfc5d6a..76bde9445 100644
--- a/tests/Validation/ValidatorTest.php
+++ b/tests/Validation/ValidatorTest.php
@@ -20,7 +20,7 @@ require_once __DIR__ . '/../Autoloader.php';
class ValidatorTest extends \PHPUnit\Framework\TestCase
{
- public function testValidation()
+ public function testValidation() : void
{
self::assertTrue(Validator::contains('Test string contains something.', 'contains'));
self::assertFalse(Validator::contains('Test string contains something.', 'contains2'));
diff --git a/tests/Version/VersionTest.php b/tests/Version/VersionTest.php
index 646e34b68..64b822752 100644
--- a/tests/Version/VersionTest.php
+++ b/tests/Version/VersionTest.php
@@ -19,7 +19,7 @@ require_once __DIR__ . '/../Autoloader.php';
class VersionTest extends \PHPUnit\Framework\TestCase
{
- public function testVersionCompare()
+ public function testVersionCompare() : void
{
$version1 = '1.23.456';
$version2 = '1.23.567';
diff --git a/tests/Views/PaginationViewTest.php b/tests/Views/PaginationViewTest.php
index 0e9995b5a..830ead24d 100644
--- a/tests/Views/PaginationViewTest.php
+++ b/tests/Views/PaginationViewTest.php
@@ -19,7 +19,7 @@ use phpOMS\Views\PaginationView;
class PaginationViewTest extends \PHPUnit\Framework\TestCase
{
- public function testDefault()
+ public function testDefault() : void
{
$view = new PaginationView();
self::assertEquals(7, $view->getMaxPages());
@@ -28,7 +28,7 @@ class PaginationViewTest extends \PHPUnit\Framework\TestCase
self::assertEquals(0, $view->getResults());
}
- public function testGetSet()
+ public function testGetSet() : void
{
$view = new PaginationView();
diff --git a/tests/Views/ViewTest.php b/tests/Views/ViewTest.php
index 734195e89..8e1ca5009 100644
--- a/tests/Views/ViewTest.php
+++ b/tests/Views/ViewTest.php
@@ -31,7 +31,7 @@ class ViewTest extends \PHPUnit\Framework\TestCase
protected $app = null;
- public function setUp()
+ public function setUp() : void
{
$this->dbPool = new DatabasePool();
/** @var array $CONFIG */
@@ -46,7 +46,7 @@ class ViewTest extends \PHPUnit\Framework\TestCase
$this->app->dbPool = $this->dbPool;
}
- public function testDefault()
+ public function testDefault() : void
{
$view = new View($this->app, new Request(new Http('')), new Response(new Localization()));
@@ -60,7 +60,7 @@ class ViewTest extends \PHPUnit\Framework\TestCase
self::assertEmpty($view->toArray());
}
- public function testGetText()
+ public function testGetText() : void
{
$view = new View($this->app, $request = new Request(new Http('')), $response = new Response());
$view->setTemplate('/Modules/Admin/Theme/Backend/accounts-list');
@@ -80,7 +80,7 @@ class ViewTest extends \PHPUnit\Framework\TestCase
self::assertEquals('<a href="test">Test</a>', $view->getHtml('Test'));
}
- public function testGetSet()
+ public function testGetSet() : void
{
$view = new View($this->app, $request = new Request(new Http('')), $response = new Response());
@@ -109,7 +109,7 @@ class ViewTest extends \PHPUnit\Framework\TestCase
self::assertFalse($view->getView('test'));
}
- public function testRender()
+ public function testRender() : void
{
$view = new View($this->app, new Request(), new Response());
@@ -120,7 +120,7 @@ class ViewTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testRenderException()
+ public function testRenderException() : void
{
$view = new View($this->app, new Request(new Http('')), new Response());
$view->setTemplate('something.txt');
@@ -131,7 +131,7 @@ class ViewTest extends \PHPUnit\Framework\TestCase
/**
* @expectedException \phpOMS\System\File\PathException
*/
- public function testSerializeException()
+ public function testSerializeException() : void
{
$view = new View($this->app, new Request(new Http('')), new Response());
$view->setTemplate('something.txt');