From 59d3f98110f54bc7e0ec5f3e414d0224409b1cfe Mon Sep 17 00:00:00 2001
From: Dennis Eichhorn
Date: Fri, 11 May 2018 21:33:24 +0200
Subject: [PATCH] Make classes final
---
Account/Account.php | 2 +-
Account/AccountManager.php | 2 +-
Account/NullAccount.php | 2 +-
Asset/AssetManager.php | 2 +-
Auth/Auth.php | 2 +-
AutoloadException.php | 2 +-
Autoloader.php | 13 ++++++++-
Business/Finance/Depreciation.php | 2 +-
Business/Finance/FinanceFormulas.php | 2 +-
Business/Finance/Loan.php | 2 +-
Business/Finance/Lorenzkurve.php | 2 +-
Business/Finance/StockBonds.php | 2 +-
Business/Marketing/Metrics.php | 2 +-
Business/Marketing/NetPromoterScore.php | 2 +-
Business/Programming/Metrics.php | 2 +-
Business/Sales/MarketShareEstimation.php | 2 +-
DataStorage/Cache/CachePool.php | 2 +-
DataStorage/Cookie/CookieJar.php | 2 +-
.../Database/Connection/ConnectionFactory.php | 2 +-
.../Database/Connection/MysqlConnection.php | 2 +-
.../Database/Connection/NullConnection.php | 2 +-
.../Connection/PostgresConnection.php | 2 +-
.../Database/Connection/SQLiteConnection.php | 2 +-
.../Connection/SqlServerConnection.php | 2 +-
DataStorage/Database/DatabasePool.php | 2 +-
.../InvalidConnectionConfigException.php | 2 +-
.../InvalidDatabaseTypeException.php | 2 +-
.../Exception/InvalidMapperException.php | 2 +-
DataStorage/Database/Query/Builder.php | 2 +-
DataStorage/LockException.php | 2 +-
Dispatcher/Dispatcher.php | 2 +-
Event/EventManager.php | 2 +-
Localization/L11nManager.php | 2 +-
Localization/Localization.php | 2 +-
Localization/Money.php | 2 +-
Localization/NullLocalization.php | 2 +-
Log/FileLogger.php | 2 +-
Math/Exception/ZeroDevisionException.php | 2 +-
Math/Functions/Fibunacci.php | 12 ++++++++-
Math/Functions/Functions.php | 12 ++++++++-
Math/Functions/Gamma.php | 13 ++++++++-
Math/Geometry/ConvexHull/MonotoneChain.php | 11 ++++++++
Math/Geometry/Shape/D2/Circle.php | 2 +-
Math/Geometry/Shape/D2/Ellipse.php | 2 +-
Math/Geometry/Shape/D2/Polygon.php | 2 +-
Math/Geometry/Shape/D2/Quadrilateral.php | 2 +-
Math/Geometry/Shape/D2/Rectangle.php | 2 +-
Math/Geometry/Shape/D2/Trapezoid.php | 2 +-
Math/Geometry/Shape/D2/Triangle.php | 2 +-
Math/Geometry/Shape/D3/Cone.php | 2 +-
Math/Geometry/Shape/D3/Cuboid.php | 2 +-
Math/Geometry/Shape/D3/Cylinder.php | 2 +-
Math/Geometry/Shape/D3/Prism.php | 2 +-
Math/Geometry/Shape/D3/RectangularPyramid.php | 2 +-
Math/Geometry/Shape/D3/Sphere.php | 2 +-
Math/Geometry/Shape/D3/Tetrahedron.php | 2 +-
Math/Matrix/CholeskyDecomposition.php | 2 +-
Math/Matrix/EigenvalueDecomposition.php | 2 +-
.../Exception/InvalidDimensionException.php | 2 +-
Math/Matrix/IdentityMatrix.php | 2 +-
Math/Matrix/LUDecomposition.php | 2 +-
Math/Matrix/QRDecomposition.php | 2 +-
Math/Matrix/SingularValueDecomposition.php | 2 +-
Math/Matrix/Vector.php | 2 +-
Math/Number/Complex.php | 2 +-
Math/Number/Integer.php | 13 ++++++++-
Math/Number/Natural.php | 13 ++++++++-
Math/Number/Numbers.php | 13 ++++++++-
Math/Number/Prime.php | 13 ++++++++-
Math/Statistic/Average.php | 13 ++++++++-
Math/Statistic/Basic.php | 12 ++++++++-
Math/Statistic/Correlation.php | 12 ++++++++-
Math/Statistic/MeasureOfDispersion.php | 12 ++++++++-
Message/Http/Header.php | 2 +-
Message/Http/Request.php | 2 +-
Message/Http/Response.php | 2 +-
Message/Http/Rest.php | 2 +-
Module/Exception/InvalidModuleException.php | 2 +-
Module/Exception/InvalidThemeException.php | 2 +-
Module/InfoManager.php | 2 +-
Module/ModuleFactory.php | 2 +-
Module/ModuleManager.php | 2 +-
Module/NullModule.php | 2 +-
Module/PackageManager.php | 2 +-
Router/Router.php | 2 +-
Security/PhpCode.php | 13 ++++++++-
System/File/FileUtils.php | 2 +-
System/File/Local/Directory.php | 2 +-
System/File/Local/File.php | 2 +-
System/File/PathException.php | 2 +-
System/File/PermissionException.php | 2 +-
System/OperatingSystem.php | 11 ++++++++
System/SystemUtils.php | 2 +-
Uri/Http.php | 2 +-
Uri/UriFactory.php | 2 +-
Utils/ArrayUtils.php | 2 +-
Utils/ColorUtils.php | 12 ++++++++-
Utils/ImageUtils.php | 13 ++++++++-
Utils/JsonBuilder.php | 11 +-------
Utils/Permutation.php | 13 ++++++++-
Utils/StringCompare.php | 2 +-
Utils/StringUtils.php | 2 +-
Utils/TestUtils.php | 13 ++++++++-
Version/Version.php | 2 +-
tests/Account/AccountTest.php | 5 +---
tests/Localization/NullLocalizationTest.php | 27 -------------------
.../Markdown/data/compound_emphasis.html | 2 +-
.../Utils/Parser/Markdown/data/em_strong.html | 8 +++---
.../Utils/Parser/Markdown/data/escaping.html | 2 +-
.../Utils/Parser/Markdown/data/strong_em.html | 6 ++---
110 files changed, 315 insertions(+), 151 deletions(-)
delete mode 100644 tests/Localization/NullLocalizationTest.php
diff --git a/Account/Account.php b/Account/Account.php
index a6fc54888..33f9ae6ec 100644
--- a/Account/Account.php
+++ b/Account/Account.php
@@ -169,7 +169,7 @@ class Account implements ArrayableInterface, \JsonSerializable
$this->createdAt = new \DateTime('now');
$this->lastActive = new \DateTime('now');
$this->id = $id;
- $this->l11n = new NullLocalization();
+ $this->l11n = new Localization();
}
/**
diff --git a/Account/AccountManager.php b/Account/AccountManager.php
index 9867f6adb..dfdbb99be 100644
--- a/Account/AccountManager.php
+++ b/Account/AccountManager.php
@@ -27,7 +27,7 @@ use phpOMS\DataStorage\Session\SessionInterface;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class AccountManager implements \Countable
+final class AccountManager implements \Countable
{
/**
diff --git a/Account/NullAccount.php b/Account/NullAccount.php
index 50a55ee41..4d14d18c0 100644
--- a/Account/NullAccount.php
+++ b/Account/NullAccount.php
@@ -22,6 +22,6 @@ namespace phpOMS\Account;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class NullAccount extends Account
+final class NullAccount extends Account
{
}
diff --git a/Asset/AssetManager.php b/Asset/AssetManager.php
index 4c022a834..5743d1cb6 100644
--- a/Asset/AssetManager.php
+++ b/Asset/AssetManager.php
@@ -22,7 +22,7 @@ namespace phpOMS\Asset;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class AssetManager implements \Countable
+final class AssetManager implements \Countable
{
/**
diff --git a/Auth/Auth.php b/Auth/Auth.php
index ccd46ccb0..b77d8b5cf 100644
--- a/Auth/Auth.php
+++ b/Auth/Auth.php
@@ -26,7 +26,7 @@ use phpOMS\DataStorage\Session\SessionInterface;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class Auth
+final class Auth
{
/**
* Constructor.
diff --git a/AutoloadException.php b/AutoloadException.php
index e4fd2a32f..3a6b63d48 100644
--- a/AutoloadException.php
+++ b/AutoloadException.php
@@ -24,7 +24,7 @@ namespace phpOMS;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class AutoloadException extends \RuntimeException
+final class AutoloadException extends \RuntimeException
{
/**
* Constructor.
diff --git a/Autoloader.php b/Autoloader.php
index 523385d9f..762ade0b2 100644
--- a/Autoloader.php
+++ b/Autoloader.php
@@ -24,7 +24,7 @@ spl_autoload_register('\phpOMS\Autoloader::defaultAutoloader');
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class Autoloader
+final class Autoloader
{
/**
* Base paths for autoloading
@@ -36,6 +36,17 @@ class Autoloader
__DIR__ . '/../',
__DIR__ . '/../../',
];
+
+ /**
+ * Constructor.
+ *
+ * @since 1.0.0
+ * @codeCoverageIgnore
+ */
+ private function __construct()
+ {
+
+ }
/**
* Add base path for autoloading
diff --git a/Business/Finance/Depreciation.php b/Business/Finance/Depreciation.php
index 2fbf05de3..6a7c3ecbf 100644
--- a/Business/Finance/Depreciation.php
+++ b/Business/Finance/Depreciation.php
@@ -22,7 +22,7 @@ namespace phpOMS\Business\Finance;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class Depreciation
+final class Depreciation
{
/**
* Calculate linear depretiation rate
diff --git a/Business/Finance/FinanceFormulas.php b/Business/Finance/FinanceFormulas.php
index 32c16bf62..6630eda16 100644
--- a/Business/Finance/FinanceFormulas.php
+++ b/Business/Finance/FinanceFormulas.php
@@ -28,7 +28,7 @@ use phpOMS\Math\Matrix\Exception\InvalidDimensionException;
* @SuppressWarnings(PHPMD.CamelCaseParameterName)
* @SuppressWarnings(PHPMD.CamelCaseVariableName)
*/
-class FinanceFormulas
+final class FinanceFormulas
{
/**
diff --git a/Business/Finance/Loan.php b/Business/Finance/Loan.php
index ac7c60303..c76f3cc5b 100644
--- a/Business/Finance/Loan.php
+++ b/Business/Finance/Loan.php
@@ -25,7 +25,7 @@ namespace phpOMS\Business\Finance;
* @SuppressWarnings(PHPMD.CamelCaseParameterName)
* @SuppressWarnings(PHPMD.CamelCaseVariableName)
*/
-class Loan
+final class Loan
{
/**
* Balloon Loan - Payments
diff --git a/Business/Finance/Lorenzkurve.php b/Business/Finance/Lorenzkurve.php
index ff224ed97..3d64eae7a 100644
--- a/Business/Finance/Lorenzkurve.php
+++ b/Business/Finance/Lorenzkurve.php
@@ -22,7 +22,7 @@ namespace phpOMS\Business\Finance;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class Lorenzkurve
+final class Lorenzkurve
{
/**
* Calculate Gini coefficient
diff --git a/Business/Finance/StockBonds.php b/Business/Finance/StockBonds.php
index 3ba8fba66..9ee58eb7c 100644
--- a/Business/Finance/StockBonds.php
+++ b/Business/Finance/StockBonds.php
@@ -25,7 +25,7 @@ namespace phpOMS\Business\Finance;
* @SuppressWarnings(PHPMD.CamelCaseParameterName)
* @SuppressWarnings(PHPMD.CamelCaseVariableName)
*/
-class StockBonds
+final class StockBonds
{
/**
* Bond Equivalent Yield
diff --git a/Business/Marketing/Metrics.php b/Business/Marketing/Metrics.php
index 620354de1..2480bffbc 100644
--- a/Business/Marketing/Metrics.php
+++ b/Business/Marketing/Metrics.php
@@ -24,7 +24,7 @@ namespace phpOMS\Business\Marketing;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class Metrics
+final class Metrics
{
/**
* Calculate customer retention
diff --git a/Business/Marketing/NetPromoterScore.php b/Business/Marketing/NetPromoterScore.php
index 4de8e2bbb..a18e292ca 100644
--- a/Business/Marketing/NetPromoterScore.php
+++ b/Business/Marketing/NetPromoterScore.php
@@ -25,7 +25,7 @@ namespace phpOMS\Business\Marketing;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class NetPromoterScore
+final class NetPromoterScore
{
/**
* Score values
diff --git a/Business/Programming/Metrics.php b/Business/Programming/Metrics.php
index bcd2de5bd..855b88f12 100644
--- a/Business/Programming/Metrics.php
+++ b/Business/Programming/Metrics.php
@@ -24,7 +24,7 @@ namespace phpOMS\Business\Programming;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class Metrics
+final class Metrics
{
/**
* Calculate ABC metric score
diff --git a/Business/Sales/MarketShareEstimation.php b/Business/Sales/MarketShareEstimation.php
index 232af05bd..6d60784c2 100644
--- a/Business/Sales/MarketShareEstimation.php
+++ b/Business/Sales/MarketShareEstimation.php
@@ -25,7 +25,7 @@ namespace phpOMS\Business\Sales;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class MarketShareEstimation
+final class MarketShareEstimation
{
/**
* Calculate rank (r) based on market share (m)
diff --git a/DataStorage/Cache/CachePool.php b/DataStorage/Cache/CachePool.php
index 4b2047e13..3daf22cfc 100644
--- a/DataStorage/Cache/CachePool.php
+++ b/DataStorage/Cache/CachePool.php
@@ -30,7 +30,7 @@ use phpOMS\DataStorage\Cache\Connection\NullCache;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class CachePool implements DataStoragePoolInterface
+final class CachePool implements DataStoragePoolInterface
{
/**
* MemCache instance.
diff --git a/DataStorage/Cookie/CookieJar.php b/DataStorage/Cookie/CookieJar.php
index 78ef8df4d..fd207f9e9 100644
--- a/DataStorage/Cookie/CookieJar.php
+++ b/DataStorage/Cookie/CookieJar.php
@@ -24,7 +24,7 @@ use phpOMS\DataStorage\LockException;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class CookieJar
+final class CookieJar
{
/**
* Locked.
diff --git a/DataStorage/Database/Connection/ConnectionFactory.php b/DataStorage/Database/Connection/ConnectionFactory.php
index 4950d55b3..06016d28d 100644
--- a/DataStorage/Database/Connection/ConnectionFactory.php
+++ b/DataStorage/Database/Connection/ConnectionFactory.php
@@ -24,7 +24,7 @@ use phpOMS\DataStorage\Database\DatabaseType;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class ConnectionFactory
+final class ConnectionFactory
{
/**
diff --git a/DataStorage/Database/Connection/MysqlConnection.php b/DataStorage/Database/Connection/MysqlConnection.php
index 4aefd867e..3e41ba8ab 100644
--- a/DataStorage/Database/Connection/MysqlConnection.php
+++ b/DataStorage/Database/Connection/MysqlConnection.php
@@ -31,7 +31,7 @@ use phpOMS\DataStorage\Database\Exception\InvalidConnectionConfigException;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class MysqlConnection extends ConnectionAbstract
+final class MysqlConnection extends ConnectionAbstract
{
/**
diff --git a/DataStorage/Database/Connection/NullConnection.php b/DataStorage/Database/Connection/NullConnection.php
index ff837bba2..dfeadf605 100644
--- a/DataStorage/Database/Connection/NullConnection.php
+++ b/DataStorage/Database/Connection/NullConnection.php
@@ -24,7 +24,7 @@ use phpOMS\DataStorage\Database\Exception\InvalidConnectionConfigException;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class NullConnection extends ConnectionAbstract
+final class NullConnection extends ConnectionAbstract
{
/**
diff --git a/DataStorage/Database/Connection/PostgresConnection.php b/DataStorage/Database/Connection/PostgresConnection.php
index ea26caf5c..2f65da577 100644
--- a/DataStorage/Database/Connection/PostgresConnection.php
+++ b/DataStorage/Database/Connection/PostgresConnection.php
@@ -25,7 +25,7 @@ namespace phpOMS\DataStorage\Database\Connection;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-abstract class PostgresConnection extends \Exception
+final class PostgresConnection extends \Exception
{
}
diff --git a/DataStorage/Database/Connection/SQLiteConnection.php b/DataStorage/Database/Connection/SQLiteConnection.php
index 2404b1d0e..02f1db516 100644
--- a/DataStorage/Database/Connection/SQLiteConnection.php
+++ b/DataStorage/Database/Connection/SQLiteConnection.php
@@ -29,7 +29,7 @@ use phpOMS\DataStorage\Database\Query\Grammar\SqliteGrammar;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class SqliteConnection extends ConnectionAbstract
+final class SqliteConnection extends ConnectionAbstract
{
/**
diff --git a/DataStorage/Database/Connection/SqlServerConnection.php b/DataStorage/Database/Connection/SqlServerConnection.php
index 5acda01ac..99d085825 100644
--- a/DataStorage/Database/Connection/SqlServerConnection.php
+++ b/DataStorage/Database/Connection/SqlServerConnection.php
@@ -30,7 +30,7 @@ use phpOMS\DataStorage\Database\Schema\Grammar\MysqlGrammar as MysqlSchemaGramma
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class SqlServerConnection extends ConnectionAbstract
+final class SqlServerConnection extends ConnectionAbstract
{
/**
* Object constructor.
diff --git a/DataStorage/Database/DatabasePool.php b/DataStorage/Database/DatabasePool.php
index df1fadf2a..5668f8222 100644
--- a/DataStorage/Database/DatabasePool.php
+++ b/DataStorage/Database/DatabasePool.php
@@ -29,7 +29,7 @@ use phpOMS\DataStorage\Database\Connection\NullConnection;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class DatabasePool implements DataStoragePoolInterface
+final class DatabasePool implements DataStoragePoolInterface
{
/**
diff --git a/DataStorage/Database/Exception/InvalidConnectionConfigException.php b/DataStorage/Database/Exception/InvalidConnectionConfigException.php
index 77ec24a0b..65f66ae63 100644
--- a/DataStorage/Database/Exception/InvalidConnectionConfigException.php
+++ b/DataStorage/Database/Exception/InvalidConnectionConfigException.php
@@ -22,7 +22,7 @@ namespace phpOMS\DataStorage\Database\Exception;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class InvalidConnectionConfigException extends \InvalidArgumentException
+final class InvalidConnectionConfigException extends \InvalidArgumentException
{
/**
* Constructor.
diff --git a/DataStorage/Database/Exception/InvalidDatabaseTypeException.php b/DataStorage/Database/Exception/InvalidDatabaseTypeException.php
index 010a4c7ba..e2500d4ee 100644
--- a/DataStorage/Database/Exception/InvalidDatabaseTypeException.php
+++ b/DataStorage/Database/Exception/InvalidDatabaseTypeException.php
@@ -22,7 +22,7 @@ namespace phpOMS\DataStorage\Database\Exception;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class InvalidDatabaseTypeException extends \InvalidArgumentException
+final class InvalidDatabaseTypeException extends \InvalidArgumentException
{
/**
* Constructor.
diff --git a/DataStorage/Database/Exception/InvalidMapperException.php b/DataStorage/Database/Exception/InvalidMapperException.php
index 4885c55ea..110bcd6a4 100644
--- a/DataStorage/Database/Exception/InvalidMapperException.php
+++ b/DataStorage/Database/Exception/InvalidMapperException.php
@@ -22,7 +22,7 @@ namespace phpOMS\DataStorage\Database\Exception;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class InvalidMapperException extends \RuntimeException
+final class InvalidMapperException extends \RuntimeException
{
/**
* Constructor.
diff --git a/DataStorage/Database/Query/Builder.php b/DataStorage/Database/Query/Builder.php
index 727f18bf2..4fb668335 100644
--- a/DataStorage/Database/Query/Builder.php
+++ b/DataStorage/Database/Query/Builder.php
@@ -25,7 +25,7 @@ use phpOMS\DataStorage\Database\Connection\ConnectionAbstract;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class Builder extends BuilderAbstract
+final class Builder extends BuilderAbstract
{
/**
* Is read only.
diff --git a/DataStorage/LockException.php b/DataStorage/LockException.php
index 0443463d3..61a0922b0 100644
--- a/DataStorage/LockException.php
+++ b/DataStorage/LockException.php
@@ -22,7 +22,7 @@ namespace phpOMS\DataStorage;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class LockException extends \RuntimeException
+final class LockException extends \RuntimeException
{
/**
* Constructor.
diff --git a/Dispatcher/Dispatcher.php b/Dispatcher/Dispatcher.php
index 7b883a1a0..5113b66fa 100644
--- a/Dispatcher/Dispatcher.php
+++ b/Dispatcher/Dispatcher.php
@@ -26,7 +26,7 @@ use phpOMS\System\File\PathException;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class Dispatcher
+final class Dispatcher
{
/**
diff --git a/Event/EventManager.php b/Event/EventManager.php
index c48d365ff..a3a75b201 100644
--- a/Event/EventManager.php
+++ b/Event/EventManager.php
@@ -24,7 +24,7 @@ namespace phpOMS\Event;
*
* @todo : make cachable + database storable -> can reload user defined listeners (persistent events)
*/
-class EventManager
+final class EventManager
{
/**
* Events.
diff --git a/Localization/L11nManager.php b/Localization/L11nManager.php
index b7de5cac4..4c3f7e94e 100644
--- a/Localization/L11nManager.php
+++ b/Localization/L11nManager.php
@@ -25,7 +25,7 @@ use phpOMS\Module\ModuleAbstract;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class L11nManager
+final class L11nManager
{
/**
diff --git a/Localization/Localization.php b/Localization/Localization.php
index 1fa9fc8f8..f0ad0e8fb 100644
--- a/Localization/Localization.php
+++ b/Localization/Localization.php
@@ -26,7 +26,7 @@ use phpOMS\Utils\Converter\TemperatureType;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class Localization
+final class Localization
{
/**
diff --git a/Localization/Money.php b/Localization/Money.php
index 59bddc09c..f09878f33 100644
--- a/Localization/Money.php
+++ b/Localization/Money.php
@@ -22,7 +22,7 @@ namespace phpOMS\Localization;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class Money implements \Serializable
+final class Money implements \Serializable
{
/**
diff --git a/Localization/NullLocalization.php b/Localization/NullLocalization.php
index 9868d53da..f00ac1f3d 100644
--- a/Localization/NullLocalization.php
+++ b/Localization/NullLocalization.php
@@ -22,7 +22,7 @@ namespace phpOMS\Localization;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class NullLocalization extends Localization
+final class NullLocalizations
{
}
diff --git a/Log/FileLogger.php b/Log/FileLogger.php
index ba2d3a409..10828c6da 100644
--- a/Log/FileLogger.php
+++ b/Log/FileLogger.php
@@ -27,7 +27,7 @@ use phpOMS\System\File\Local\File;
*
* @SuppressWarnings(PHPMD.Superglobals)
*/
-class FileLogger implements LoggerInterface
+final class FileLogger implements LoggerInterface
{
public const MSG_BACKTRACE = '{datetime}; {level}; {ip}; {message}; {backtrace}';
public const MSG_FULL = '{datetime}; {level}; {ip}; {line}; {version}; {os}; {path}; {message}; {file}; {backtrace}';
diff --git a/Math/Exception/ZeroDevisionException.php b/Math/Exception/ZeroDevisionException.php
index 94292f509..ed3ba5417 100644
--- a/Math/Exception/ZeroDevisionException.php
+++ b/Math/Exception/ZeroDevisionException.php
@@ -22,7 +22,7 @@ namespace phpOMS\Math\Exception;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class ZeroDevisionException extends \UnexpectedValueException
+final class ZeroDevisionException extends \UnexpectedValueException
{
/**
* Constructor.
diff --git a/Math/Functions/Fibunacci.php b/Math/Functions/Fibunacci.php
index 7990fc8c2..f40c0aff9 100644
--- a/Math/Functions/Fibunacci.php
+++ b/Math/Functions/Fibunacci.php
@@ -24,8 +24,18 @@ use phpOMS\Math\Number\Numbers;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class Fibunacci
+final class Fibunacci
{
+ /**
+ * Constructor.
+ *
+ * @since 1.0.0
+ * @codeCoverageIgnore
+ */
+ private function __construct()
+ {
+
+ }
/**
* Is fibunacci number.
diff --git a/Math/Functions/Functions.php b/Math/Functions/Functions.php
index 29d3fdb63..77f4004d0 100644
--- a/Math/Functions/Functions.php
+++ b/Math/Functions/Functions.php
@@ -22,8 +22,18 @@ namespace phpOMS\Math\Functions;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class Functions
+final class Functions
{
+ /**
+ * Constructor.
+ *
+ * @since 1.0.0
+ * @codeCoverageIgnore
+ */
+ private function __construct()
+ {
+
+ }
/**
* Calculate gammar function value.
diff --git a/Math/Functions/Gamma.php b/Math/Functions/Gamma.php
index 5e2fbc71f..f6c4d5cd7 100644
--- a/Math/Functions/Gamma.php
+++ b/Math/Functions/Gamma.php
@@ -22,8 +22,19 @@ namespace phpOMS\Math\Functions;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class Gamma
+final class Gamma
{
+ /**
+ * Constructor.
+ *
+ * @since 1.0.0
+ * @codeCoverageIgnore
+ */
+ private function __construct()
+ {
+
+ }
+
/**
* approximation values.
*
diff --git a/Math/Geometry/ConvexHull/MonotoneChain.php b/Math/Geometry/ConvexHull/MonotoneChain.php
index 0a07d6d16..7951d6368 100644
--- a/Math/Geometry/ConvexHull/MonotoneChain.php
+++ b/Math/Geometry/ConvexHull/MonotoneChain.php
@@ -26,6 +26,17 @@ namespace phpOMS\Math\Geometry\ConvexHull;
*/
final class MonotoneChain
{
+ /**
+ * Constructor.
+ *
+ * @since 1.0.0
+ * @codeCoverageIgnore
+ */
+ private function __construct()
+ {
+
+ }
+
/**
* Create convex hull
*
diff --git a/Math/Geometry/Shape/D2/Circle.php b/Math/Geometry/Shape/D2/Circle.php
index 572b18d07..535b37c34 100644
--- a/Math/Geometry/Shape/D2/Circle.php
+++ b/Math/Geometry/Shape/D2/Circle.php
@@ -22,7 +22,7 @@ namespace phpOMS\Math\Geometry\Shape\D2;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class Circle implements D2ShapeInterface
+final class Circle implements D2ShapeInterface
{
/**
diff --git a/Math/Geometry/Shape/D2/Ellipse.php b/Math/Geometry/Shape/D2/Ellipse.php
index 17d940c04..f1d417ba9 100644
--- a/Math/Geometry/Shape/D2/Ellipse.php
+++ b/Math/Geometry/Shape/D2/Ellipse.php
@@ -22,7 +22,7 @@ namespace phpOMS\Math\Geometry\Shape\D2;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class Ellipse implements D2ShapeInterface
+final class Ellipse implements D2ShapeInterface
{
/**
diff --git a/Math/Geometry/Shape/D2/Polygon.php b/Math/Geometry/Shape/D2/Polygon.php
index dd8bd5956..9e3168ae0 100644
--- a/Math/Geometry/Shape/D2/Polygon.php
+++ b/Math/Geometry/Shape/D2/Polygon.php
@@ -22,7 +22,7 @@ namespace phpOMS\Math\Geometry\Shape\D2;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class Polygon implements D2ShapeInterface
+final class Polygon implements D2ShapeInterface
{
/**
* Epsilon for float comparison.
diff --git a/Math/Geometry/Shape/D2/Quadrilateral.php b/Math/Geometry/Shape/D2/Quadrilateral.php
index ab71a4b17..280d284c7 100644
--- a/Math/Geometry/Shape/D2/Quadrilateral.php
+++ b/Math/Geometry/Shape/D2/Quadrilateral.php
@@ -13,7 +13,7 @@
declare(strict_types=1);
namespace phpOMS\Math\Geometry\Shape\D2;
-class Quadrilateral implements D2ShapeInterface
+final class Quadrilateral implements D2ShapeInterface
{
}
diff --git a/Math/Geometry/Shape/D2/Rectangle.php b/Math/Geometry/Shape/D2/Rectangle.php
index 47c3efa61..8501309d4 100644
--- a/Math/Geometry/Shape/D2/Rectangle.php
+++ b/Math/Geometry/Shape/D2/Rectangle.php
@@ -22,7 +22,7 @@ namespace phpOMS\Math\Geometry\Shape\D2;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class Rectangle implements D2ShapeInterface
+final class Rectangle implements D2ShapeInterface
{
/**
diff --git a/Math/Geometry/Shape/D2/Trapezoid.php b/Math/Geometry/Shape/D2/Trapezoid.php
index ed3f671cf..d2c91b671 100644
--- a/Math/Geometry/Shape/D2/Trapezoid.php
+++ b/Math/Geometry/Shape/D2/Trapezoid.php
@@ -22,7 +22,7 @@ namespace phpOMS\Math\Geometry\Shape\D2;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class Trapezoid implements D2ShapeInterface
+final class Trapezoid implements D2ShapeInterface
{
/**
diff --git a/Math/Geometry/Shape/D2/Triangle.php b/Math/Geometry/Shape/D2/Triangle.php
index d6fec1613..003683718 100644
--- a/Math/Geometry/Shape/D2/Triangle.php
+++ b/Math/Geometry/Shape/D2/Triangle.php
@@ -22,7 +22,7 @@ namespace phpOMS\Math\Geometry\Shape\D2;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class Triangle implements D2ShapeInterface
+final class Triangle implements D2ShapeInterface
{
/**
diff --git a/Math/Geometry/Shape/D3/Cone.php b/Math/Geometry/Shape/D3/Cone.php
index d1522a7d5..c907ec70d 100644
--- a/Math/Geometry/Shape/D3/Cone.php
+++ b/Math/Geometry/Shape/D3/Cone.php
@@ -22,7 +22,7 @@ namespace phpOMS\Math\Geometry\Shape\D3;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class Cone implements D3ShapeInterface
+final class Cone implements D3ShapeInterface
{
/**
diff --git a/Math/Geometry/Shape/D3/Cuboid.php b/Math/Geometry/Shape/D3/Cuboid.php
index 637905613..3e09eb5d4 100644
--- a/Math/Geometry/Shape/D3/Cuboid.php
+++ b/Math/Geometry/Shape/D3/Cuboid.php
@@ -22,7 +22,7 @@ namespace phpOMS\Math\Geometry\Shape\D3;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class Cuboid implements D3ShapeInterface
+final class Cuboid implements D3ShapeInterface
{
/**
diff --git a/Math/Geometry/Shape/D3/Cylinder.php b/Math/Geometry/Shape/D3/Cylinder.php
index b4f0db363..a4a9c3962 100644
--- a/Math/Geometry/Shape/D3/Cylinder.php
+++ b/Math/Geometry/Shape/D3/Cylinder.php
@@ -22,7 +22,7 @@ namespace phpOMS\Math\Geometry\Shape\D3;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class Cylinder implements D3ShapeInterface
+final class Cylinder implements D3ShapeInterface
{
/**
diff --git a/Math/Geometry/Shape/D3/Prism.php b/Math/Geometry/Shape/D3/Prism.php
index fd59da23a..f09576dc8 100644
--- a/Math/Geometry/Shape/D3/Prism.php
+++ b/Math/Geometry/Shape/D3/Prism.php
@@ -13,7 +13,7 @@
declare(strict_types=1);
namespace phpOMS\Math\Geometry\Shape\D3;
-class Prism implements D3ShapeInterface
+final class Prism implements D3ShapeInterface
{
}
diff --git a/Math/Geometry/Shape/D3/RectangularPyramid.php b/Math/Geometry/Shape/D3/RectangularPyramid.php
index 385410e88..a14f24909 100644
--- a/Math/Geometry/Shape/D3/RectangularPyramid.php
+++ b/Math/Geometry/Shape/D3/RectangularPyramid.php
@@ -22,7 +22,7 @@ namespace phpOMS\Math\Geometry\Shape\D3;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class RectangularPyramid implements D3ShapeInterface
+final class RectangularPyramid implements D3ShapeInterface
{
/**
diff --git a/Math/Geometry/Shape/D3/Sphere.php b/Math/Geometry/Shape/D3/Sphere.php
index 9516d9053..4ebab7b85 100644
--- a/Math/Geometry/Shape/D3/Sphere.php
+++ b/Math/Geometry/Shape/D3/Sphere.php
@@ -22,7 +22,7 @@ namespace phpOMS\Math\Geometry\Shape\D3;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class Sphere implements D3ShapeInterface
+final class Sphere implements D3ShapeInterface
{
/**
* Radius.
diff --git a/Math/Geometry/Shape/D3/Tetrahedron.php b/Math/Geometry/Shape/D3/Tetrahedron.php
index 2baa9e45a..70ce08e6d 100644
--- a/Math/Geometry/Shape/D3/Tetrahedron.php
+++ b/Math/Geometry/Shape/D3/Tetrahedron.php
@@ -22,7 +22,7 @@ namespace phpOMS\Math\Geometry\Shape\D3;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class Tetrahedron implements D3ShapeInterface
+final class Tetrahedron implements D3ShapeInterface
{
/**
diff --git a/Math/Matrix/CholeskyDecomposition.php b/Math/Matrix/CholeskyDecomposition.php
index 6769a7e22..e78a6e082 100644
--- a/Math/Matrix/CholeskyDecomposition.php
+++ b/Math/Matrix/CholeskyDecomposition.php
@@ -24,7 +24,7 @@ use phpOMS\Math\Matrix\Exception\InvalidDimensionException;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class CholeskyDecomposition
+final class CholeskyDecomposition
{
/**
* L matrix.
diff --git a/Math/Matrix/EigenvalueDecomposition.php b/Math/Matrix/EigenvalueDecomposition.php
index 981f746c6..12281785e 100644
--- a/Math/Matrix/EigenvalueDecomposition.php
+++ b/Math/Matrix/EigenvalueDecomposition.php
@@ -22,6 +22,6 @@ namespace phpOMS\Math\Matrix;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class EigenValueDecomposition
+final class EigenValueDecomposition
{
}
diff --git a/Math/Matrix/Exception/InvalidDimensionException.php b/Math/Matrix/Exception/InvalidDimensionException.php
index 7cb05267d..02228184a 100644
--- a/Math/Matrix/Exception/InvalidDimensionException.php
+++ b/Math/Matrix/Exception/InvalidDimensionException.php
@@ -22,7 +22,7 @@ namespace phpOMS\Math\Matrix\Exception;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class InvalidDimensionException extends \UnexpectedValueException
+final class InvalidDimensionException extends \UnexpectedValueException
{
/**
* Constructor.
diff --git a/Math/Matrix/IdentityMatrix.php b/Math/Matrix/IdentityMatrix.php
index 574ab6d8c..e593eb1a2 100644
--- a/Math/Matrix/IdentityMatrix.php
+++ b/Math/Matrix/IdentityMatrix.php
@@ -22,7 +22,7 @@ namespace phpOMS\Math\Matrix;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class IdentityMatrix extends Matrix
+final class IdentityMatrix extends Matrix
{
/**
* Constructor.
diff --git a/Math/Matrix/LUDecomposition.php b/Math/Matrix/LUDecomposition.php
index c0789f08d..575b1c20f 100644
--- a/Math/Matrix/LUDecomposition.php
+++ b/Math/Matrix/LUDecomposition.php
@@ -24,7 +24,7 @@ use phpOMS\Math\Matrix\Exception\InvalidDimensionException;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class LUDecomposition
+final class LUDecomposition
{
/**
* LU matrix.
diff --git a/Math/Matrix/QRDecomposition.php b/Math/Matrix/QRDecomposition.php
index 539755926..8677ee381 100644
--- a/Math/Matrix/QRDecomposition.php
+++ b/Math/Matrix/QRDecomposition.php
@@ -22,7 +22,7 @@ namespace phpOMS\Math\Matrix;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class QRDecomposition
+final class QRDecomposition
{
private $QR = [];
diff --git a/Math/Matrix/SingularValueDecomposition.php b/Math/Matrix/SingularValueDecomposition.php
index e47e694b5..b96a13157 100644
--- a/Math/Matrix/SingularValueDecomposition.php
+++ b/Math/Matrix/SingularValueDecomposition.php
@@ -22,6 +22,6 @@ namespace phpOMS\Math\Matrix;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class SingularValueDecomposition
+final class SingularValueDecomposition
{
}
diff --git a/Math/Matrix/Vector.php b/Math/Matrix/Vector.php
index e9b570235..d6e2fe224 100644
--- a/Math/Matrix/Vector.php
+++ b/Math/Matrix/Vector.php
@@ -22,6 +22,6 @@ namespace phpOMS\Math\Matrix;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class Vector extends Matrix
+final class Vector extends Matrix
{
}
diff --git a/Math/Number/Complex.php b/Math/Number/Complex.php
index 6852ca032..dd27625e0 100644
--- a/Math/Number/Complex.php
+++ b/Math/Number/Complex.php
@@ -22,7 +22,7 @@ namespace phpOMS\Math\Number;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class Complex
+final class Complex
{
/**
* Real part.
diff --git a/Math/Number/Integer.php b/Math/Number/Integer.php
index 9d2fc5f61..2b958e8e5 100644
--- a/Math/Number/Integer.php
+++ b/Math/Number/Integer.php
@@ -22,8 +22,19 @@ namespace phpOMS\Math\Number;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class Integer
+final class Integer
{
+ /**
+ * Constructor.
+ *
+ * @since 1.0.0
+ * @codeCoverageIgnore
+ */
+ private function __construct()
+ {
+
+ }
+
/**
* Is integer.
*
diff --git a/Math/Number/Natural.php b/Math/Number/Natural.php
index d9ea2d009..712bae656 100644
--- a/Math/Number/Natural.php
+++ b/Math/Number/Natural.php
@@ -22,8 +22,19 @@ namespace phpOMS\Math\Number;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class Natural
+final class Natural
{
+ /**
+ * Constructor.
+ *
+ * @since 1.0.0
+ * @codeCoverageIgnore
+ */
+ private function __construct()
+ {
+
+ }
+
/**
* Is natural number.
*
diff --git a/Math/Number/Numbers.php b/Math/Number/Numbers.php
index 4d88c13d9..bd18fd112 100644
--- a/Math/Number/Numbers.php
+++ b/Math/Number/Numbers.php
@@ -22,8 +22,19 @@ namespace phpOMS\Math\Number;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class Numbers
+final class Numbers
{
+ /**
+ * Constructor.
+ *
+ * @since 1.0.0
+ * @codeCoverageIgnore
+ */
+ private function __construct()
+ {
+
+ }
+
/**
* Is perfect number?
*
diff --git a/Math/Number/Prime.php b/Math/Number/Prime.php
index a1f56708a..f252d1d99 100644
--- a/Math/Number/Prime.php
+++ b/Math/Number/Prime.php
@@ -22,8 +22,19 @@ namespace phpOMS\Math\Number;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class Prime
+final class Prime
{
+ /**
+ * Constructor.
+ *
+ * @since 1.0.0
+ * @codeCoverageIgnore
+ */
+ private function __construct()
+ {
+
+ }
+
/**
* Is mersenne number?
*
diff --git a/Math/Statistic/Average.php b/Math/Statistic/Average.php
index 574c93d20..1c77a471a 100644
--- a/Math/Statistic/Average.php
+++ b/Math/Statistic/Average.php
@@ -25,7 +25,7 @@ use phpOMS\Math\Matrix\Exception\InvalidDimensionException;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class Average
+final class Average
{
public const MA3 = [1 / 3, 1 / 3];
@@ -40,6 +40,17 @@ class Average
public const MAH13 = [0.240, 0.214, 0.147, 0.66, 0, -0.028, -0.019];
public const MAH23 = [0.148, 0.138, 0.122, 0.097, 0.068, 0.039, 0.013, -0.005, -0.015, -0.016, -0.011, -0.004];
+ /**
+ * Constructor.
+ *
+ * @since 1.0.0
+ * @codeCoverageIgnore
+ */
+ private function __construct()
+ {
+
+ }
+
/**
* Average change.
*
diff --git a/Math/Statistic/Basic.php b/Math/Statistic/Basic.php
index 0729cc29c..2215a233f 100644
--- a/Math/Statistic/Basic.php
+++ b/Math/Statistic/Basic.php
@@ -22,8 +22,18 @@ namespace phpOMS\Math\Statistic;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class Basic
+final class Basic
{
+ /**
+ * Constructor.
+ *
+ * @since 1.0.0
+ * @codeCoverageIgnore
+ */
+ private function __construct()
+ {
+
+ }
/**
* Calculate frequency.
diff --git a/Math/Statistic/Correlation.php b/Math/Statistic/Correlation.php
index 4404ec949..e98f47d3f 100644
--- a/Math/Statistic/Correlation.php
+++ b/Math/Statistic/Correlation.php
@@ -22,8 +22,18 @@ namespace phpOMS\Math\Statistic;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class Correlation
+final class Correlation
{
+ /**
+ * Constructor.
+ *
+ * @since 1.0.0
+ * @codeCoverageIgnore
+ */
+ private function __construct()
+ {
+
+ }
/**
* Calculage bravais person correlation coefficient.
diff --git a/Math/Statistic/MeasureOfDispersion.php b/Math/Statistic/MeasureOfDispersion.php
index a369c67dc..d9366898c 100644
--- a/Math/Statistic/MeasureOfDispersion.php
+++ b/Math/Statistic/MeasureOfDispersion.php
@@ -25,8 +25,18 @@ use phpOMS\Math\Matrix\Exception\InvalidDimensionException;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class MeasureOfDispersion
+final class MeasureOfDispersion
{
+ /**
+ * Constructor.
+ *
+ * @since 1.0.0
+ * @codeCoverageIgnore
+ */
+ private function __construct()
+ {
+
+ }
/**
* Get range.
diff --git a/Message/Http/Header.php b/Message/Http/Header.php
index 46f6908a3..49fe50695 100644
--- a/Message/Http/Header.php
+++ b/Message/Http/Header.php
@@ -27,7 +27,7 @@ use phpOMS\DataStorage\LockException;
*
* @SuppressWarnings(PHPMD.Superglobals)
*/
-class Header extends HeaderAbstract
+final class Header extends HeaderAbstract
{
/**
diff --git a/Message/Http/Request.php b/Message/Http/Request.php
index 51dd73280..7de42d828 100644
--- a/Message/Http/Request.php
+++ b/Message/Http/Request.php
@@ -32,7 +32,7 @@ use phpOMS\Uri\UriInterface;
*
* @SuppressWarnings(PHPMD.Superglobals)
*/
-class Request extends RequestAbstract
+final class Request extends RequestAbstract
{
/**
diff --git a/Message/Http/Response.php b/Message/Http/Response.php
index 7134c987f..91bfe56b7 100644
--- a/Message/Http/Response.php
+++ b/Message/Http/Response.php
@@ -28,7 +28,7 @@ use phpOMS\Views\View;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class Response extends ResponseAbstract implements RenderableInterface
+final class Response extends ResponseAbstract implements RenderableInterface
{
/**
* Response status.
diff --git a/Message/Http/Rest.php b/Message/Http/Rest.php
index ec4d0a2b3..3bc67adea 100644
--- a/Message/Http/Rest.php
+++ b/Message/Http/Rest.php
@@ -22,7 +22,7 @@ namespace phpOMS\Message\Http;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class Rest
+final class Rest
{
/**
diff --git a/Module/Exception/InvalidModuleException.php b/Module/Exception/InvalidModuleException.php
index 36bb49ddd..8bb55a1c8 100644
--- a/Module/Exception/InvalidModuleException.php
+++ b/Module/Exception/InvalidModuleException.php
@@ -22,7 +22,7 @@ namespace phpOMS\Module\Exception;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class InvalidModuleException extends \UnexpectedValueException
+final class InvalidModuleException extends \UnexpectedValueException
{
/**
* Constructor.
diff --git a/Module/Exception/InvalidThemeException.php b/Module/Exception/InvalidThemeException.php
index f08416349..36e06c276 100644
--- a/Module/Exception/InvalidThemeException.php
+++ b/Module/Exception/InvalidThemeException.php
@@ -22,7 +22,7 @@ namespace phpOMS\Module\Exception;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class InvalidThemeException extends \UnexpectedValueException
+final class InvalidThemeException extends \UnexpectedValueException
{
/**
* Constructor.
diff --git a/Module/InfoManager.php b/Module/InfoManager.php
index 95998fc72..261e09a13 100644
--- a/Module/InfoManager.php
+++ b/Module/InfoManager.php
@@ -27,7 +27,7 @@ use phpOMS\Utils\ArrayUtils;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class InfoManager
+final class InfoManager
{
/**
diff --git a/Module/ModuleFactory.php b/Module/ModuleFactory.php
index 3a5cac6ef..9f905dd99 100644
--- a/Module/ModuleFactory.php
+++ b/Module/ModuleFactory.php
@@ -27,7 +27,7 @@ use phpOMS\ApplicationAbstract;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class ModuleFactory
+final class ModuleFactory
{
/**
diff --git a/Module/ModuleManager.php b/Module/ModuleManager.php
index debeeb334..c77d9d235 100644
--- a/Module/ModuleManager.php
+++ b/Module/ModuleManager.php
@@ -33,7 +33,7 @@ use phpOMS\Module\Exception\InvalidModuleException;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class ModuleManager
+final class ModuleManager
{
/**
diff --git a/Module/NullModule.php b/Module/NullModule.php
index 6c7790cb4..79b5841a2 100644
--- a/Module/NullModule.php
+++ b/Module/NullModule.php
@@ -22,6 +22,6 @@ namespace phpOMS\Module;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class NullModule extends ModuleAbstract
+final class NullModule extends ModuleAbstract
{
}
diff --git a/Module/PackageManager.php b/Module/PackageManager.php
index 54e8fa434..039149644 100644
--- a/Module/PackageManager.php
+++ b/Module/PackageManager.php
@@ -31,7 +31,7 @@ use phpOMS\Utils\StringUtils;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class PackageManager
+final class PackageManager
{
/**
* File path.
diff --git a/Router/Router.php b/Router/Router.php
index 2b9341237..f1afc3111 100644
--- a/Router/Router.php
+++ b/Router/Router.php
@@ -24,7 +24,7 @@ use phpOMS\Message\RequestAbstract;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class Router
+final class Router
{
/**
diff --git a/Security/PhpCode.php b/Security/PhpCode.php
index b9883c9ba..5b1fa21bf 100644
--- a/Security/PhpCode.php
+++ b/Security/PhpCode.php
@@ -22,7 +22,7 @@ namespace phpOMS\Security;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class PhpCode
+final class PhpCode
{
/**
* Disabled functions
@@ -54,6 +54,17 @@ class PhpCode
'posix_setuid', 'posix_uname', 'proc_close', 'proc_get_status',
];
+ /**
+ * Constructor.
+ *
+ * @since 1.0.0
+ * @codeCoverageIgnore
+ */
+ private function __construct()
+ {
+
+ }
+
/**
* Normalize source code for inspection
*
diff --git a/System/File/FileUtils.php b/System/File/FileUtils.php
index 8a791ad66..cf144848d 100644
--- a/System/File/FileUtils.php
+++ b/System/File/FileUtils.php
@@ -22,7 +22,7 @@ namespace phpOMS\System\File;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class FileUtils
+final class FileUtils
{
public const CODE_EXTENSION = ['cpp', 'c', 'h', 'hpp', 'cs', 'css', 'htm', 'html', 'php', 'rb'];
public const TEXT_EXTENSION = ['doc', 'docx', 'txt', 'md', 'csv'];
diff --git a/System/File/Local/Directory.php b/System/File/Local/Directory.php
index 2e0f76bf8..53cd51867 100644
--- a/System/File/Local/Directory.php
+++ b/System/File/Local/Directory.php
@@ -29,7 +29,7 @@ use phpOMS\Utils\StringUtils;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class Directory extends FileAbstract implements DirectoryInterface
+final class Directory extends FileAbstract implements DirectoryInterface
{
/**
* Directory list filter.
diff --git a/System/File/Local/File.php b/System/File/Local/File.php
index 970e2bb2c..7abd73c8c 100644
--- a/System/File/Local/File.php
+++ b/System/File/Local/File.php
@@ -29,7 +29,7 @@ use phpOMS\System\File\PathException;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class File extends FileAbstract implements FileInterface
+final class File extends FileAbstract implements FileInterface
{
/**
diff --git a/System/File/PathException.php b/System/File/PathException.php
index aa8cede2f..713f53702 100644
--- a/System/File/PathException.php
+++ b/System/File/PathException.php
@@ -22,7 +22,7 @@ namespace phpOMS\System\File;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class PathException extends \UnexpectedValueException
+final class PathException extends \UnexpectedValueException
{
/**
* Constructor.
diff --git a/System/File/PermissionException.php b/System/File/PermissionException.php
index 658532430..d5d6f1f12 100644
--- a/System/File/PermissionException.php
+++ b/System/File/PermissionException.php
@@ -22,7 +22,7 @@ namespace phpOMS\System\File;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class PermissionException extends \RuntimeException
+final class PermissionException extends \RuntimeException
{
/**
* Constructor.
diff --git a/System/OperatingSystem.php b/System/OperatingSystem.php
index 4df3e6b9d..a61229d6a 100644
--- a/System/OperatingSystem.php
+++ b/System/OperatingSystem.php
@@ -24,6 +24,17 @@ namespace phpOMS\System;
*/
final class OperatingSystem
{
+ /**
+ * Constructor.
+ *
+ * @since 1.0.0
+ * @codeCoverageIgnore
+ */
+ private function __construct()
+ {
+
+ }
+
/**
* Get OS.
*
diff --git a/System/SystemUtils.php b/System/SystemUtils.php
index 74221a201..c0383fe92 100644
--- a/System/SystemUtils.php
+++ b/System/SystemUtils.php
@@ -22,7 +22,7 @@ namespace phpOMS\System;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class SystemUtils
+final class SystemUtils
{
/**
diff --git a/Uri/Http.php b/Uri/Http.php
index 798fbbfae..d304a73ed 100644
--- a/Uri/Http.php
+++ b/Uri/Http.php
@@ -28,7 +28,7 @@ use phpOMS\Utils\StringUtils;
*
* @SuppressWarnings(PHPMD.Superglobals)
*/
-class Http implements UriInterface
+final class Http implements UriInterface
{
/**
diff --git a/Uri/UriFactory.php b/Uri/UriFactory.php
index ddfdcc3f7..cdb06cbd4 100644
--- a/Uri/UriFactory.php
+++ b/Uri/UriFactory.php
@@ -24,7 +24,7 @@ namespace phpOMS\Uri;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class UriFactory
+final class UriFactory
{
/**
diff --git a/Utils/ArrayUtils.php b/Utils/ArrayUtils.php
index f93fdfa8a..bb1eec94e 100644
--- a/Utils/ArrayUtils.php
+++ b/Utils/ArrayUtils.php
@@ -22,7 +22,7 @@ namespace phpOMS\Utils;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class ArrayUtils
+final class ArrayUtils
{
/**
diff --git a/Utils/ColorUtils.php b/Utils/ColorUtils.php
index 134c963b5..ef9b1245d 100644
--- a/Utils/ColorUtils.php
+++ b/Utils/ColorUtils.php
@@ -22,8 +22,18 @@ namespace phpOMS\Utils;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class ColorUtils
+final class ColorUtils
{
+ /**
+ * Constructor.
+ *
+ * @since 1.0.0
+ * @codeCoverageIgnore
+ */
+ private function __construct()
+ {
+
+ }
/**
* Convert int to rgb
diff --git a/Utils/ImageUtils.php b/Utils/ImageUtils.php
index 2bb38d928..d1e82b3c0 100644
--- a/Utils/ImageUtils.php
+++ b/Utils/ImageUtils.php
@@ -24,8 +24,19 @@ namespace phpOMS\Utils;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class ImageUtils
+final class ImageUtils
{
+ /**
+ * Constructor.
+ *
+ * @since 1.0.0
+ * @codeCoverageIgnore
+ */
+ private function __construct()
+ {
+
+ }
+
/**
* Decode base64 image.
*
diff --git a/Utils/JsonBuilder.php b/Utils/JsonBuilder.php
index 5d2f4d6f0..b1c0aabc9 100644
--- a/Utils/JsonBuilder.php
+++ b/Utils/JsonBuilder.php
@@ -22,7 +22,7 @@ namespace phpOMS\Utils;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class JsonBuilder implements \Serializable, \JsonSerializable
+final class JsonBuilder implements \Serializable, \JsonSerializable
{
/**
@@ -33,15 +33,6 @@ class JsonBuilder implements \Serializable, \JsonSerializable
*/
private $json = [];
- /**
- * Constructor.
- *
- * @since 1.0.0
- */
- public function __construct()
- {
- }
-
/**
* Get json data.
*
diff --git a/Utils/Permutation.php b/Utils/Permutation.php
index 87b0097f2..b49dfc1b0 100644
--- a/Utils/Permutation.php
+++ b/Utils/Permutation.php
@@ -22,8 +22,19 @@ namespace phpOMS\Utils;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class Permutation
+final class Permutation
{
+ /**
+ * Constructor.
+ *
+ * @since 1.0.0
+ * @codeCoverageIgnore
+ */
+ private function __construct()
+ {
+
+ }
+
/**
* Create all permutations.
*
diff --git a/Utils/StringCompare.php b/Utils/StringCompare.php
index 9539756ca..c2a479416 100644
--- a/Utils/StringCompare.php
+++ b/Utils/StringCompare.php
@@ -24,7 +24,7 @@ namespace phpOMS\Utils;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class StringCompare
+final class StringCompare
{
/**
* Dictionary.
diff --git a/Utils/StringUtils.php b/Utils/StringUtils.php
index b62961847..cedd86b13 100644
--- a/Utils/StringUtils.php
+++ b/Utils/StringUtils.php
@@ -26,7 +26,7 @@ namespace phpOMS\Utils;
*
* @SuppressWarnings(PHPMD.CamelCaseMethodName)
*/
-class StringUtils
+final class StringUtils
{
/**
diff --git a/Utils/TestUtils.php b/Utils/TestUtils.php
index 2c37503f5..da6d73c9d 100644
--- a/Utils/TestUtils.php
+++ b/Utils/TestUtils.php
@@ -24,8 +24,19 @@ namespace phpOMS\Utils;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class TestUtils
+final class TestUtils
{
+ /**
+ * Constructor.
+ *
+ * @since 1.0.0
+ * @codeCoverageIgnore
+ */
+ private function __construct()
+ {
+
+ }
+
/**
* Set private object member
*
diff --git a/Version/Version.php b/Version/Version.php
index 97c031384..5c828d13f 100644
--- a/Version/Version.php
+++ b/Version/Version.php
@@ -24,7 +24,7 @@ namespace phpOMS\Version;
* @link http://website.orange-management.de
* @since 1.0.0
*/
-class Version
+final class Version
{
/**
diff --git a/tests/Account/AccountTest.php b/tests/Account/AccountTest.php
index e9d081265..464f2e33a 100644
--- a/tests/Account/AccountTest.php
+++ b/tests/Account/AccountTest.php
@@ -65,7 +65,7 @@ class AccountTest extends \PHPUnit\Framework\TestCase
self::assertTrue(is_int($account->getId()));
self::assertEquals(0, $account->getId());
- self::assertInstanceOf('\phpOMS\Localization\NullLocalization', $account->getL11n());
+ self::assertInstanceOf('\phpOMS\Localization\Localization', $account->getL11n());
self::assertEquals([], $account->getGroups());
@@ -154,11 +154,8 @@ class AccountTest extends \PHPUnit\Framework\TestCase
self::assertFalse($account->hasPermission(PermissionType::READ, 1, 'a', 1, 1, 1, 1));
self::assertTrue($account->hasPermission(PermissionType::NONE));
- $account->setL11n(new NullLocalization());
- self::assertInstanceOf('\phpOMS\Localization\NullLocalization', $account->getL11n());
$account->setL11n(new Localization());
self::assertInstanceOf('\phpOMS\Localization\Localization', $account->getL11n());
- self::assertNotInstanceOf('\phpOMS\Localization\NullLocalization', $account->getL11n());
$datetime = new \DateTime('now');
$account->updateLastActive();
diff --git a/tests/Localization/NullLocalizationTest.php b/tests/Localization/NullLocalizationTest.php
deleted file mode 100644
index 47c48386c..000000000
--- a/tests/Localization/NullLocalizationTest.php
+++ /dev/null
@@ -1,27 +0,0 @@
-code code
+code code
codecodecode
\ No newline at end of file
diff --git a/tests/Utils/Parser/Markdown/data/em_strong.html b/tests/Utils/Parser/Markdown/data/em_strong.html
index 323d60aec..c2cddc0fc 100644
--- a/tests/Utils/Parser/Markdown/data/em_strong.html
+++ b/tests/Utils/Parser/Markdown/data/em_strong.html
@@ -1,7 +1,7 @@
-em strong
-em strong strong
-strong em strong
-strong em strong strong
+em strong
+em strong strong
+strong em strong
+strong em strong strong
em strong
em strong strong
strong em strong
diff --git a/tests/Utils/Parser/Markdown/data/escaping.html b/tests/Utils/Parser/Markdown/data/escaping.html
index ab1c41fdc..06b4339b0 100644
--- a/tests/Utils/Parser/Markdown/data/escaping.html
+++ b/tests/Utils/Parser/Markdown/data/escaping.html
@@ -2,5 +2,5 @@
escaped \*emphasis\* in a code span
escaped \*emphasis\* in a code block
\ ` * _ { } [ ] ( ) > # + - . !
-one_two one_two
+one_two one_two
one*two one*two
\ No newline at end of file
diff --git a/tests/Utils/Parser/Markdown/data/strong_em.html b/tests/Utils/Parser/Markdown/data/strong_em.html
index b709c9914..4ae9392bd 100644
--- a/tests/Utils/Parser/Markdown/data/strong_em.html
+++ b/tests/Utils/Parser/Markdown/data/strong_em.html
@@ -1,6 +1,6 @@
em strong em
strong em em
em strong em em
-em strong em
-strong em em
-em strong em em
\ No newline at end of file
+em strong em
+strong em em
+em strong em em
\ No newline at end of file