diff --git a/Account/Account.php b/Account/Account.php index 65cf019a8..aa0a41fc1 100644 --- a/Account/Account.php +++ b/Account/Account.php @@ -21,9 +21,9 @@ use phpOMS\Validation\Network\Email; /** * Account class. - * - * The account class is the base model for accounts. This model contains the most common account - * information. This model is not comparable to a profile which contains much more information. + * + * The account class is the base model for accounts. This model contains the most common account + * information. This model is not comparable to a profile which contains much more information. * * @package phpOMS\Account * @license OMS License 1.0 @@ -157,7 +157,7 @@ class Account implements ArrayableInterface, \JsonSerializable /** * Constructor. - * + * * The constructor automatically sets the created date as well as the last activity to now. * * @param int $id Account id @@ -186,7 +186,7 @@ class Account implements ArrayableInterface, \JsonSerializable /** * Get localization. - * + * * Every account can have a different localization which can be accessed here. * * @return Localization @@ -200,8 +200,8 @@ class Account implements ArrayableInterface, \JsonSerializable /** * Get groups. - * - * Every account can belong to multiple groups. + * + * Every account can belong to multiple groups. * These groups usually are used for permissions and categorize accounts. * * @return array Returns array of all groups @@ -215,9 +215,9 @@ class Account implements ArrayableInterface, \JsonSerializable /** * Add group. - * + * * @param mixed $group Group to add - * + * * @return void * * @since 1.0.0 @@ -243,7 +243,7 @@ class Account implements ArrayableInterface, \JsonSerializable /** * Set permissions. - * + * * The method accepts an array of permissions. All existing permissions are replaced. * * @param PermissionAbstract[] $permissions @@ -259,7 +259,7 @@ class Account implements ArrayableInterface, \JsonSerializable /** * Add permissions. - * + * * Adds permissions to the account * * @param PermissionAbstract[] $permissions Array of permissions to add to the account @@ -275,7 +275,7 @@ class Account implements ArrayableInterface, \JsonSerializable /** * Add permission. - * + * * Adds a single permission to the account * * @param PermissionAbstract $permission Permission to add to the account @@ -291,7 +291,7 @@ class Account implements ArrayableInterface, \JsonSerializable /** * Get permissions. - * + * * @return array * * @since 1.0.0 @@ -305,7 +305,7 @@ class Account implements ArrayableInterface, \JsonSerializable * Has permissions. * * Checks if the account has a permission defined - * + * * @param int $permission Permission to check * @param int $unit Unit Unit to check (null if all are acceptable) * @param string $app App App to check (null if all are acceptable) @@ -324,11 +324,11 @@ class Account implements ArrayableInterface, \JsonSerializable foreach ($this->permissions as $p) { if (($p->getUnit() === $unit || $p->getUnit() === null || !isset($unit)) - && ($p->getApp() === $app || $p->getApp() === null || !isset($app)) - && ($p->getModule() === $module || $p->getModule() === null || !isset($module)) - && ($p->getType() === $type || $p->getType() === null || !isset($type)) - && ($p->getElement() === $element || $p->getElement() === null || !isset($element)) - && ($p->getComponent() === $component || $p->getComponent() === null || !isset($component)) + && ($p->getApp() === $app || $p->getApp() === null || !isset($app)) + && ($p->getModule() === $module || $p->getModule() === null || !isset($module)) + && ($p->getType() === $type || $p->getType() === null || !isset($type)) + && ($p->getElement() === $element || $p->getElement() === null || !isset($element)) + && ($p->getComponent() === $component || $p->getComponent() === null || !isset($component)) && ($p->getPermission() | $permission) === $p->getPermission()) { return true; } @@ -445,7 +445,7 @@ class Account implements ArrayableInterface, \JsonSerializable * @param string $email Email * * @return void - * + * * @throws \InvalidArgumentException Exception is thrown if the provided string is not a valid email * * @since 1.0.0 @@ -553,7 +553,7 @@ class Account implements ArrayableInterface, \JsonSerializable * @param string $password Password * * @return void - * + * * @throws \Exception * * @since 1.0.0 @@ -628,7 +628,7 @@ class Account implements ArrayableInterface, \JsonSerializable /** * Json serialize. - * + * * @return array * * @since 1.0.0 diff --git a/Account/AccountManager.php b/Account/AccountManager.php index c7a464f4b..9b70ef8b9 100644 --- a/Account/AccountManager.php +++ b/Account/AccountManager.php @@ -19,8 +19,8 @@ use phpOMS\DataStorage\Session\SessionInterface; /** * Account manager class. - * - * The account manager is used to manage multiple accounts. + * + * The account manager is used to manage multiple accounts. * * @package phpOMS\Account * @license OMS License 1.0 diff --git a/Account/PermissionAbstract.php b/Account/PermissionAbstract.php index 1277f016e..d04f61caa 100644 --- a/Account/PermissionAbstract.php +++ b/Account/PermissionAbstract.php @@ -16,7 +16,7 @@ namespace phpOMS\Account; /** * Permission class. - * + * * This permission abstract is the basis for all permissions. Contrary to it's name it is not an * abstract class and can be used directly if needed. * @@ -342,7 +342,7 @@ class PermissionAbstract * * @since 1.0.0 */ - public function hasPermission(int $permission) : bool + public function hasPermission(int $permission) : bool { return ($this->permission | $permission) === $this->permission; } diff --git a/ApplicationAbstract.php b/ApplicationAbstract.php index 909f742f7..f83918380 100644 --- a/ApplicationAbstract.php +++ b/ApplicationAbstract.php @@ -155,7 +155,7 @@ class ApplicationAbstract * * @since 1.0.0 */ - public function __set($name, $value) + public function __set($name, $value) { if (!empty($this->$name)) { return; @@ -175,8 +175,8 @@ class ApplicationAbstract * * @since 1.0.0 */ - public function __get($name) - { - return $this->$name; + public function __get($name) + { + return $this->$name; } } diff --git a/Business/Marketing/Metrics.php b/Business/Marketing/Metrics.php index a0a269a74..f18982f09 100644 --- a/Business/Marketing/Metrics.php +++ b/Business/Marketing/Metrics.php @@ -16,7 +16,7 @@ namespace phpOMS\Business\Marketing; /** * Marketing Metrics - * + * * This class provided basic marketing metric calculations * * @package phpOMS\Business\Marketing @@ -27,9 +27,9 @@ namespace phpOMS\Business\Marketing; class Metrics { /** * Calculate customer retention - * + * * @latex r = \frac{ce - cn}{cs} - * + * * @param int $ce Customer at the end of the period * @param int $cn New customers during period * @param int $cs Customers at the start of the period diff --git a/Business/Marketing/NetPromoterScore.php b/Business/Marketing/NetPromoterScore.php index ac39aace3..5685a196a 100644 --- a/Business/Marketing/NetPromoterScore.php +++ b/Business/Marketing/NetPromoterScore.php @@ -16,8 +16,8 @@ namespace phpOMS\Business\Marketing; /** * Net Promoter Score - * - * The net promoter score is a basic evaluation of the happiness of customers. + * + * The net promoter score is a basic evaluation of the happiness of customers. * Instead of customers the NPS can also be transferred to non-customers. * * @package phpOMS\Business\Marketing diff --git a/Business/Programming/Metrics.php b/Business/Programming/Metrics.php index 298075734..f9c365690 100644 --- a/Business/Programming/Metrics.php +++ b/Business/Programming/Metrics.php @@ -16,7 +16,7 @@ namespace phpOMS\Business\Programming; /** * Programming metrics - * + * * This class provides basic programming metric calculations. * * @package phpOMS\Business\Programming diff --git a/Business/Sales/MarketShareEstimation.php b/Business/Sales/MarketShareEstimation.php index 95c040d2e..64e310778 100644 --- a/Business/Sales/MarketShareEstimation.php +++ b/Business/Sales/MarketShareEstimation.php @@ -16,8 +16,8 @@ namespace phpOMS\Business\Sales; /** * Market share calculations (Zipf function) - * - * This class can be used to calculate the market share based on a rank or vice versa + * + * This class can be used to calculate the market share based on a rank or vice versa * the rank based on a marketshare in a Zipf distributed market. * * @package phpOMS\Business\Sales @@ -45,10 +45,10 @@ class MarketShareEstimation { for ($i = 0; $i < $participants; $i++) { $sum += 1 / pow($i + 1, $modifier); } - + return (int) round(pow(1 / ($marketShare * $sum), 1 / $modifier)); } - + /** * Calculate market share (m) based on rank (r) * @@ -68,7 +68,7 @@ class MarketShareEstimation { for ($i = 0; $i < $participants; $i++) { $sum += 1 / pow($i + 1, $modifier); } - + return (1 / pow($rank, $modifier)) / $sum; } } diff --git a/DataStorage/Cache/FileCache.php b/DataStorage/Cache/FileCache.php index 6ce0ea7ed..e80265407 100644 --- a/DataStorage/Cache/FileCache.php +++ b/DataStorage/Cache/FileCache.php @@ -276,7 +276,7 @@ class FileCache implements CacheInterface if (!File::exists($path)) { return null; } - + $created = Directory::created($path)->getTimestamp(); $now = time(); @@ -300,7 +300,7 @@ class FileCache implements CacheInterface return $this->parseValue($type, $raw, $expireEnd); } - private function parseValue(int $type, string $raw, int $expireEnd) + private function parseValue(int $type, string $raw, int $expireEnd) { $value = null; diff --git a/DataStorage/Cache/MemCache.php b/DataStorage/Cache/MemCache.php index 305800410..680b2cbf9 100644 --- a/DataStorage/Cache/MemCache.php +++ b/DataStorage/Cache/MemCache.php @@ -40,7 +40,7 @@ class MemCache implements CacheInterface * @since 1.0.0 */ private $threshold = 10; - + private $status; /** diff --git a/DataStorage/Database/Connection/MysqlConnection.php b/DataStorage/Database/Connection/MysqlConnection.php index 0e834f8bc..0b3f2af92 100644 --- a/DataStorage/Database/Connection/MysqlConnection.php +++ b/DataStorage/Database/Connection/MysqlConnection.php @@ -57,7 +57,7 @@ class MysqlConnection extends ConnectionAbstract public function connect(array $dbdata = null) /* : void */ { $this->dbdata = isset($dbdata) ? $dbdata : $this->dbdata; - + if (!isset($this->dbdata['db'], $this->dbdata['host'], $this->dbdata['port'], $this->dbdata['database'], $this->dbdata['login'], $this->dbdata['password'])) { throw new InvalidConnectionConfigException(json_encode($this->dbdata)); } diff --git a/DataStorage/Database/DataMapperAbstract.php b/DataStorage/Database/DataMapperAbstract.php index b11f53c89..b00aa0a09 100644 --- a/DataStorage/Database/DataMapperAbstract.php +++ b/DataStorage/Database/DataMapperAbstract.php @@ -180,7 +180,7 @@ class DataMapperAbstract implements DataMapperInterface /** * Clone. - * + * * @return void * * @since 1.0.0 @@ -194,7 +194,7 @@ class DataMapperAbstract implements DataMapperInterface * Set database connection. * * @param ConnectionAbstract $con Database connection - * + * * @return void * * @since 1.0.0 @@ -499,7 +499,7 @@ class DataMapperAbstract implements DataMapperInterface * * @since 1.0.0 */ - private static function getObjectId($obj, \ReflectionClass $reflectionClass = null) + private static function getObjectId($obj, \ReflectionClass $reflectionClass = null) { $reflectionClass = $reflectionClass ?? new \ReflectionClass($obj); $reflectionProperty = $reflectionClass->getProperty(static::$columns[static::$primaryField]['internal']); @@ -918,8 +918,8 @@ class DataMapperAbstract implements DataMapperInterface $objsIds[$propertyName][$key] = $value; continue; - } - + } + if (!isset($relReflectionClass)) { $relReflectionClass = new \ReflectionClass($value); } @@ -1168,7 +1168,7 @@ class DataMapperAbstract implements DataMapperInterface if ($relations === RelationType::ALL) { self::updateHasMany($reflectionClass, $obj, $objId); } - + if ($update) { self::updateModel($obj, $objId, $reflectionClass); } @@ -1220,8 +1220,8 @@ class DataMapperAbstract implements DataMapperInterface $objsIds[$key] = $value; continue; - } - + } + if (!isset($relReflectionClass)) { $relReflectionClass = new \ReflectionClass($value); } @@ -1240,7 +1240,7 @@ class DataMapperAbstract implements DataMapperInterface } // todo: could be a problem, relation needs to be removed first?! - + } self::deleteRelationTable($propertyName, $objsIds, $objId); @@ -1332,7 +1332,7 @@ class DataMapperAbstract implements DataMapperInterface // todo: the order of deletion could be a problem. maybe looping through ownsOne and belongsTo first is better. // todo: support other relation types as well (belongsto, ownsone) = for better control - + foreach (static::$columns as $key => $column) { if ($relations === RelationType::ALL && isset(static::$ownsOne[$propertyName]) && $column['internal'] === $propertyName) { self::deleteOwnsOne($propertyName, $property->getValue($obj)); @@ -1378,7 +1378,7 @@ class DataMapperAbstract implements DataMapperInterface if ($relations !== RelationType::NONE) { self::deleteHasMany($reflectionClass, $obj, $objId, $relations); } - + self::deleteModel($obj, $objId, $relations, $reflectionClass); return $objId; @@ -1467,7 +1467,7 @@ class DataMapperAbstract implements DataMapperInterface * @param array[] $result Result set * @param mixed $obj Object to add the relations to * @param int $depth Relation depth - * + * * @return void * * @since 1.0.0 @@ -1526,7 +1526,7 @@ class DataMapperAbstract implements DataMapperInterface * * @param mixed $obj Object to add the relations to * @param int $depth Relation depth - * + * * @return void * * @todo accept reflection class as parameter @@ -1549,11 +1549,11 @@ class DataMapperAbstract implements DataMapperInterface /** @var string $mapper */ $mapper = static::$hasOne[$member]['mapper']; $id = $reflectionProperty->getValue($obj); - + if (self::isNullObject($id)) { continue; } - + $id = is_object($id) ? self::getObjectId($id) : $id; $value = self::getInitialized($mapper, $id) ?? $mapper::get($id, RelationType::ALL, null, $depth); @@ -1658,7 +1658,7 @@ class DataMapperAbstract implements DataMapperInterface * * @param mixed $obj Object to add the relations to * @param int $depth Relation depth - * + * * @return void * * @todo accept reflection class as parameter @@ -1736,7 +1736,7 @@ class DataMapperAbstract implements DataMapperInterface $reflectionClass = new \ReflectionClass($obj); foreach ($result as $column => $value) { - if (!isset(static::$columns[$column]['internal']) /* && $reflectionClass->hasProperty(static::$columns[$column]['internal']) */) { + if (!isset(static::$columns[$column]['internal']) /* && $reflectionClass->hasProperty(static::$columns[$column]['internal']) */) { continue; } @@ -1815,7 +1815,7 @@ class DataMapperAbstract implements DataMapperInterface * @param int $depth Relation depth * * @return mixed - * + * * @todo: implement language * * @since 1.0.0 @@ -2578,7 +2578,7 @@ class DataMapperAbstract implements DataMapperInterface * * @since 1.0.0 */ - private static function getInitialized(string $mapper, $id) + private static function getInitialized(string $mapper, $id) { return self::$initObjects[$mapper][$id] ?? null; } @@ -2631,7 +2631,7 @@ class DataMapperAbstract implements DataMapperInterface $sth = self::$db->con->prepare($query->toSql()); $sth->execute(); - + $results = $sth->fetchAll(\PDO::FETCH_ASSOC); return count($results) === 0; @@ -2643,7 +2643,7 @@ class DataMapperAbstract implements DataMapperInterface * @param string $name member name * * @return string - * + * * @throws \Exception Throws this exception if the member couldn't be found * * @since 1.0.0 @@ -2665,7 +2665,7 @@ class DataMapperAbstract implements DataMapperInterface * @param object $obj Object to check * * @return bool - * + * * @since 1.0.0 */ private static function isNullObject($obj) : bool diff --git a/DataStorage/Database/GrammarAbstract.php b/DataStorage/Database/GrammarAbstract.php index 7317f2797..7e34fe522 100644 --- a/DataStorage/Database/GrammarAbstract.php +++ b/DataStorage/Database/GrammarAbstract.php @@ -234,7 +234,7 @@ abstract class GrammarAbstract { // todo: this is a bad way to handle select count(*) which doesn't need a prefix. Maybe remove prefixes in total? $identifier = $this->systemIdentifier; - + foreach ($this->specialKeywords as $keyword) { if (strrpos($system, $keyword, -strlen($system)) !== false) { $prefix = ''; diff --git a/DataStorage/Database/Query/Builder.php b/DataStorage/Database/Query/Builder.php index 1f3a27305..5b62dd355 100644 --- a/DataStorage/Database/Query/Builder.php +++ b/DataStorage/Database/Query/Builder.php @@ -377,7 +377,7 @@ class Builder extends BuilderAbstract $test = strtolower($raw); - if (strpos($test, 'insert') !== false + if (strpos($test, 'insert') !== false || strpos($test, 'update') !== false || strpos($test, 'drop') !== false || strpos($test, 'delete') !== false @@ -1120,18 +1120,18 @@ class Builder extends BuilderAbstract public function execute() { $sth = $this->connection->con->prepare($this->toSql()); - + foreach ($this->binds as $key => $bind) { $type = self::getBindParamType($bind); - + $sth->bindParam($key, $bind, $type); } - + $sth->execute(); return $sth; } - + /** * Get bind parameter type. * @@ -1150,7 +1150,7 @@ class Builder extends BuilderAbstract } elseif (is_string($value) || is_float($value)) { return \PDO::PARAM_STR; } - + throw new \Exception(); } diff --git a/DataStorage/Database/Query/Grammar/Grammar.php b/DataStorage/Database/Query/Grammar/Grammar.php index 2f860c841..0af67e3a9 100644 --- a/DataStorage/Database/Query/Grammar/Grammar.php +++ b/DataStorage/Database/Query/Grammar/Grammar.php @@ -118,7 +118,7 @@ class Grammar extends GrammarAbstract } $components = $this->getComponents($query->getType()); - + /* Loop all possible query components and if they exist compile them. */ foreach ($components as $component) { if (isset($query->{$component}) && !empty($query->{$component})) { @@ -192,7 +192,7 @@ class Grammar extends GrammarAbstract protected function compileUpdates(Builder $query, array $table) : string { $expression = $this->expressionizeTable($table, $query->getPrefix()); - + if ($expression === '') { return ''; } diff --git a/DataStorage/Session/HttpSession.php b/DataStorage/Session/HttpSession.php index baf6aa352..87b61ae5b 100644 --- a/DataStorage/Session/HttpSession.php +++ b/DataStorage/Session/HttpSession.php @@ -52,7 +52,7 @@ class HttpSession implements SessionInterface * @since 1.0.0 */ private $sid = null; - + /** * Inactivity Interval. * @@ -85,23 +85,23 @@ class HttpSession implements SessionInterface if (!is_bool($sid)) { session_id($sid); } - + $this->inactivityInterval = $inactivityInterval; if (session_status() !== PHP_SESSION_ACTIVE && !headers_sent()) { session_set_cookie_params($liftetime, '/', '', false, true); session_start(); } - + if ($this->inactivityInterval > 0 && ($this->inactivityInterval + ($_SESSION['lastActivity'] ?? 0) < time())) { $this->destroy(); } - + $this->sessionData = $_SESSION; $_SESSION = null; $this->sessionData['lastActivity'] = time(); $this->sid = session_id(); - + $this->setCsrfProtection(); } @@ -204,7 +204,7 @@ class HttpSession implements SessionInterface { $this->sid = $sid; } - + /** * Destroy the current session. * diff --git a/DataStorage/Session/SessionInterface.php b/DataStorage/Session/SessionInterface.php index 6058e6af5..a7e5c4538 100644 --- a/DataStorage/Session/SessionInterface.php +++ b/DataStorage/Session/SessionInterface.php @@ -91,7 +91,7 @@ interface SessionInterface /** * Lock session from further adjustments. - * + * * @return void * * @since 1.0.0 diff --git a/DataStorage/Web/Builder.php b/DataStorage/Web/Builder.php index 5005df1be..9644e1f91 100644 --- a/DataStorage/Web/Builder.php +++ b/DataStorage/Web/Builder.php @@ -33,7 +33,7 @@ class Builder extends DatabaseQueryBuilder { $finder = []; $l11n = new Localization(); - + foreach ($this->from as $from) { $doc = new \DOMDocument(); $doc->loadHTML(Rest::request($l11n, new Http($from))); @@ -42,12 +42,12 @@ class Builder extends DatabaseQueryBuilder return $finder; } - + public function get(string $xpath) { $nodes = $finder->query($xpath); } - + public function execute() { $finder = $this->download(); @@ -92,7 +92,7 @@ class Builder extends DatabaseQueryBuilder foreach ($children as $child) { $table[] = $child->asXML(); } - + return $table; } diff --git a/Localization/L11nManager.php b/Localization/L11nManager.php index dbf6b6e32..70d8bc063 100644 --- a/Localization/L11nManager.php +++ b/Localization/L11nManager.php @@ -131,7 +131,7 @@ class L11nManager } elseif (isset($this->language[$language], $this->language[$language][$module])) { return $this->language[$language][$module]; } - + return []; } diff --git a/Localization/Localization.php b/Localization/Localization.php index 7f81c9e67..48ef739d6 100644 --- a/Localization/Localization.php +++ b/Localization/Localization.php @@ -219,7 +219,7 @@ class Localization public function setLanguage(string $language) /* : void */ { $language = strtolower($language); - + if (!ISO639x1Enum::isValidValue($language)) { throw new InvalidEnumValue($language); } diff --git a/Localization/Money.php b/Localization/Money.php index f1790cf1b..ccdf35dd3 100644 --- a/Localization/Money.php +++ b/Localization/Money.php @@ -208,7 +208,7 @@ class Money implements \Serializable $this->value += $value; } elseif ($value instanceof Money) { $this->value += $value->getInt(); - } + } return $this; } @@ -242,7 +242,7 @@ class Money implements \Serializable $this->value -= $value; } elseif ($value instanceof Money) { $this->value -= $value->getInt(); - } + } return $this; } diff --git a/Math/Geometry/Shape/D2/Polygon.php b/Math/Geometry/Shape/D2/Polygon.php index 3d6fea327..2d0e6df39 100644 --- a/Math/Geometry/Shape/D2/Polygon.php +++ b/Math/Geometry/Shape/D2/Polygon.php @@ -79,7 +79,7 @@ class Polygon implements D2ShapeInterface * @param array $polygon Polygon definition * * @return int -1 inside polygon 0 on vertice 1 outside - * + * * @link http://erich.realtimerendering.com/ptinpoly/ * @since 1.0.0 */ diff --git a/Math/Matrix/CholeskyDecomposition.php b/Math/Matrix/CholeskyDecomposition.php index 951f25f04..0cafb3410 100644 --- a/Math/Matrix/CholeskyDecomposition.php +++ b/Math/Matrix/CholeskyDecomposition.php @@ -88,18 +88,18 @@ class CholeskyDecomposition for ($i = 0; $i < $k ; $i++) { $X[$k][$j] -= $X[$i][$j] * $this->L[$k][$i]; } - + $X[$k][$j] /= $this->L[$k][$k]; } } - + // Solve L'*X = Y; for ($k = $this->m - 1; $k >= 0; $k--) { for ($j = 0; $j < $n; $j++) { for ($i = $k + 1; $i < $this->m ; $i++) { $X[$k][$j] -= $X[$i][$j] * $this->L[$i][$k]; } - + $X[$k][$j] /= $this->L[$k][$k]; } } diff --git a/Math/Matrix/LUDecomposition.php b/Math/Matrix/LUDecomposition.php index eadd0d31a..7b80a0848 100644 --- a/Math/Matrix/LUDecomposition.php +++ b/Math/Matrix/LUDecomposition.php @@ -97,7 +97,7 @@ class LUDecomposition } } } - + $matrix = new Matrix(); $matrix->setMatrix($L); @@ -117,7 +117,7 @@ class LUDecomposition } } } - + $matrix = new Matrix(); $matrix->setMatrix($U); @@ -136,11 +136,11 @@ class LUDecomposition return false; } } - + return true; } - public function det() + public function det() { $d = $this->pivSign; for ($j = 0; $j < $this->n; ++$j) { diff --git a/Math/Matrix/Matrix.php b/Math/Matrix/Matrix.php index 9e3a88dea..059db14ea 100644 --- a/Math/Matrix/Matrix.php +++ b/Math/Matrix/Matrix.php @@ -173,7 +173,7 @@ class Matrix implements \ArrayAccess, \Iterator * * @param array $matrix Matrix * - * @return Matrix + * @return Matrix * * @throws \Exception * @@ -566,7 +566,7 @@ class Matrix implements \ArrayAccess, \Iterator return $M->solve($B); } - private function gaussElimination($b) : Matrix + private function gaussElimination($b) : Matrix { $mDim = count($b); $matrix = $this->matrix; @@ -583,17 +583,17 @@ class Matrix implements \ArrayAccess, \Iterator $max = $temp; } } - + if ($col != $j) { $temp = $matrix[$col]; $matrix[$col] = $matrix[$j]; $matrix[$j] = $temp; - + $temp = $b[$col]; $b[$col] = $b[$j]; $b[$j] = $temp; } - + for ($i = $col + 1; $i < $mDim; $i++) { $temp = $matrix[$i][$col] / $matrix[$col][$col]; diff --git a/Math/Matrix/QRDecomposition.php b/Math/Matrix/QRDecomposition.php index 8fcb1d319..d7c08bf60 100644 --- a/Math/Matrix/QRDecomposition.php +++ b/Math/Matrix/QRDecomposition.php @@ -29,7 +29,7 @@ class QRDecomposition $this->QR = $M->toArray(); $this->m = $M->getRowDimension(); $this->n = $M->getColumnDimension(); - + // Main loop. for ($k = 0; $k < $this->n; ++$k) { // Compute 2-norm of k-th column without under/overflow. @@ -37,17 +37,17 @@ class QRDecomposition for ($i = $k; $i < $this->m; ++$i) { $nrm = hypo($nrm, $this->QR[$i][$k]); } - + if ($nrm != 0.0) { // Form k-th Householder vector. if ($this->QR[$k][$k] < 0) { $nrm = -$nrm; } - + for ($i = $k; $i < $this->m; ++$i) { $this->QR[$i][$k] /= $nrm; } - + $this->QR[$k][$k] += 1.0; // Apply transformation to remaining columns. for ($j = $k + 1; $j < $this->n; ++$j) { @@ -55,14 +55,14 @@ class QRDecomposition for ($i = $k; $i < $this->m; ++$i) { $s += $this->QR[$i][$k] * $this->QR[$i][$j]; } - + $s = -$s / $this->QR[$k][$k]; for ($i = $k; $i < $this->m; ++$i) { $this->QR[$i][$j] += $s * $this->QR[$i][$k]; } } } - + $this->Rdiag[$k] = -$nrm; } } @@ -74,7 +74,7 @@ class QRDecomposition return false; } } - + return true; } @@ -91,7 +91,7 @@ class QRDecomposition } } } - + $matrix = new Matrix(); $matrix->setArray($H); @@ -113,7 +113,7 @@ class QRDecomposition } } } - + $matrix = new Matrix(); $matrix->setArray($R); @@ -128,7 +128,7 @@ class QRDecomposition for ($i = 0; $i < $this->m; ++$i) { $Q[$i][$k] = 0.0; } - + $Q[$k][$k] = 1.0; for ($j = $k; $j < $this->n; ++$j) { if ($this->QR[$k][$k] != 0) { @@ -143,7 +143,7 @@ class QRDecomposition } } } - + $matrix = new Matrix(); $matrix->setArray($Q); diff --git a/Math/Stochastic/NaiveBayesFilter.php b/Math/Stochastic/NaiveBayesFilter.php index c968c45b8..01a91e1ce 100644 --- a/Math/Stochastic/NaiveBayesFilter.php +++ b/Math/Stochastic/NaiveBayesFilter.php @@ -23,19 +23,19 @@ namespace phpOMS\Math\Stochastic; class NaiveBayesFilter { private $dict = []; - + public function __construct() { } - + public function trainMatch($matched) /* : void */ { } - + public function trainMismatch($mismatch) /* : void */ { } - + public function match($toMatch) : float { $normalizedDict = $this->normalizeDictionary(); @@ -46,10 +46,10 @@ class NaiveBayesFilter $n += log(1 - $normalizedDict[$element]['match'] / $normalizedDict[$element]['total']) - log($normalizedDict[$element]['match'] / $normalizedDict[$element]['total']); } } - + return 1 / (1 + exp($n)); } - + private function normalizeDictionary() : array { return $this->dict; diff --git a/Message/HeaderAbstract.php b/Message/HeaderAbstract.php index e59c5c8f6..cbeb60797 100644 --- a/Message/HeaderAbstract.php +++ b/Message/HeaderAbstract.php @@ -33,7 +33,7 @@ abstract class HeaderAbstract * @since 1.0.0 */ protected static $isLocked = false; - + /** * Localization. * @@ -41,7 +41,7 @@ abstract class HeaderAbstract * @since 1.0.0 */ protected $l11n = null; - + /** * Account. * @@ -49,7 +49,7 @@ abstract class HeaderAbstract * @since 1.0.0 */ protected $account = 0; - + /** * Response status. * @@ -67,7 +67,7 @@ abstract class HeaderAbstract { $this->l11n = new Localization(); } - + /** * Set header locked. * @@ -78,7 +78,7 @@ abstract class HeaderAbstract // todo: maybe pass session as member and make lock not static self::$isLocked = true; } - + /** * Is header locked? * @@ -107,7 +107,7 @@ abstract class HeaderAbstract * Set localization * * @param Localization $l11n Localization - * + * * @return void * * @since 1.0.0 @@ -133,7 +133,7 @@ abstract class HeaderAbstract * Set account id * * @param int $account Account id - * + * * @return void * * @since 1.0.0 @@ -142,12 +142,12 @@ abstract class HeaderAbstract { $this->account = $account; } - + /** * Set status code * * @param int $status Status code - * + * * @return void * * @since 1.0.0 diff --git a/Message/Http/Header.php b/Message/Http/Header.php index c0b02bf04..76e4721fd 100644 --- a/Message/Http/Header.php +++ b/Message/Http/Header.php @@ -89,7 +89,7 @@ class Header extends HeaderAbstract return true; } - + /** * Is security header. * @@ -129,7 +129,7 @@ class Header extends HeaderAbstract if ($this->status === 0) { $this->status = (int) \http_response_code(); } - + return parent::getStatusCode(); } @@ -146,12 +146,12 @@ class Header extends HeaderAbstract return getallheaders(); } - $headers = []; - foreach ($_SERVER as $name => $value) { - if (substr($name, 0, 5) == 'HTTP_') { - $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value; - } - } + $headers = []; + foreach ($_SERVER as $name => $value) { + if (substr($name, 0, 5) == 'HTTP_') { + $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value; + } + } return $headers; } diff --git a/Message/Http/Request.php b/Message/Http/Request.php index da640215f..238d301da 100644 --- a/Message/Http/Request.php +++ b/Message/Http/Request.php @@ -226,7 +226,7 @@ class Request extends RequestAbstract { $this->hash = []; $pathArray = $this->uri->getPathElements(); - + foreach ($pathArray as $key => $path) { $paths = []; for ($i = $start; $i < $key + 1; $i++) { @@ -285,7 +285,7 @@ class Request extends RequestAbstract foreach ($arr as $key => $val) { if (stripos($httpUserAgent, $val)) { $this->browser = $val; - + return $this->browser; } } @@ -320,11 +320,11 @@ class Request extends RequestAbstract if (!isset($this->os)) { $arr = OSType::getConstants(); $httpUserAgent = strtolower($_SERVER['HTTP_USER_AGENT']); - + foreach ($arr as $key => $val) { if (stripos($httpUserAgent, $val)) { $this->os = $val; - + return $this->os; } } diff --git a/Message/Http/Response.php b/Message/Http/Response.php index 0a28e825e..cff1f4477 100644 --- a/Message/Http/Response.php +++ b/Message/Http/Response.php @@ -140,7 +140,7 @@ class Response extends ResponseAbstract implements RenderableInterface } $types = $this->header->get('Content-Type'); - + if (stripos($types[0], MimeType::M_HTML) !== false) { return trim(preg_replace('/(\s{2,}|\n|\t)(?![^<>]*<\/pre>)/', ' ', $render)); } diff --git a/Message/Mail/EmailAbstract.php b/Message/Mail/EmailAbstract.php index c4fbd1e37..5d596b181 100644 --- a/Message/Mail/EmailAbstract.php +++ b/Message/Mail/EmailAbstract.php @@ -136,7 +136,7 @@ class EmailAbstract * * @param string $user Username * @param string $pass Password - * + * * @return void * * @since 1.0.0 @@ -408,7 +408,7 @@ class EmailAbstract /** * Create mailbox - * + * * @param string $mailbox Mailbox to create * * @return bool @@ -422,7 +422,7 @@ class EmailAbstract /** * Rename mailbox - * + * * @param string $old Old mailbox name * @param string $new New mailbox name * @@ -437,7 +437,7 @@ class EmailAbstract /** * Delete mailbox - * + * * @param string $mailbox Mailbox to delete * * @return bool @@ -451,7 +451,7 @@ class EmailAbstract /** * Check message to delete - * + * * @param int $id Message id * * @return bool @@ -465,7 +465,7 @@ class EmailAbstract /** * Delete all marked messages - * + * * @return bool * * @since 1.0.0 @@ -477,7 +477,7 @@ class EmailAbstract /** * Check message to delete - * + * * @param int $length Amount of message overview * @param int $start Start index of the overview for pagination * @@ -497,7 +497,7 @@ class EmailAbstract /** * Count messages - * + * * @return int * * @since 1.0.0 @@ -509,7 +509,7 @@ class EmailAbstract /** * Get message header - * + * * @param int $id Message id * * @return string diff --git a/Message/Mail/Imap.php b/Message/Mail/Imap.php index 80d477709..73c351196 100644 --- a/Message/Mail/Imap.php +++ b/Message/Mail/Imap.php @@ -44,7 +44,7 @@ class Imap extends EmailAbstract * * @param string $user Username * @param string $pass Password - * + * * @return void * * @since 1.0.0 diff --git a/Message/Mail/Nntp.php b/Message/Mail/Nntp.php index 0007bfb2a..86d7dc32a 100644 --- a/Message/Mail/Nntp.php +++ b/Message/Mail/Nntp.php @@ -44,7 +44,7 @@ class Nntp extends EmailAbstract * * @param string $user Username * @param string $pass Password - * + * * @return void * * @since 1.0.0 diff --git a/Message/Mail/Pop3.php b/Message/Mail/Pop3.php index bf876f315..c9b87dac4 100644 --- a/Message/Mail/Pop3.php +++ b/Message/Mail/Pop3.php @@ -44,7 +44,7 @@ class Pop3 extends EmailAbstract * * @param string $user Username * @param string $pass Password - * + * * @return void * * @since 1.0.0 diff --git a/Message/RequestAbstract.php b/Message/RequestAbstract.php index 529c552aa..149ea4b55 100644 --- a/Message/RequestAbstract.php +++ b/Message/RequestAbstract.php @@ -201,7 +201,7 @@ abstract class RequestAbstract implements MessageInterface * Get data. * * @param mixed $key Data key - * + * * @return mixed * * @since 1.0.0 @@ -221,7 +221,7 @@ abstract class RequestAbstract implements MessageInterface * Check if has data. * * @param mixed $key Data key - * + * * @return bool * * @since 1.0.0 diff --git a/Module/ModuleManager.php b/Module/ModuleManager.php index f7b42a98e..8f68e05ff 100644 --- a/Module/ModuleManager.php +++ b/Module/ModuleManager.php @@ -147,7 +147,7 @@ class ModuleManager $i = 1; $c = count($uriHash); - + for ($k = 0; $k < $c; $k++) { $uriPdo .= ':pid' . $i . ','; $i++; @@ -182,7 +182,7 @@ class ModuleManager /** * Get all installed modules that are active (not just on this uri). - * + * * @param bool $useCache Use Cache or load new * * @return array @@ -253,7 +253,7 @@ class ModuleManager /** * Get all installed modules. - * + * * @param bool $useCache Use Cache * * @return array diff --git a/Module/PackageManager.php b/Module/PackageManager.php index 9973430c4..6f15292ee 100644 --- a/Module/PackageManager.php +++ b/Module/PackageManager.php @@ -23,7 +23,7 @@ use phpOMS\Utils\StringUtils; /** * Package Manager model. - * + * * The package manager is responsible for handling installation and update packages for modules, frameworks and resources. * * @package Framework @@ -67,13 +67,13 @@ class PackageManager /** * Constructor. - * + * * @param string $path Package source path e.g. path after download. * @param string $basePath Path of the application * * @since 1.0.0 */ - public function __construct(string $path, string $basePath) + public function __construct(string $path, string $basePath) { $this->path = $path; $this->basePath = $basePath; @@ -81,11 +81,11 @@ class PackageManager /** * Extract package to temporary destination - * + * * @param string $path Temporary extract path - * + * * @return void - * + * * @since 1.0.0 */ public function extract(string $path) /* : void */ @@ -114,7 +114,7 @@ class PackageManager /** * Validate package integrity - * + * * @return bool Returns true if the package is authentic, false otherwise * * @since 1.0.0 @@ -126,7 +126,7 @@ class PackageManager /** * Hash array of files - * + * * @return string Hash value of files * * @since 1.0.0 @@ -138,7 +138,7 @@ class PackageManager foreach ($files as $file) { if ($file === 'package.cert') { - continue; + continue; } \sodium_crypto_generichash_update($state, file_get_contents($this->extractPath . '/package/' . $file)); @@ -149,7 +149,7 @@ class PackageManager /** * Install package - * + * * @return void * * @throws \Exception @@ -173,7 +173,7 @@ class PackageManager * Move files * * @param mixed $components Component data - * + * * @return void * * @since 1.0.0 @@ -189,7 +189,7 @@ class PackageManager * Copy files * * @param mixed $components Component data - * + * * @return void * * @since 1.0.0 @@ -209,7 +209,7 @@ class PackageManager * Delete files * * @param mixed $components Component data - * + * * @return void * * @since 1.0.0 @@ -225,12 +225,12 @@ class PackageManager * Execute commands * * @param mixed $components Component data - * + * * @return void * * @since 1.0.0 */ - private function execute($components) + private function execute($components) { foreach ($components as $component) { include $this->basePath . '/' . $component; @@ -239,12 +239,12 @@ class PackageManager /** * Cleanup after installation - * + * * @return void * * @since 1.0.0 */ - public function cleanup() + public function cleanup() { File::delete($this->path); Directory::delete($this->extractPath); @@ -255,7 +255,7 @@ class PackageManager * * @param string $signedHash Hash to authenticate * @param string $rawHash Hash to compare against - * + * * @return bool * * @since 1.0.0 diff --git a/Security/PhpCode.php b/Security/PhpCode.php index e3984244f..a0d2c114d 100644 --- a/Security/PhpCode.php +++ b/Security/PhpCode.php @@ -25,12 +25,12 @@ namespace phpOMS\Security; class PhpCode { public static $deprecatedFunctions = [ - 'apache_child_terminate', 'apache_setenv', 'define_syslog_variables', 'escapeshellarg', 'escapeshellcmd', 'eval', - 'exec', 'fp', 'fput', 'ftp_connect', 'ftp_exec', 'ftp_get', 'ftp_login', 'ftp_nb_fput', 'ftp_put', 'ftp_raw', - 'ftp_rawlist', 'highlight_file', 'ini_alter', 'ini_get_all', 'ini_restore', 'inject_code', 'mysql_pconnect', - 'openlog', 'passthru', 'php_uname', 'phpAds_remoteInfo', 'phpAds_XmlRpc', 'phpAds_xmlrpcDecode', - 'phpAds_xmlrpcEncode', 'popen', 'posix_getpwuid', 'posix_kill', 'posix_mkfifo', 'posix_setpgid', 'posix_setsid', - 'posix_setuid', 'posix_uname', 'proc_close', 'proc_get_status', + 'apache_child_terminate', 'apache_setenv', 'define_syslog_variables', 'escapeshellarg', 'escapeshellcmd', 'eval', + 'exec', 'fp', 'fput', 'ftp_connect', 'ftp_exec', 'ftp_get', 'ftp_login', 'ftp_nb_fput', 'ftp_put', 'ftp_raw', + 'ftp_rawlist', 'highlight_file', 'ini_alter', 'ini_get_all', 'ini_restore', 'inject_code', 'mysql_pconnect', + 'openlog', 'passthru', 'php_uname', 'phpAds_remoteInfo', 'phpAds_XmlRpc', 'phpAds_xmlrpcDecode', + 'phpAds_xmlrpcEncode', 'popen', 'posix_getpwuid', 'posix_kill', 'posix_mkfifo', 'posix_setpgid', 'posix_setsid', + 'posix_setuid', 'posix_uname', 'proc_close', 'proc_get_status', ]; private static function normalizeSource(string $source) : string @@ -43,7 +43,7 @@ class PhpCode return (bool) preg_match('/[^\x20-\x7f]/', $source) || !mb_check_encoding($source, 'ASCII'); } - public static function isDisabled(array $functions) : bool + public static function isDisabled(array $functions) : bool { $disabled = ini_get('disable_functions'); $disabled = str_replace(' ', '', $disabled); diff --git a/Stdlib/Base/SmartDateTime.php b/Stdlib/Base/SmartDateTime.php index 5db623d61..c3697d427 100644 --- a/Stdlib/Base/SmartDateTime.php +++ b/Stdlib/Base/SmartDateTime.php @@ -51,7 +51,7 @@ class SmartDateTime extends \DateTime { parent::__construct($time, $timezone); } - + /** * Create object from DateTime * @@ -230,7 +230,7 @@ class SmartDateTime extends \DateTime { return (int) date('w', strtotime($d . '-' . $m . '-' . $y)); } - + /** * Get day of week * @@ -255,10 +255,10 @@ class SmartDateTime extends \DateTime public function getMonthCalendar(int $weekStartsWith = 0) : array { $days = []; - + // get day of first day in month $firstDay = $this->getFirstDayOfMonth(); - + // calculate difference to $weekStartsWith $diffToWeekStart = Functions::mod($firstDay - $weekStartsWith, 7); $diffToWeekStart = $diffToWeekStart === 0 ? 7 : $diffToWeekStart; @@ -266,18 +266,18 @@ class SmartDateTime extends \DateTime // get days of previous month $previousMonth = $this->createModify(0, -1); $daysPreviousMonth = $previousMonth->getDaysOfMonth(); - + // add difference to $weekStartsWith counting backwards from days of previous month (reorder so that lowest value first) for ($i = $daysPreviousMonth - $diffToWeekStart; $i < $daysPreviousMonth; $i++) { $days[] = new \DateTime($previousMonth->format('Y') . '-' . $previousMonth->format('m') . '-' . ($i + 1)); } - + // add normal count of current days $daysMonth = $this->getDaysOfMonth(); for ($i = 1; $i <= $daysMonth; $i++) { $days[] = new \DateTime($this->format('Y') . '-' . $this->format('m') . '-' . ($i)); } - + // add remaining days to next month (7*6 - difference+count of current month) $remainingDays = 42 - $diffToWeekStart - $daysMonth; $nextMonth = $this->createModify(0, 1); diff --git a/Stdlib/Graph/BinaryTree.php b/Stdlib/Graph/BinaryTree.php index bc5cf1b40..4fa99ea53 100644 --- a/Stdlib/Graph/BinaryTree.php +++ b/Stdlib/Graph/BinaryTree.php @@ -36,7 +36,7 @@ class BinaryTree extends Tree $list->setLeft($list->invert($list->nodes[1])); $list->setRight($list->invert($left)); - return $list; + return $list; } /** @@ -125,7 +125,7 @@ class BinaryTree extends Tree * * @since 1.0.0 */ - public function inOrder(Node $node, \Closure $callback) + public function inOrder(Node $node, \Closure $callback) { $this->inOrder($this->getLeft($node), $callback); $callback($node); @@ -141,7 +141,7 @@ class BinaryTree extends Tree * * @since 1.0.0 */ - private function getVerticalOrder(Node $node, int $horizontalDistance = 0, array &$order) + private function getVerticalOrder(Node $node, int $horizontalDistance = 0, array &$order) { if (!isset($order[$horizontalDistance])) { $order[$horizontalDistance] = []; @@ -190,7 +190,7 @@ class BinaryTree extends Tree * * @since 1.0.0 */ - public function isSymmetric(Node $node1 = null, Node $node2 = null) : bool + public function isSymmetric(Node $node1 = null, Node $node2 = null) : bool { if (!isset($node1) && !isset($node2)) { return true; diff --git a/Stdlib/Graph/Edge.php b/Stdlib/Graph/Edge.php index acfec355d..8b56b4537 100644 --- a/Stdlib/Graph/Edge.php +++ b/Stdlib/Graph/Edge.php @@ -30,14 +30,14 @@ class Edge private $directed = false; - public function __construct(Node $node1, Node $node2, bool $directed = false) + public function __construct(Node $node1, Node $node2, bool $directed = false) { $this->node1 = $node1; $this->node2 = $node2; $this->directed = $directed; } - public function getNodes() : array + public function getNodes() : array { return [$this->node1, $this->node2]; } diff --git a/Stdlib/Graph/Tree.php b/Stdlib/Graph/Tree.php index b4b39e72b..7b251eaa6 100644 --- a/Stdlib/Graph/Tree.php +++ b/Stdlib/Graph/Tree.php @@ -70,7 +70,7 @@ class Tree extends Graph * * @since 1.0.0 */ - public function getMaxDepth(Node $node = null) : int + public function getMaxDepth(Node $node = null) : int { $currentNode = $node ?? $this->root; @@ -146,7 +146,7 @@ class Tree extends Graph * * @since 1.0.0 */ - public function isLeaf(Node $node) : bool + public function isLeaf(Node $node) : bool { return count($this->getEdgesOfNode($node)) === 1; } @@ -187,7 +187,7 @@ class Tree extends Graph * * @since 1.0.0 */ - public function isFull(int $type) : bool + public function isFull(int $type) : bool { if (count($this->edges) % $type !== 0) { return false; @@ -225,7 +225,7 @@ class Tree extends Graph $this->preOrder($neighbor, $callback); } } - + /** * Perform action on tree in post-order. * @@ -238,7 +238,7 @@ class Tree extends Graph if (count($this->nodes) === 0) { return; } - + $neighbors = $this->getNeighbors($node); foreach ($neighbors as $neighbor) { diff --git a/System/File/ContainerInterface.php b/System/File/ContainerInterface.php index 60b38584b..bfb62064c 100644 --- a/System/File/ContainerInterface.php +++ b/System/File/ContainerInterface.php @@ -31,7 +31,7 @@ interface ContainerInterface * * @param string $path Path of the resource * - * @return \DateTime + * @return \DateTime * * @since 1.0.0 */ @@ -42,7 +42,7 @@ interface ContainerInterface * * @param string $path Path of the resource * - * @return \DateTime + * @return \DateTime * * @since 1.0.0 */ @@ -53,7 +53,7 @@ interface ContainerInterface * * @param string $path Path of the resource * - * @return int + * @return int * * @since 1.0.0 */ @@ -77,7 +77,7 @@ interface ContainerInterface * * @param string $path Path of the resource * - * @return string + * @return string * * @since 1.0.0 */ @@ -191,7 +191,7 @@ interface ContainerInterface /** * Get amount of sub-resources. * - * A file will always return 1 as it doesn't have any sub-resources. + * A file will always return 1 as it doesn't have any sub-resources. * * @param bool $recursive Should count also sub-sub-resources * @@ -235,7 +235,7 @@ interface ContainerInterface * * The parent resource path is always a directory. * - * @return ContainerInterface + * @return ContainerInterface * * @since 1.0.0 */ @@ -286,7 +286,7 @@ interface ContainerInterface /** * Get the datetime when the resource got created. * - * @return \DateTime + * @return \DateTime * * @since 1.0.0 */ @@ -295,7 +295,7 @@ interface ContainerInterface /** * Get the datetime when the resource got last modified. * - * @return \DateTime + * @return \DateTime * * @since 1.0.0 */ @@ -304,7 +304,7 @@ interface ContainerInterface /** * Get the owner id of the resource. * - * @return int + * @return int * * @since 1.0.0 */ diff --git a/System/File/FileInterface.php b/System/File/FileInterface.php index b73f6ff85..139201c0a 100644 --- a/System/File/FileInterface.php +++ b/System/File/FileInterface.php @@ -34,7 +34,7 @@ interface FileInterface extends ContainerInterface * @param string $content Content to save in file * @param int $mode Mode (overwrite, append) * - * @return bool + * @return bool * * @since 1.0.0 */ @@ -110,7 +110,7 @@ interface FileInterface extends ContainerInterface * @param string $content Content to save in file * @param int $mode Mode (overwrite, append) * - * @return bool + * @return bool * * @since 1.0.0 */ diff --git a/System/File/FileUtils.php b/System/File/FileUtils.php index 263f81c42..6ec2a6556 100644 --- a/System/File/FileUtils.php +++ b/System/File/FileUtils.php @@ -40,7 +40,7 @@ class FileUtils * @since 1.0.0 * @codeCoverageIgnore */ - private function __construct() + private function __construct() { } @@ -102,7 +102,7 @@ class FileUtils if (empty($part) || $part === '.') { continue; } - + if ($part !== '..') { $path[] = $part; } elseif (!empty($path)) { @@ -111,7 +111,7 @@ class FileUtils throw new PathException($origPath); } } - + return $startsWithSlash . implode('/', $path); } diff --git a/System/File/Ftp/File.php b/System/File/Ftp/File.php index ae387693d..6c805ae65 100644 --- a/System/File/Ftp/File.php +++ b/System/File/Ftp/File.php @@ -213,7 +213,7 @@ class File extends FileAbstract implements FileInterface $changed->setTimestamp(ftp_mdtm($con, $http->getPath())); fclose($con); - + return $changed; } @@ -269,7 +269,7 @@ class File extends FileAbstract implements FileInterface $items = []; if (is_array($files = ftp_rawlist($con, LocalFile::dirpath($path)))) { - foreach ($files as $fileData) { + foreach ($files as $fileData) { if (strpos($fileData, self::name($path)) !== false) { $chunks = preg_split("/\s+/", $fileData); @@ -281,17 +281,17 @@ class File extends FileAbstract implements FileInterface break; } - } - } + } + } - return $items; + return $items; } /** * Gets the directory name of a file. - * + * * @param string $path Path of the file to get the directory name for. - * + * * @return string Returns the directory name of the file. * * @since 1.0.0 @@ -303,9 +303,9 @@ class File extends FileAbstract implements FileInterface /** * Gets the directory path of a file. - * + * * @param string $path Path of the file to get the directory name for. - * + * * @return string Returns the directory name of the file. * * @since 1.0.0 @@ -324,7 +324,7 @@ class File extends FileAbstract implements FileInterface if (($src = self::get($from)) === false) { return false; - } + } return self::put($to, $src, $overwrite ? ContentPutMode::REPLACE : ContentPutMode::CREATE); } diff --git a/System/File/Local/File.php b/System/File/Local/File.php index 0509492e3..067aa1060 100644 --- a/System/File/Local/File.php +++ b/System/File/Local/File.php @@ -237,9 +237,9 @@ class File extends FileAbstract implements FileInterface /** * Gets the directory name of a file. - * + * * @param string $path Path of the file to get the directory name for. - * + * * @return string Returns the directory name of the file. * * @since 1.0.0 @@ -251,9 +251,9 @@ class File extends FileAbstract implements FileInterface /** * Gets the directory path of a file. - * + * * @param string $path Path of the file to get the directory name for. - * + * * @return string Returns the directory name of the file. * * @since 1.0.0 @@ -319,7 +319,7 @@ class File extends FileAbstract implements FileInterface /** * Gets the directory name of a file. - * + * * @return string Returns the directory name of the file. * * @since 1.0.0 @@ -331,7 +331,7 @@ class File extends FileAbstract implements FileInterface /** * Gets the directory path of a file. - * + * * @return string Returns the directory path of the file. * * @since 1.0.0 @@ -362,7 +362,7 @@ class File extends FileAbstract implements FileInterface if (!is_writable(dirname($path))) { return false; } - + touch($path); return true; diff --git a/System/File/Storage.php b/System/File/Storage.php index f2bee94a1..85e8ab87a 100644 --- a/System/File/Storage.php +++ b/System/File/Storage.php @@ -33,7 +33,7 @@ final class Storage * @since 1.0.0 */ private static $registered = []; - + /** * Constructor. * @@ -42,7 +42,7 @@ final class Storage */ private function __construct() { - + } /** diff --git a/System/OperatingSystem.php b/System/OperatingSystem.php index 89e00d5ad..063d317cd 100644 --- a/System/OperatingSystem.php +++ b/System/OperatingSystem.php @@ -39,7 +39,7 @@ final class OperatingSystem return SystemType::WIN; } elseif (stristr(PHP_OS, 'LINUX') !== false) { return SystemType::LINUX; - } + } return SystemType::UNKNOWN; } diff --git a/System/SystemUtils.php b/System/SystemUtils.php index e9a8874ec..283ab54d7 100644 --- a/System/SystemUtils.php +++ b/System/SystemUtils.php @@ -49,7 +49,7 @@ class SystemUtils if (stristr(PHP_OS, 'WIN')) { $mem = null; exec('wmic memorychip get capacity', $mem); - + /** @var array $mem */ $mem = array_sum($mem) / 1024; } elseif (stristr(PHP_OS, 'LINUX')) { @@ -63,7 +63,7 @@ class SystemUtils break; } } - + fclose($fh); } diff --git a/UnhandledHandler.php b/UnhandledHandler.php index 2bebae229..2b9646afd 100644 --- a/UnhandledHandler.php +++ b/UnhandledHandler.php @@ -87,7 +87,7 @@ final class UnhandledHandler /** * Shutdown handler. - * + * * @return void * * @since 1.0.0 diff --git a/Uri/Http.php b/Uri/Http.php index 78fe75851..fbf21cc64 100644 --- a/Uri/Http.php +++ b/Uri/Http.php @@ -156,7 +156,7 @@ class Http implements UriInterface $this->path = substr($this->path, 0, -4); } - $this->path = strpos($this->path, $this->rootPath) === 0 ? substr($this->path, strlen($this->rootPath), strlen($this->path)) : $this->path; + $this->path = strpos($this->path, $this->rootPath) === 0 ? substr($this->path, strlen($this->rootPath), strlen($this->path)) : $this->path; $this->queryString = $url['query'] ?? ''; if (!empty($this->queryString)) { @@ -246,7 +246,7 @@ class Http implements UriInterface { return $this->path; } - + /** * Get path offset. * @@ -295,7 +295,7 @@ class Http implements UriInterface */ public function getPathElements() : array { - return explode('/', $this->path); + return explode('/', $this->path); } /** diff --git a/Uri/UriFactory.php b/Uri/UriFactory.php index 4f1ba533a..6bb91431b 100644 --- a/Uri/UriFactory.php +++ b/Uri/UriFactory.php @@ -88,7 +88,7 @@ class UriFactory * * @since 1.0.0 */ - public static function clearAll() : bool + public static function clearAll() : bool { self::$uri = []; @@ -132,7 +132,7 @@ class UriFactory * * @since 1.0.0 */ - public static function clear(string $key) : bool + public static function clear(string $key) : bool { if (isset(self::$uri[$key])) { unset(self::$uri[$key]); @@ -152,7 +152,7 @@ class UriFactory * * @since 1.0.0 */ - public static function clearLike(string $pattern) : bool + public static function clearLike(string $pattern) : bool { $success = false; diff --git a/Utils/Barcode/C128Abstract.php b/Utils/Barcode/C128Abstract.php index e2b8ee82f..cfe4f3303 100644 --- a/Utils/Barcode/C128Abstract.php +++ b/Utils/Barcode/C128Abstract.php @@ -229,7 +229,7 @@ abstract class C128Abstract * Save to file * * @param string $file File path/name - * + * * @return void * * @since 1.0.0 @@ -246,7 +246,7 @@ abstract class C128Abstract * Save to file * * @param string $file File path/name - * + * * @return void * * @since 1.0.0 diff --git a/Utils/Converter/Currency.php b/Utils/Converter/Currency.php index 71331dc1d..a4e1939c6 100644 --- a/Utils/Converter/Currency.php +++ b/Utils/Converter/Currency.php @@ -102,12 +102,12 @@ class Currency if (!isset($xml->Cube)) { throw new \Exception('Invalid xml path'); - - } + + } $node = $xml->Cube->Cube->Cube; self::$ecbCurrencies = []; - + foreach ($node as $key => $value) { self::$ecbCurrencies[strtoupper((string) $value->attributes()['currency'])] = (float) $value->attributes()['rate']; } diff --git a/Utils/Git/Repository.php b/Utils/Git/Repository.php index c7002bf15..16ef207a8 100644 --- a/Utils/Git/Repository.php +++ b/Utils/Git/Repository.php @@ -214,7 +214,7 @@ class Repository * Create repository * * @param string $source Create repository from source (optional, can be remote) - * + * * @return string * * @throws \Exception @@ -292,7 +292,7 @@ class Repository * * @since 1.0.0 */ - private function parseFileList($files) : string + private function parseFileList($files) : string { if (is_array($files)) { return '"' . implode('" "', $files) . '"'; diff --git a/Utils/IO/Zip/ArchiveInterface.php b/Utils/IO/Zip/ArchiveInterface.php index 97ef17f41..6fa26bc60 100644 --- a/Utils/IO/Zip/ArchiveInterface.php +++ b/Utils/IO/Zip/ArchiveInterface.php @@ -34,7 +34,7 @@ interface ArchiveInterface * @since 1.0.0 */ public static function pack($sources, string $destination, bool $overwrite = true) : bool; - + /** * Unpack archive. * diff --git a/Utils/IO/Zip/Gz.php b/Utils/IO/Zip/Gz.php index bde7e2b6b..c4e2f0451 100644 --- a/Utils/IO/Zip/Gz.php +++ b/Utils/IO/Zip/Gz.php @@ -33,21 +33,21 @@ class Gz implements ArchiveInterface if (!$overwrite && file_exists($destination)) { return false; } - + if (($gz = gzopen($destination, 'w')) === false) { return false; } - + $src = fopen($source, 'r'); while (!feof($src)) { gzwrite($gz, fread($src, 4096)); } - + fclose($src); - + return gzclose($gz); } - + /** * {@inheritdoc} */ @@ -57,18 +57,18 @@ class Gz implements ArchiveInterface if (file_exists($destination)) { return false; } - + if (($gz = gzopen($source, 'w')) === false) { return false; } - + $dest = fopen($destination, 'w'); while (!gzeof($gz)) { fwrite($dest, gzread($gz, 4096)); } - + fclose($dest); - + return gzclose($gz); } } diff --git a/Utils/IO/Zip/Tar.php b/Utils/IO/Zip/Tar.php index 6e54d1e29..6831dd7d9 100644 --- a/Utils/IO/Zip/Tar.php +++ b/Utils/IO/Zip/Tar.php @@ -75,6 +75,6 @@ class Tar implements ArchiveInterface */ public static function unpack(string $source, string $destination) : bool { - + } } diff --git a/Utils/IO/Zip/TarGz.php b/Utils/IO/Zip/TarGz.php index f178dca12..6846efa2c 100644 --- a/Utils/IO/Zip/TarGz.php +++ b/Utils/IO/Zip/TarGz.php @@ -38,7 +38,7 @@ class TarGz implements ArchiveInterface return $pack; } - + /** * {@inheritdoc} */ diff --git a/Utils/IO/Zip/Zip.php b/Utils/IO/Zip/Zip.php index b9df2b70a..d73b21750 100644 --- a/Utils/IO/Zip/Zip.php +++ b/Utils/IO/Zip/Zip.php @@ -81,7 +81,7 @@ class Zip implements ArchiveInterface return $zip->close(); } - + /** * {@inheritdoc} */ @@ -98,9 +98,9 @@ class Zip implements ArchiveInterface if (!$zip->open($source)) { return false; } - + $zip->extractTo($destination . '/'); - + return $zip->close(); } } diff --git a/Utils/Parser/Markdown/Markdown.php b/Utils/Parser/Markdown/Markdown.php index 02a204a41..0c9e88cad 100644 --- a/Utils/Parser/Markdown/Markdown.php +++ b/Utils/Parser/Markdown/Markdown.php @@ -113,11 +113,11 @@ class Markdown ]; protected static $safeLinksWhitelist = [ - 'http://', 'https://', 'ftp://', 'ftps://', 'mailto:', - 'data:image/png;base64,', 'data:image/gif;base64,', 'data:image/jpeg;base64,', + 'http://', 'https://', 'ftp://', 'ftps://', 'mailto:', + 'data:image/png;base64,', 'data:image/gif;base64,', 'data:image/jpeg;base64,', 'irc:', 'ircs:', 'git:', 'ssh:', 'news:', 'steam:', - ]; - + ]; + private static $definitionData = []; public static function parse(string $text) : string @@ -366,7 +366,7 @@ class Markdown } $text = trim($lineArray['text'], '# '); - + return [ 'element' => [ 'name' => 'h' . min(6, $level), @@ -534,7 +534,7 @@ class Markdown ]; self::$definitionData['Reference'][$id] = $data; - + return ['hidden' => true]; } @@ -744,7 +744,7 @@ class Markdown if (strpos($excerpt['text'], '>') === false || !preg_match('/^<((mailto:)?\S+?@\S+?)>/i', $excerpt['text'], $matches)) { return; } - + $url = $matches[1]; if (!isset($matches[2])) { @@ -1066,7 +1066,7 @@ class Markdown return $element; } - + protected static function escape(string $text, bool $allowQuotes = false) : string { return htmlspecialchars($text, $allowQuotes ? ENT_NOQUOTES : ENT_QUOTES, 'UTF-8'); diff --git a/Utils/Permutation.php b/Utils/Permutation.php index fc0d320e5..55cb3a3a6 100644 --- a/Utils/Permutation.php +++ b/Utils/Permutation.php @@ -47,7 +47,7 @@ class Permutation $newres[] = $val; unset($newArr[$key]); - + $permutations = array_merge($permutations, self::permut($newArr, $newres)); } } diff --git a/Utils/RnG/DateTime.php b/Utils/RnG/DateTime.php index cb83a1f22..456f652b0 100644 --- a/Utils/RnG/DateTime.php +++ b/Utils/RnG/DateTime.php @@ -38,7 +38,7 @@ class DateTime public static function generateDateTime(\DateTime $start, \DateTime $end) : \DateTime { $rng = new \DateTime(); - + return $rng->setTimestamp(mt_rand($start->getTimestamp(), $end->getTimestamp())); } } diff --git a/Utils/RnG/File.php b/Utils/RnG/File.php index e0dc79e45..ef33cb874 100644 --- a/Utils/RnG/File.php +++ b/Utils/RnG/File.php @@ -32,16 +32,16 @@ class File * @since 1.0.0 */ private static $extensions = [ - ['exe', null], ['dat', null], ['txt', null], ['csv', 'txt'], ['doc', null], ['docx', 'doc'], - ['mp3', null], ['mp4', null], ['avi', null], ['mpeg', null], ['wmv', null], ['ppt', null], - ['xls', null], ['xlsx', 'xls'], ['xlsxm', 'xls'], ['php', null], ['html', null], ['tex', null], - ['js', null], ['c', null], ['cpp', null], ['h', null], ['res', null], ['ico', null], - ['jpg', null], ['png', null], ['gif', null], ['bmp', null], ['ttf', null], ['zip', null], - ['rar', null], ['7z', null], ['tar', 'gz'], ['gz', null], ['gz', null], ['sh', null], - ['bat', null], ['iso', null], ['css', null], ['json', null], ['ini', null], ['psd', null], - ['pptx', 'ppt'], ['xml', null], ['dll', null], ['wav', null], ['wma', null], ['vb', null], - ['tmp', null], ['tif', null], ['sql', null], ['swf', null], ['svg', null], ['rpm', null], - ['rss', null], ['pkg', null], ['pdf', null], ['mpg', null], ['mov', null], ['jar', null], + ['exe', null], ['dat', null], ['txt', null], ['csv', 'txt'], ['doc', null], ['docx', 'doc'], + ['mp3', null], ['mp4', null], ['avi', null], ['mpeg', null], ['wmv', null], ['ppt', null], + ['xls', null], ['xlsx', 'xls'], ['xlsxm', 'xls'], ['php', null], ['html', null], ['tex', null], + ['js', null], ['c', null], ['cpp', null], ['h', null], ['res', null], ['ico', null], + ['jpg', null], ['png', null], ['gif', null], ['bmp', null], ['ttf', null], ['zip', null], + ['rar', null], ['7z', null], ['tar', 'gz'], ['gz', null], ['gz', null], ['sh', null], + ['bat', null], ['iso', null], ['css', null], ['json', null], ['ini', null], ['psd', null], + ['pptx', 'ppt'], ['xml', null], ['dll', null], ['wav', null], ['wma', null], ['vb', null], + ['tmp', null], ['tif', null], ['sql', null], ['swf', null], ['svg', null], ['rpm', null], + ['rss', null], ['pkg', null], ['pdf', null], ['mpg', null], ['mov', null], ['jar', null], ['flv', null], ['fla', null], ['deb', null], ['py', null], ['pl', null], ]; diff --git a/Utils/RnG/Name.php b/Utils/RnG/Name.php index 4211c533a..ce997542e 100644 --- a/Utils/RnG/Name.php +++ b/Utils/RnG/Name.php @@ -470,11 +470,11 @@ class Name 'male' => ['none'], 'family' => [ 'Հովհաննիսյան', 'Հարությունյան', 'Սարգսյան', 'Խաչատրյան', 'Գրիգորյան', - 'আহমেদ', 'আলী', 'আক্তার', 'বন্দ্যোপাধ্যায়', 'নিক', 'ব্যাপারী', 'বড়ুয়া', 'বিশ্বাস', 'ভৌমিক', 'বসু', + 'আহমেদ', 'আলী', 'আক্তার', 'বন্দ্যোপাধ্যায়', 'নিক', 'ব্যাপারী', 'বড়ুয়া', 'বিশ্বাস', 'ভৌমিক', 'বসু', '王', '李', '张', '刘', '陈', '杨', '黄', '赵', '吴', '周', '徐', '孙', '马', '朱', '胡', '郭', '何', '高', '林', '罗', - 'כהן', 'לוי', 'מזרחי', 'פרץ', 'ביטון', 'דהן', 'אברהם', 'פרידמן', 'מלכה', 'אזולאי', 'כץ', 'יוסף', 'דוד', 'עמר', 'אוחיון', - '김', '리', '박', '최', '정', '강', '조', '윤', '장', '림', '한', '신', '서', '권', '황', '안', '송', '홍', '고', '문', '손', '량', - 'Yılmaz', 'Kaya', 'Demir', 'Şahin', 'Çelik', 'Yıldız', 'Yıldırım', 'Öztürk', 'Aydın', 'Özdemir', 'Arslan', 'Doğan', 'Kılıç', 'Aslan', 'Çetin', 'Kara', 'Koç', 'Kurt', 'Özkan', 'Şimşek', + 'כהן', 'לוי', 'מזרחי', 'פרץ', 'ביטון', 'דהן', 'אברהם', 'פרידמן', 'מלכה', 'אזולאי', 'כץ', 'יוסף', 'דוד', 'עמר', 'אוחיון', + '김', '리', '박', '최', '정', '강', '조', '윤', '장', '림', '한', '신', '서', '권', '황', '안', '송', '홍', '고', '문', '손', '량', + 'Yılmaz', 'Kaya', 'Demir', 'Şahin', 'Çelik', 'Yıldız', 'Yıldırım', 'Öztürk', 'Aydın', 'Özdemir', 'Arslan', 'Doğan', 'Kılıç', 'Aslan', 'Çetin', 'Kara', 'Koç', 'Kurt', 'Özkan', 'Şimşek', ], ] ]; diff --git a/Utils/RnG/Text.php b/Utils/RnG/Text.php index a57f45e16..504e1a1ad 100644 --- a/Utils/RnG/Text.php +++ b/Utils/RnG/Text.php @@ -32,21 +32,21 @@ class Text * @since 1.0.0 */ private static $words_west = [ - 'lorem', 'ipsum', 'dolor', 'sit', 'amet', 'consectetur', 'adipiscing', 'elit', 'curabitur', 'vel', 'hendrerit', 'libero', - 'eleifend', 'blandit', 'nunc', 'ornare', 'odio', 'ut', 'orci', 'gravida', 'imperdiet', 'nullam', 'purus', 'lacinia', 'a', - 'pretium', 'quis', 'congue', 'praesent', 'sagittis', 'laoreet', 'auctor', 'mauris', 'non', 'velit', 'eros', 'dictum', - 'proin', 'accumsan', 'sapien', 'nec', 'massa', 'volutpat', 'venenatis', 'sed', 'eu', 'molestie', 'lacus', 'quisque', - 'porttitor', 'ligula', 'dui', 'mollis', 'tempus', 'at', 'magna', 'vestibulum', 'turpis', 'ac', 'diam', 'tincidunt', 'id', - 'condimentum', 'enim', 'sodales', 'in', 'hac', 'habitasse', 'platea', 'dictumst', 'aenean', 'neque', 'fusce', 'augue', - 'leo', 'eget', 'semper', 'mattis', 'tortor', 'scelerisque', 'nulla', 'interdum', 'tellus', 'malesuada', 'rhoncus', 'porta', - 'sem', 'aliquet', 'et', 'nam', 'suspendisse', 'potenti', 'vivamus', 'luctus', 'fringilla', 'erat', 'donec', 'justo', - 'vehicula', 'ultricies', 'varius', 'ante', 'primis', 'faucibus', 'ultrices', 'posuere', 'cubilia', 'curae', 'etiam', - 'cursus', 'aliquam', 'quam', 'dapibus', 'nisl', 'feugiat', 'egestas', 'class', 'aptent', 'taciti', 'sociosqu', 'ad', - 'litora', 'torquent', 'per', 'conubia', 'nostra', 'inceptos', 'himenaeos', 'phasellus', 'nibh', 'pulvinar', 'vitae', - 'urna', 'iaculis', 'lobortis', 'nisi', 'viverra', 'arcu', 'morbi', 'pellentesque', 'metus', 'commodo', 'ut', 'facilisis', - 'felis', 'tristique', 'ullamcorper', 'placerat', 'aenean', 'convallis', 'sollicitudin', 'integer', 'rutrum', 'duis', 'est', - 'etiam', 'bibendum', 'donec', 'pharetra', 'vulputate', 'maecenas', 'mi', 'fermentum', 'consequat', 'suscipit', 'aliquam', - 'habitant', 'senectus', 'netus', 'fames', 'quisque', 'euismod', 'curabitur', 'lectus', 'elementum', 'tempor', 'risus', + 'lorem', 'ipsum', 'dolor', 'sit', 'amet', 'consectetur', 'adipiscing', 'elit', 'curabitur', 'vel', 'hendrerit', 'libero', + 'eleifend', 'blandit', 'nunc', 'ornare', 'odio', 'ut', 'orci', 'gravida', 'imperdiet', 'nullam', 'purus', 'lacinia', 'a', + 'pretium', 'quis', 'congue', 'praesent', 'sagittis', 'laoreet', 'auctor', 'mauris', 'non', 'velit', 'eros', 'dictum', + 'proin', 'accumsan', 'sapien', 'nec', 'massa', 'volutpat', 'venenatis', 'sed', 'eu', 'molestie', 'lacus', 'quisque', + 'porttitor', 'ligula', 'dui', 'mollis', 'tempus', 'at', 'magna', 'vestibulum', 'turpis', 'ac', 'diam', 'tincidunt', 'id', + 'condimentum', 'enim', 'sodales', 'in', 'hac', 'habitasse', 'platea', 'dictumst', 'aenean', 'neque', 'fusce', 'augue', + 'leo', 'eget', 'semper', 'mattis', 'tortor', 'scelerisque', 'nulla', 'interdum', 'tellus', 'malesuada', 'rhoncus', 'porta', + 'sem', 'aliquet', 'et', 'nam', 'suspendisse', 'potenti', 'vivamus', 'luctus', 'fringilla', 'erat', 'donec', 'justo', + 'vehicula', 'ultricies', 'varius', 'ante', 'primis', 'faucibus', 'ultrices', 'posuere', 'cubilia', 'curae', 'etiam', + 'cursus', 'aliquam', 'quam', 'dapibus', 'nisl', 'feugiat', 'egestas', 'class', 'aptent', 'taciti', 'sociosqu', 'ad', + 'litora', 'torquent', 'per', 'conubia', 'nostra', 'inceptos', 'himenaeos', 'phasellus', 'nibh', 'pulvinar', 'vitae', + 'urna', 'iaculis', 'lobortis', 'nisi', 'viverra', 'arcu', 'morbi', 'pellentesque', 'metus', 'commodo', 'ut', 'facilisis', + 'felis', 'tristique', 'ullamcorper', 'placerat', 'aenean', 'convallis', 'sollicitudin', 'integer', 'rutrum', 'duis', 'est', + 'etiam', 'bibendum', 'donec', 'pharetra', 'vulputate', 'maecenas', 'mi', 'fermentum', 'consequat', 'suscipit', 'aliquam', + 'habitant', 'senectus', 'netus', 'fames', 'quisque', 'euismod', 'curabitur', 'lectus', 'elementum', 'tempor', 'risus', 'cras', ]; diff --git a/Utils/StringCompare.php b/Utils/StringCompare.php index 0f80ae2bd..559b8fd5b 100644 --- a/Utils/StringCompare.php +++ b/Utils/StringCompare.php @@ -36,7 +36,7 @@ class StringCompare /** * Constructor. - * + * * @param array $dictionary Dictionary * * @since 1.0.0 @@ -48,9 +48,9 @@ class StringCompare /** * Adds word to dictionary - * + * * @param string $word Word to add to dictionary - * + * * @return void * * @since 1.0.0 @@ -177,5 +177,5 @@ class StringCompare return min($phraseValue * $phraseWeight, $wordValue * $wordWeight) * $minWeight + max($phraseValue * $phraseWeight, $wordValue * $wordWeight) * $maxWeight + $lengthValue * $lengthWeight; - } + } } \ No newline at end of file diff --git a/Utils/StringUtils.php b/Utils/StringUtils.php index 80ba7e275..c96ae55dc 100644 --- a/Utils/StringUtils.php +++ b/Utils/StringUtils.php @@ -350,7 +350,7 @@ class StringUtils * * @param string $value String to analyze. * - * @return float + * @return float * * @since 1.0.0 */ @@ -373,7 +373,7 @@ class StringUtils * * @param string $input String to count chars. * - * @return array + * @return array * * @since 1.0.0 */ diff --git a/Utils/TaskSchedule/Cron.php b/Utils/TaskSchedule/Cron.php index 8d3933888..3fc518c71 100644 --- a/Utils/TaskSchedule/Cron.php +++ b/Utils/TaskSchedule/Cron.php @@ -73,7 +73,7 @@ class Cron extends SchedulerAbstract * * @since 1.0.0 */ - private function normalize(string $raw) : string + private function normalize(string $raw) : string { return str_replace("\r\n", "\n", $raw); } @@ -92,7 +92,7 @@ class Cron extends SchedulerAbstract $jobs[] = CronJob::createWith(str_getcsv($line, ' ')); } } - + return $jobs; } diff --git a/Utils/TaskSchedule/Schedule.php b/Utils/TaskSchedule/Schedule.php index 8bd91f93f..9b61a4f00 100644 --- a/Utils/TaskSchedule/Schedule.php +++ b/Utils/TaskSchedule/Schedule.php @@ -36,14 +36,14 @@ class Schedule extends TaskAbstract $job->setRun($jobData[8]); $job->setStatus($jobData[3]); - if (DateTime::isValid($jobData[2])) { + if (DateTime::isValid($jobData[2])) { $job->setNextRunTime(new \DateTime($jobData[2])); } - if (DateTime::isValid($jobData[5])) { + if (DateTime::isValid($jobData[5])) { $job->setLastRuntime(new \DateTime($jobData[5])); } - + $job->setComment($jobData[10]); $job->addResult($jobData[6]); diff --git a/Utils/TaskSchedule/SchedulerAbstract.php b/Utils/TaskSchedule/SchedulerAbstract.php index 34da72811..fa2777b26 100644 --- a/Utils/TaskSchedule/SchedulerAbstract.php +++ b/Utils/TaskSchedule/SchedulerAbstract.php @@ -90,7 +90,7 @@ abstract class SchedulerAbstract /** * Create task - * + * * @param TaskAbstract * * @return void diff --git a/Utils/TaskSchedule/TaskAbstract.php b/Utils/TaskSchedule/TaskAbstract.php index 924452a5a..da8015b46 100644 --- a/Utils/TaskSchedule/TaskAbstract.php +++ b/Utils/TaskSchedule/TaskAbstract.php @@ -74,7 +74,7 @@ abstract class TaskAbstract /** * Comment - * + * * @param string $name Name of the task * @param string $cmd Command/script to run * @@ -85,7 +85,7 @@ abstract class TaskAbstract /** * Constructor - * + * * @param string $name Id/name of the task (on linux the same as the executable script) * @param string $cmd Command to create the task * @@ -222,7 +222,7 @@ abstract class TaskAbstract * * @since 1.0.0 */ - public function getLastRuntime() + public function getLastRuntime() { return $this->lastRunTime; } @@ -269,11 +269,11 @@ abstract class TaskAbstract /** * Create task based on job data - * + * * @param array $jobData Raw job data - * + * * @return TaskAbstract - * + * * @since 1.0.0 */ abstract public static function createWith(array $jobData) : TaskAbstract; diff --git a/Utils/TaskSchedule/TaskScheduler.php b/Utils/TaskSchedule/TaskScheduler.php index 7f1daece2..df8a5484c 100644 --- a/Utils/TaskSchedule/TaskScheduler.php +++ b/Utils/TaskSchedule/TaskScheduler.php @@ -72,7 +72,7 @@ class TaskScheduler extends SchedulerAbstract * * @since 1.0.0 */ - private function normalize(string $raw) : string + private function normalize(string $raw) : string { return str_replace("\r\n", "\n", $raw); } @@ -89,7 +89,7 @@ class TaskScheduler extends SchedulerAbstract foreach ($lines as $line) { $jobs[] = Schedule::createWith(str_getcsv($line)); } - + return $jobs; } diff --git a/Utils/TestUtils.php b/Utils/TestUtils.php index de9f98f80..8a6a92bf3 100644 --- a/Utils/TestUtils.php +++ b/Utils/TestUtils.php @@ -38,26 +38,26 @@ class TestUtils public static function setMember(/* object */ $obj, string $name, $value) : bool { $reflectionClass = new \ReflectionClass(is_string($obj) ? $obj : get_class($obj)); - + if (!$reflectionClass->hasProperty($name)) { return false; } - + $reflectionProperty = $reflectionClass->getProperty($name); - + if (!($accessible = $reflectionProperty->isPublic())) { $reflectionProperty->setAccessible(true); } - + $reflectionProperty->setValue($obj, $value); - + if (!$accessible) { $reflectionProperty->setAccessible(false); } - + return true; } - + /** * Get private object member * @@ -68,26 +68,26 @@ class TestUtils * * @since 1.0.0 */ - public static function getMember($obj, string $name) + public static function getMember($obj, string $name) { $reflectionClass = new \ReflectionClass(is_string($obj) ? $obj : get_class($obj)); - + if (!$reflectionClass->hasProperty($name)) { return null; } - + $reflectionProperty = $reflectionClass->getProperty($name); - + if (!($accessible = $reflectionProperty->isPublic())) { $reflectionProperty->setAccessible(true); } - + $value = $reflectionProperty->getValue($obj); - + if (!$accessible) { $reflectionProperty->setAccessible(false); } - + return $value; } } diff --git a/Validation/Barcode/Barcode.php b/Validation/Barcode/Barcode.php index b53a9fb2a..003471bab 100644 --- a/Validation/Barcode/Barcode.php +++ b/Validation/Barcode/Barcode.php @@ -20,6 +20,6 @@ class Barcode extends ValidatorAbstract { public static function isValid($value, array $constraints = null) { - + } } \ No newline at end of file diff --git a/Validation/Barcode/Barcode11.php b/Validation/Barcode/Barcode11.php index b1e2de9b7..3fa6eacf7 100644 --- a/Validation/Barcode/Barcode11.php +++ b/Validation/Barcode/Barcode11.php @@ -20,6 +20,6 @@ class Barcode11 extends ValidatorAbstract { public static function isValid($value, array $constraints = null) { - + } } \ No newline at end of file diff --git a/Validation/Barcode/Barcode128.php b/Validation/Barcode/Barcode128.php index 38f817383..cb4dec982 100644 --- a/Validation/Barcode/Barcode128.php +++ b/Validation/Barcode/Barcode128.php @@ -20,6 +20,6 @@ class Barcode128 extends ValidatorAbstract { public static function isValid($value, array $constraints = null) { - + } } \ No newline at end of file diff --git a/Validation/Barcode/Barcode25.php b/Validation/Barcode/Barcode25.php index 68a37d183..180857356 100644 --- a/Validation/Barcode/Barcode25.php +++ b/Validation/Barcode/Barcode25.php @@ -20,6 +20,6 @@ class Barcode25 extends ValidatorAbstract { public static function isValid($value, array $constraints = null) { - + } } \ No newline at end of file diff --git a/Validation/Barcode/Barcode39.php b/Validation/Barcode/Barcode39.php index 212e4f24f..ca4a0a342 100644 --- a/Validation/Barcode/Barcode39.php +++ b/Validation/Barcode/Barcode39.php @@ -20,6 +20,6 @@ class Barcode39 extends ValidatorAbstract { public static function isValid($value, array $constraints = null) { - + } } \ No newline at end of file diff --git a/Validation/Barcode/Barcode93.php b/Validation/Barcode/Barcode93.php index 266f07003..494dc85a4 100644 --- a/Validation/Barcode/Barcode93.php +++ b/Validation/Barcode/Barcode93.php @@ -20,6 +20,6 @@ class Barcode93 extends ValidatorAbstract { public static function isValid($value, array $constraints = null) { - + } } \ No newline at end of file diff --git a/Validation/Barcode/BarcodeCodebar.php b/Validation/Barcode/BarcodeCodebar.php index 982518267..ca4b91814 100644 --- a/Validation/Barcode/BarcodeCodebar.php +++ b/Validation/Barcode/BarcodeCodebar.php @@ -20,6 +20,6 @@ class BarcodeCodebar extends ValidatorAbstract { public static function isValid($value, array $constraints = null) { - + } } \ No newline at end of file diff --git a/Validation/Barcode/BarcodeDatamatrix.php b/Validation/Barcode/BarcodeDatamatrix.php index e0eb58a62..65a5e93f8 100644 --- a/Validation/Barcode/BarcodeDatamatrix.php +++ b/Validation/Barcode/BarcodeDatamatrix.php @@ -20,6 +20,6 @@ class BarcodeDatamatrix extends ValidatorAbstract { public static function isValid($value, array $constraints = null) { - + } } \ No newline at end of file diff --git a/Validation/Barcode/BarcodeEAN.php b/Validation/Barcode/BarcodeEAN.php index 5d3e744ff..5a96e2c1b 100644 --- a/Validation/Barcode/BarcodeEAN.php +++ b/Validation/Barcode/BarcodeEAN.php @@ -20,6 +20,6 @@ class BarcodeEAN extends ValidatorAbstract { public static function isValid($value, array $constraints = null) { - + } } \ No newline at end of file diff --git a/Validation/Barcode/BarcodeMSI.php b/Validation/Barcode/BarcodeMSI.php index 91c814599..471fb7c24 100644 --- a/Validation/Barcode/BarcodeMSI.php +++ b/Validation/Barcode/BarcodeMSI.php @@ -20,6 +20,6 @@ class BarcodeMSI extends ValidatorAbstract { public static function isValid($value, array $constraints = null) { - + } } \ No newline at end of file diff --git a/Validation/Barcode/QrCode.php b/Validation/Barcode/QrCode.php index b7de7d808..7850fcbc1 100644 --- a/Validation/Barcode/QrCode.php +++ b/Validation/Barcode/QrCode.php @@ -20,6 +20,6 @@ class QrCode extends ValidatorAbstract { public static function isValid($value, array $constraints = null) { - + } } \ No newline at end of file diff --git a/Views/View.php b/Views/View.php index 64b1b3757..1d03fc91a 100644 --- a/Views/View.php +++ b/Views/View.php @@ -158,7 +158,7 @@ class View extends ViewAbstract * @param string $translation Text * @param string $module Module name * @param string $theme Theme name - * + * * @return string * * @throws InvalidModuleException Throws this exception if no data for the defined module could be found. @@ -201,7 +201,7 @@ class View extends ViewAbstract * @param string $translation Text * @param string $module Module name * @param string $theme Theme name - * + * * @return string * * @since 1.0.0 diff --git a/Views/ViewAbstract.php b/Views/ViewAbstract.php index b32a9039f..df0c4a991 100644 --- a/Views/ViewAbstract.php +++ b/Views/ViewAbstract.php @@ -155,7 +155,7 @@ abstract class ViewAbstract implements \Serializable * * @since 1.0.0 */ - public function addView(string $id, View $view, int $order = 0, bool $overwrite = true) : bool + public function addView(string $id, View $view, int $order = 0, bool $overwrite = true) : bool { if ($overwrite || !isset($this->views[$id])) { $this->views[$id] = $view; @@ -163,10 +163,10 @@ abstract class ViewAbstract implements \Serializable if ($order !== 0) { uasort($this->views, ['\phpOMS\Views\View', 'viewSort']); } - + return true; } - + return false; } diff --git a/tests/Account/AccountManagerTest.php b/tests/Account/AccountManagerTest.php index 9125390d1..f6deaac30 100644 --- a/tests/Account/AccountManagerTest.php +++ b/tests/Account/AccountManagerTest.php @@ -59,6 +59,6 @@ class AccountManagerTest extends \PHPUnit\Framework\TestCase self::assertTrue($manager->remove($account->getId())); self::assertFalse($manager->remove(-1)); self::assertEquals(0, $manager->count()); - + } } diff --git a/tests/Account/PermissionTypeTest.php b/tests/Account/PermissionTypeTest.php index f9525a684..138f690c5 100644 --- a/tests/Account/PermissionTypeTest.php +++ b/tests/Account/PermissionTypeTest.php @@ -23,7 +23,7 @@ class PermissionTypeTest extends \PHPUnit\Framework\TestCase { self::assertEquals(6, count(PermissionType::getConstants())); self::assertEquals(PermissionType::getConstants(), array_unique(PermissionType::getConstants())); - + self::assertEquals(1, PermissionType::NONE); self::assertEquals(2, PermissionType::READ); self::assertEquals(4, PermissionType::CREATE); diff --git a/tests/ApplicationAbstractTest.php b/tests/ApplicationAbstractTest.php index 29075b9a8..7de7a68b1 100644 --- a/tests/ApplicationAbstractTest.php +++ b/tests/ApplicationAbstractTest.php @@ -22,7 +22,7 @@ class ApplicationAbstractTest extends \PHPUnit\Framework\TestCase public function testGetSet() { $obj = new class extends ApplicationAbstract {}; - + $obj->appName = 'Test'; self::assertEquals('Test', $obj->appName); diff --git a/tests/Bootstrap.php b/tests/Bootstrap.php index 615b71068..5695e72ce 100644 --- a/tests/Bootstrap.php +++ b/tests/Bootstrap.php @@ -11,9 +11,9 @@ use phpOMS\DataStorage\Database\DatabasePool; use phpOMS\DataStorage\Database\DataMapperAbstract; // Reset database -$db = new \PDO($CONFIG['db']['core']['masters']['admin']['db'] . ':host=' . - $CONFIG['db']['core']['masters']['admin']['host'], - $CONFIG['db']['core']['masters']['admin']['login'], +$db = new \PDO($CONFIG['db']['core']['masters']['admin']['db'] . ':host=' . + $CONFIG['db']['core']['masters']['admin']['host'], + $CONFIG['db']['core']['masters']['admin']['login'], $CONFIG['db']['core']['masters']['admin']['password'] ); $db->exec('DROP DATABASE IF EXISTS ' . $CONFIG['db']['core']['masters']['admin']['database']); diff --git a/tests/Business/Finance/DepreciationTest.php b/tests/Business/Finance/DepreciationTest.php index 2d4d67924..108b26a6f 100644 --- a/tests/Business/Finance/DepreciationTest.php +++ b/tests/Business/Finance/DepreciationTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Business\Finance; - use phpOMS\Business\Finance\Depreciation; class DepreciationTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Business/Finance/FinanceFormulasTest.php b/tests/Business/Finance/FinanceFormulasTest.php index 49697c0d1..250cd8a6e 100644 --- a/tests/Business/Finance/FinanceFormulasTest.php +++ b/tests/Business/Finance/FinanceFormulasTest.php @@ -16,7 +16,6 @@ namespace phpOMS\tests\Business\Finance; use phpOMS\Business\Finance\FinanceFormulas; - class FinanceFormulasTest extends \PHPUnit\Framework\TestCase { public function testAnnualPercentageYield() diff --git a/tests/Business/Finance/Forecasting/ARCHTest.php b/tests/Business/Finance/Forecasting/ARCHTest.php index acccd988d..db1bfbe82 100644 --- a/tests/Business/Finance/Forecasting/ARCHTest.php +++ b/tests/Business/Finance/Forecasting/ARCHTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Business\Finance\Forecasting; - use phpOMS\Business\Finance\Forecasting\ARCH; class ARCHTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Business/Finance/Forecasting/ARFIMATest.php b/tests/Business/Finance/Forecasting/ARFIMATest.php index 688dc4d2d..17939edca 100644 --- a/tests/Business/Finance/Forecasting/ARFIMATest.php +++ b/tests/Business/Finance/Forecasting/ARFIMATest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Business\Finance\Forecasting; - use phpOMS\Business\Finance\Forecasting\ARFIMA; class ARFIMATest extends \PHPUnit\Framework\TestCase diff --git a/tests/Business/Finance/Forecasting/ARIMATest.php b/tests/Business/Finance/Forecasting/ARIMATest.php index 73603a821..0b0562048 100644 --- a/tests/Business/Finance/Forecasting/ARIMATest.php +++ b/tests/Business/Finance/Forecasting/ARIMATest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Business\Finance\Forecasting; - use phpOMS\Business\Finance\Forecasting\ARIMA; class ARIMATest extends \PHPUnit\Framework\TestCase diff --git a/tests/Business/Finance/Forecasting/ARMATest.php b/tests/Business/Finance/Forecasting/ARMATest.php index 792fd3a11..13a7baca6 100644 --- a/tests/Business/Finance/Forecasting/ARMATest.php +++ b/tests/Business/Finance/Forecasting/ARMATest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Business\Finance\Forecasting; - use phpOMS\Business\Finance\Forecasting\ARMA; class ARMATest extends \PHPUnit\Framework\TestCase diff --git a/tests/Business/Finance/Forecasting/ARTest.php b/tests/Business/Finance/Forecasting/ARTest.php index e8eeea5cb..0147f8e14 100644 --- a/tests/Business/Finance/Forecasting/ARTest.php +++ b/tests/Business/Finance/Forecasting/ARTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Business\Finance\Forecasting; - use phpOMS\Business\Finance\Forecasting\AR; class ARTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Business/Finance/Forecasting/ClassicalDecompositionTest.php b/tests/Business/Finance/Forecasting/ClassicalDecompositionTest.php index e351e10b8..f0da03b42 100644 --- a/tests/Business/Finance/Forecasting/ClassicalDecompositionTest.php +++ b/tests/Business/Finance/Forecasting/ClassicalDecompositionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Business\Finance\Forecasting; - use phpOMS\Business\Finance\Forecasting\ClassicalDecomposition; class ClassicalDecompositionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Business/Finance/Forecasting/ExponentialSmoothing/ExponentialSmoothingTest.php b/tests/Business/Finance/Forecasting/ExponentialSmoothing/ExponentialSmoothingTest.php index aa3df03ad..7ffd4353e 100644 --- a/tests/Business/Finance/Forecasting/ExponentialSmoothing/ExponentialSmoothingTest.php +++ b/tests/Business/Finance/Forecasting/ExponentialSmoothing/ExponentialSmoothingTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Business\Finance\Forecasting\ExponentialSmoothing; - use phpOMS\Business\Finance\Forecasting\ExponentialSmoothing\ExponentialSmoothing; class ExponentialSmoothingTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Business/Finance/Forecasting/ExponentialSmoothing/SeasonalTypeTest.php b/tests/Business/Finance/Forecasting/ExponentialSmoothing/SeasonalTypeTest.php index f3c40b5fd..fb76216ba 100644 --- a/tests/Business/Finance/Forecasting/ExponentialSmoothing/SeasonalTypeTest.php +++ b/tests/Business/Finance/Forecasting/ExponentialSmoothing/SeasonalTypeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Business\Finance\Forecasting\ExponentialSmoothing; - use phpOMS\Business\Finance\Forecasting\ExponentialSmoothing\SeasonalType; class SeasonalTypeTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Business/Finance/Forecasting/ExponentialSmoothing/TrendTypeTest.php b/tests/Business/Finance/Forecasting/ExponentialSmoothing/TrendTypeTest.php index 227f95677..cf4c18af6 100644 --- a/tests/Business/Finance/Forecasting/ExponentialSmoothing/TrendTypeTest.php +++ b/tests/Business/Finance/Forecasting/ExponentialSmoothing/TrendTypeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Business\Finance\Forecasting\ExponentialSmoothing; - use phpOMS\Business\Finance\Forecasting\ExponentialSmoothing\TrendType; class TrendTypeTest extends \PHPUnit\Framework\TestCase @@ -23,7 +22,7 @@ class TrendTypeTest extends \PHPUnit\Framework\TestCase { self::assertEquals(4, count(TrendType::getConstants())); self::assertEquals(TrendType::getConstants(), array_unique(TrendType::getConstants())); - + self::assertEquals(0, TrendType::ALL); self::assertEquals(1, TrendType::NONE); self::assertEquals(2, TrendType::ADDITIVE); diff --git a/tests/Business/Finance/Forecasting/GARCHTest.php b/tests/Business/Finance/Forecasting/GARCHTest.php index 8a73b07c8..87bfce8ce 100644 --- a/tests/Business/Finance/Forecasting/GARCHTest.php +++ b/tests/Business/Finance/Forecasting/GARCHTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Business\Finance\Forecasting; - use phpOMS\Business\Finance\Forecasting\GARCH; class GARCHTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Business/Finance/Forecasting/MATest.php b/tests/Business/Finance/Forecasting/MATest.php index 967ef1996..f6eb204f7 100644 --- a/tests/Business/Finance/Forecasting/MATest.php +++ b/tests/Business/Finance/Forecasting/MATest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Business\Finance\Forecasting; - use phpOMS\Business\Finance\Forecasting\MA; class MATest extends \PHPUnit\Framework\TestCase diff --git a/tests/Business/Finance/Forecasting/NARTest.php b/tests/Business/Finance/Forecasting/NARTest.php index be1725d1c..039f7d32e 100644 --- a/tests/Business/Finance/Forecasting/NARTest.php +++ b/tests/Business/Finance/Forecasting/NARTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Business\Finance\Forecasting; - use phpOMS\Business\Finance\Forecasting\NAR; class NARTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Business/Finance/Forecasting/NMATest.php b/tests/Business/Finance/Forecasting/NMATest.php index 6c86c64e8..08d2a2a75 100644 --- a/tests/Business/Finance/Forecasting/NMATest.php +++ b/tests/Business/Finance/Forecasting/NMATest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Business\Finance\Forecasting; - use phpOMS\Business\Finance\Forecasting\NMA; class NMATest extends \PHPUnit\Framework\TestCase diff --git a/tests/Business/Finance/Forecasting/SARIMATest.php b/tests/Business/Finance/Forecasting/SARIMATest.php index 97e61a521..4fc184ddd 100644 --- a/tests/Business/Finance/Forecasting/SARIMATest.php +++ b/tests/Business/Finance/Forecasting/SARIMATest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Business\Finance\Forecasting; - use phpOMS\Business\Finance\Forecasting\SARIMA; class SARIMATest extends \PHPUnit\Framework\TestCase diff --git a/tests/Business/Finance/Forecasting/SmoothingTypeTest.php b/tests/Business/Finance/Forecasting/SmoothingTypeTest.php index 3c0e48aaa..bbd43eaad 100644 --- a/tests/Business/Finance/Forecasting/SmoothingTypeTest.php +++ b/tests/Business/Finance/Forecasting/SmoothingTypeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Business\Finance\Forecasting; - use phpOMS\Business\Finance\Forecasting\SmoothingType; class SmoothingTypeTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Business/Finance/LoanTest.php b/tests/Business/Finance/LoanTest.php index d000e55dc..60698dfc0 100644 --- a/tests/Business/Finance/LoanTest.php +++ b/tests/Business/Finance/LoanTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Business\Finance; - use phpOMS\Business\Finance\Loan; class LoanTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Business/Finance/LorenzkurveTest.php b/tests/Business/Finance/LorenzkurveTest.php index 990b75f73..1b0c85a15 100644 --- a/tests/Business/Finance/LorenzkurveTest.php +++ b/tests/Business/Finance/LorenzkurveTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Business\Finance; - use phpOMS\Business\Finance\Lorenzkurve; class LorenzkurveTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Business/Finance/StockBondsTest.php b/tests/Business/Finance/StockBondsTest.php index 270dbba3b..942f9f34a 100644 --- a/tests/Business/Finance/StockBondsTest.php +++ b/tests/Business/Finance/StockBondsTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Business\Finance; - use phpOMS\Business\Finance\StockBonds; class StockBondsTest extends \PHPUnit\Framework\TestCase @@ -45,7 +44,7 @@ class StockBondsTest extends \PHPUnit\Framework\TestCase public function testCapitalGainsYield() { - self::assertEquals(0.1, StockBonds::getCapitalGainsYield(100, 110), '', 0.01); + self::assertEquals(0.1, StockBonds::getCapitalGainsYield(100, 110), '', 0.01); } public function testDilutedEarningsPerShare() diff --git a/tests/Business/Marketing/MetricsTest.php b/tests/Business/Marketing/MetricsTest.php index 3d8c15088..aa7c31d41 100644 --- a/tests/Business/Marketing/MetricsTest.php +++ b/tests/Business/Marketing/MetricsTest.php @@ -13,7 +13,6 @@ namespace phpOMS\tests\Business\Marketing; - use phpOMS\Business\Marketing\Metrics; class MetricsTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Business/Marketing/NetPromoterScoreTest.php b/tests/Business/Marketing/NetPromoterScoreTest.php index 0484eae62..79d31d789 100644 --- a/tests/Business/Marketing/NetPromoterScoreTest.php +++ b/tests/Business/Marketing/NetPromoterScoreTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Business\Marketing; - use phpOMS\Business\Marketing\NetPromoterScore; class NetPromoterScoreTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Business/Programming/MetricsTest.php b/tests/Business/Programming/MetricsTest.php index 0e0c5005d..011034c8a 100644 --- a/tests/Business/Programming/MetricsTest.php +++ b/tests/Business/Programming/MetricsTest.php @@ -13,7 +13,6 @@ namespace phpOMS\tests\Business\Programming; - use phpOMS\Business\Programming\Metrics; class MetricsTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Business/Sales/MarketShareEstimationTest.php b/tests/Business/Sales/MarketShareEstimationTest.php index 37a121873..46bcaf311 100644 --- a/tests/Business/Sales/MarketShareEstimationTest.php +++ b/tests/Business/Sales/MarketShareEstimationTest.php @@ -15,7 +15,6 @@ namespace phpOMS\tests\Business\Sales; use phpOMS\Business\Sales\MarketShareEstimation; - class MarketShareEstimationTest extends \PHPUnit\Framework\TestCase { public function testZipfRank() diff --git a/tests/DataStorage/Cache/CacheFactoryTest.php b/tests/DataStorage/Cache/CacheFactoryTest.php index 49e0d60bb..165ce6dd3 100644 --- a/tests/DataStorage/Cache/CacheFactoryTest.php +++ b/tests/DataStorage/Cache/CacheFactoryTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Cache; - use phpOMS\DataStorage\Cache\CacheFactory; class CacheFactoryTest extends \PHPUnit\Framework\TestCase @@ -22,7 +21,7 @@ class CacheFactoryTest extends \PHPUnit\Framework\TestCase public function testCreate() { self::assertInstanceOf( - \phpOMS\DataStorage\Cache\FileCache::class, + \phpOMS\DataStorage\Cache\FileCache::class, CacheFactory::create(['type' => 'file', 'path' => 'Cache']) ); } diff --git a/tests/DataStorage/Cache/CachePoolTest.php b/tests/DataStorage/Cache/CachePoolTest.php index 6b873e498..981556d0f 100644 --- a/tests/DataStorage/Cache/CachePoolTest.php +++ b/tests/DataStorage/Cache/CachePoolTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Cache; - use phpOMS\DataStorage\Cache\CachePool; use phpOMS\DataStorage\Cache\FileCache; diff --git a/tests/DataStorage/Cache/CacheStatusTest.php b/tests/DataStorage/Cache/CacheStatusTest.php index 25687dd38..f27a1b3f1 100644 --- a/tests/DataStorage/Cache/CacheStatusTest.php +++ b/tests/DataStorage/Cache/CacheStatusTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Cache; - use phpOMS\DataStorage\Cache\CacheStatus; class CacheStatusTest extends \PHPUnit\Framework\TestCase diff --git a/tests/DataStorage/Cache/CacheTypeTest.php b/tests/DataStorage/Cache/CacheTypeTest.php index dc62bbf52..62e52687b 100644 --- a/tests/DataStorage/Cache/CacheTypeTest.php +++ b/tests/DataStorage/Cache/CacheTypeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Cache; - use phpOMS\DataStorage\Cache\CacheType; class CacheTypeTest extends \PHPUnit\Framework\TestCase diff --git a/tests/DataStorage/Cache/NullCacheTest.php b/tests/DataStorage/Cache/NullCacheTest.php index 1eb69c7f6..196044121 100644 --- a/tests/DataStorage/Cache/NullCacheTest.php +++ b/tests/DataStorage/Cache/NullCacheTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Cache; - use phpOMS\DataStorage\Cache\NullCache; class NullCacheTest extends \PHPUnit\Framework\TestCase diff --git a/tests/DataStorage/Cookie/CookieJarTest.php b/tests/DataStorage/Cookie/CookieJarTest.php index 6ac38b8a8..ee711c291 100644 --- a/tests/DataStorage/Cookie/CookieJarTest.php +++ b/tests/DataStorage/Cookie/CookieJarTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Cookie; - use phpOMS\DataStorage\Cookie\CookieJar; use phpOMS\DataStorage\LockException; diff --git a/tests/DataStorage/Database/Connection/ConnectionFactoryTest.php b/tests/DataStorage/Database/Connection/ConnectionFactoryTest.php index 571870f75..10bfb72bd 100644 --- a/tests/DataStorage/Database/Connection/ConnectionFactoryTest.php +++ b/tests/DataStorage/Database/Connection/ConnectionFactoryTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Database\Connection; - use phpOMS\DataStorage\Database\Connection\ConnectionFactory; use phpOMS\DataStorage\Database\Connection\MysqlConnection; @@ -23,7 +22,7 @@ class ConnectionFactoryTest extends \PHPUnit\Framework\TestCase public function testCreate() { self::assertInstanceOf( - MysqlConnection::class, + MysqlConnection::class, ConnectionFactory::create($GLOBALS['CONFIG']['db']['core']['masters']['admin']) ); } diff --git a/tests/DataStorage/Database/Connection/MysqlConnectionTest.php b/tests/DataStorage/Database/Connection/MysqlConnectionTest.php index 9c6a910d1..bd4cccb3a 100644 --- a/tests/DataStorage/Database/Connection/MysqlConnectionTest.php +++ b/tests/DataStorage/Database/Connection/MysqlConnectionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Database\Connection; - use phpOMS\DataStorage\Database\Connection\MysqlConnection; use phpOMS\DataStorage\Database\DatabaseStatus; @@ -29,7 +28,7 @@ class MysqlConnectionTest extends \PHPUnit\Framework\TestCase self::assertEquals($GLOBALS['CONFIG']['db']['core']['masters']['admin']['host'], $mysql->getHost()); self::assertEquals((int) $GLOBALS['CONFIG']['db']['core']['masters']['admin']['port'], $mysql->getPort()); self::assertInstanceOf('\phpOMS\DataStorage\Database\Query\Grammar\MysqlGrammar', $mysql->getGrammar()); - + } /** diff --git a/tests/DataStorage/Database/Connection/PostgresConnectionTest.php b/tests/DataStorage/Database/Connection/PostgresConnectionTest.php index 4a15e86ff..cb7302fe1 100644 --- a/tests/DataStorage/Database/Connection/PostgresConnectionTest.php +++ b/tests/DataStorage/Database/Connection/PostgresConnectionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Database\Connection; - use phpOMS\DataStorage\Database\Connection\PostgresConnection; class PostgresConnectionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/DataStorage/Database/Connection/SQLiteConnectionTest.php b/tests/DataStorage/Database/Connection/SQLiteConnectionTest.php index 3239fd50b..ef5bc7b67 100644 --- a/tests/DataStorage/Database/Connection/SQLiteConnectionTest.php +++ b/tests/DataStorage/Database/Connection/SQLiteConnectionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Database\Connection; - use phpOMS\DataStorage\Database\Connection\SQLiteConnection; class SQLiteConnectionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/DataStorage/Database/Connection/SqlServerConnectionTest.php b/tests/DataStorage/Database/Connection/SqlServerConnectionTest.php index 374af8772..d4ec8f495 100644 --- a/tests/DataStorage/Database/Connection/SqlServerConnectionTest.php +++ b/tests/DataStorage/Database/Connection/SqlServerConnectionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Database\Connection; - use phpOMS\DataStorage\Database\Connection\SqlServerConnection; class SqlServerConnectionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/DataStorage/Database/DataMapperAbstractTest.php b/tests/DataStorage/Database/DataMapperAbstractTest.php index 5c244103f..ca58963a2 100644 --- a/tests/DataStorage/Database/DataMapperAbstractTest.php +++ b/tests/DataStorage/Database/DataMapperAbstractTest.php @@ -22,7 +22,6 @@ use phpOMS\tests\DataStorage\Database\TestModel\BaseModel; use phpOMS\tests\DataStorage\Database\TestModel\BaseModelMapper; - class DataMapperAbstractTest extends \PHPUnit\Framework\TestCase { protected $model = null; diff --git a/tests/DataStorage/Database/DatabaseExceptionFactoryTest.php b/tests/DataStorage/Database/DatabaseExceptionFactoryTest.php index 7fd60b4ac..b5b71d084 100644 --- a/tests/DataStorage/Database/DatabaseExceptionFactoryTest.php +++ b/tests/DataStorage/Database/DatabaseExceptionFactoryTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Database; - use phpOMS\DataStorage\Database\DatabaseExceptionFactory; class DatabaseExceptionFactoryTest extends \PHPUnit\Framework\TestCase diff --git a/tests/DataStorage/Database/DatabasePoolTest.php b/tests/DataStorage/Database/DatabasePoolTest.php index c13b7bf76..2a461721f 100644 --- a/tests/DataStorage/Database/DatabasePoolTest.php +++ b/tests/DataStorage/Database/DatabasePoolTest.php @@ -19,7 +19,6 @@ use phpOMS\DataStorage\Database\DatabaseStatus; use phpOMS\DataStorage\Database\DatabasePool; - class DatabasePoolTest extends \PHPUnit\Framework\TestCase { public function testBasicConnection() diff --git a/tests/DataStorage/Database/DatabaseStatusTest.php b/tests/DataStorage/Database/DatabaseStatusTest.php index cb66910dc..9347837ed 100644 --- a/tests/DataStorage/Database/DatabaseStatusTest.php +++ b/tests/DataStorage/Database/DatabaseStatusTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Database; - use phpOMS\DataStorage\Database\DatabaseStatus; class DatabaseStatusTest extends \PHPUnit\Framework\TestCase diff --git a/tests/DataStorage/Database/DatabaseTypeTest.php b/tests/DataStorage/Database/DatabaseTypeTest.php index 51124273d..9df56b54d 100644 --- a/tests/DataStorage/Database/DatabaseTypeTest.php +++ b/tests/DataStorage/Database/DatabaseTypeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Database; - use phpOMS\DataStorage\Database\DatabaseType; class DatabaseTypeTest extends \PHPUnit\Framework\TestCase diff --git a/tests/DataStorage/Database/Exception/InvalidConnectionConfigExceptionTest.php b/tests/DataStorage/Database/Exception/InvalidConnectionConfigExceptionTest.php index 1c634f3e4..8ec57914c 100644 --- a/tests/DataStorage/Database/Exception/InvalidConnectionConfigExceptionTest.php +++ b/tests/DataStorage/Database/Exception/InvalidConnectionConfigExceptionTest.php @@ -13,7 +13,6 @@ namespace phpOMS\tests\DataStorage\Database\Exception; - use phpOMS\DataStorage\Database\Exception\InvalidConnectionConfigException; class InvalidConnectionConfigExceptionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/DataStorage/Database/Exception/InvalidMapperExceptionTest.php b/tests/DataStorage/Database/Exception/InvalidMapperExceptionTest.php index 283d3cc84..1331db245 100644 --- a/tests/DataStorage/Database/Exception/InvalidMapperExceptionTest.php +++ b/tests/DataStorage/Database/Exception/InvalidMapperExceptionTest.php @@ -13,7 +13,6 @@ namespace phpOMS\tests\DataStorage\Database\Exception; - use phpOMS\DataStorage\Database\Exception\InvalidMapperException; class InvalidMapperExceptionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/DataStorage/Database/Query/BuilderTest.php b/tests/DataStorage/Database/Query/BuilderTest.php index b0e7d2bd5..27e15f306 100644 --- a/tests/DataStorage/Database/Query/BuilderTest.php +++ b/tests/DataStorage/Database/Query/BuilderTest.php @@ -56,7 +56,7 @@ class BuilderTest extends \PHPUnit\Framework\TestCase $query = new Builder($this->con); $sql = 'SELECT `a`.`test`, `b`.`test` FROM `a`, `b` WHERE `a`.`test` = \'abc\' ORDER BY `a`.`test` ASC, `b`.`test` DESC;'; - self::assertEquals($sql, + self::assertEquals($sql, $query->select('a.test', 'b.test') ->from('a', 'b') ->where('a.test', '=', 'abc') @@ -112,7 +112,7 @@ class BuilderTest extends \PHPUnit\Framework\TestCase $query = new Builder($this->con); $sql = 'SELECT `a`.`test` FROM `a` WHERE `a`.`test` = 1 GROUP BY `a`, `b`;'; self::assertEquals($sql, $query->select('a.test')->from('a')->where('a.test', '=', 1)->groupBy('a')->groupBy('b')->toSql()); - + $query = new Builder($this->con); self::assertEquals($sql, $query->select('a.test')->from('a')->where('a.test', '=', 1)->groupBy('a', 'b')->toSql()); } @@ -211,7 +211,7 @@ class BuilderTest extends \PHPUnit\Framework\TestCase $query = new Builder($this->con, true); $query->raw('DROP DATABASE oms;'); } - + /** * @expectedException \Exception */ @@ -229,7 +229,7 @@ class BuilderTest extends \PHPUnit\Framework\TestCase $query = new Builder($this->con, true); $query->update(); } - + /** * @expectedException \Exception */ diff --git a/tests/DataStorage/Database/Query/ColumnTest.php b/tests/DataStorage/Database/Query/ColumnTest.php index 420db7049..b7fe3b694 100644 --- a/tests/DataStorage/Database/Query/ColumnTest.php +++ b/tests/DataStorage/Database/Query/ColumnTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Database\Query; - use phpOMS\DataStorage\Database\Query\Column; class ColumnTest extends \PHPUnit\Framework\TestCase diff --git a/tests/DataStorage/Database/Query/CountTest.php b/tests/DataStorage/Database/Query/CountTest.php index da3292847..96af65bad 100644 --- a/tests/DataStorage/Database/Query/CountTest.php +++ b/tests/DataStorage/Database/Query/CountTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Database\Query; - use phpOMS\DataStorage\Database\Query\Count; class CountTest extends \PHPUnit\Framework\TestCase diff --git a/tests/DataStorage/Database/Query/ExpressionTest.php b/tests/DataStorage/Database/Query/ExpressionTest.php index 03f709090..b04a4f72b 100644 --- a/tests/DataStorage/Database/Query/ExpressionTest.php +++ b/tests/DataStorage/Database/Query/ExpressionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Database\Query; - use phpOMS\DataStorage\Database\Query\Expression; class ExpressionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/DataStorage/Database/Query/FromTest.php b/tests/DataStorage/Database/Query/FromTest.php index b33095ecb..8ee74fb35 100644 --- a/tests/DataStorage/Database/Query/FromTest.php +++ b/tests/DataStorage/Database/Query/FromTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Database\Query; - use phpOMS\DataStorage\Database\Query\From; class FromTest extends \PHPUnit\Framework\TestCase diff --git a/tests/DataStorage/Database/Query/Grammar/GrammarTest.php b/tests/DataStorage/Database/Query/Grammar/GrammarTest.php index 22eeed786..7e98a8772 100644 --- a/tests/DataStorage/Database/Query/Grammar/GrammarTest.php +++ b/tests/DataStorage/Database/Query/Grammar/GrammarTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Database\Query\Grammar; - use phpOMS\DataStorage\Database\Query\Grammar\Grammar; class GrammarTest extends \PHPUnit\Framework\TestCase diff --git a/tests/DataStorage/Database/Query/Grammar/MicrosoftGrammarTest.php b/tests/DataStorage/Database/Query/Grammar/MicrosoftGrammarTest.php index 7e37cfad9..759f32cac 100644 --- a/tests/DataStorage/Database/Query/Grammar/MicrosoftGrammarTest.php +++ b/tests/DataStorage/Database/Query/Grammar/MicrosoftGrammarTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Database\Query\Grammar; - use phpOMS\DataStorage\Database\Query\Grammar\MicrosoftGrammar; class MicrosoftGrammarTest extends \PHPUnit\Framework\TestCase diff --git a/tests/DataStorage/Database/Query/Grammar/MysqlGrammarTest.php b/tests/DataStorage/Database/Query/Grammar/MysqlGrammarTest.php index 1a9faa53c..4e349f53e 100644 --- a/tests/DataStorage/Database/Query/Grammar/MysqlGrammarTest.php +++ b/tests/DataStorage/Database/Query/Grammar/MysqlGrammarTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Database\Query\Grammar; - use phpOMS\DataStorage\Database\Query\Grammar\MysqlGrammar; use phpOMS\Utils\TestUtils; diff --git a/tests/DataStorage/Database/Query/Grammar/OracleGrammarTest.php b/tests/DataStorage/Database/Query/Grammar/OracleGrammarTest.php index 002dd769b..47a3bc149 100644 --- a/tests/DataStorage/Database/Query/Grammar/OracleGrammarTest.php +++ b/tests/DataStorage/Database/Query/Grammar/OracleGrammarTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Database\Query\Grammar; - use phpOMS\DataStorage\Database\Query\Grammar\OracleGrammar; use phpOMS\Utils\TestUtils; diff --git a/tests/DataStorage/Database/Query/Grammar/PostgresGrammarTest.php b/tests/DataStorage/Database/Query/Grammar/PostgresGrammarTest.php index 90e1de4a1..d1dd45110 100644 --- a/tests/DataStorage/Database/Query/Grammar/PostgresGrammarTest.php +++ b/tests/DataStorage/Database/Query/Grammar/PostgresGrammarTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Database\Query\Grammar; - use phpOMS\DataStorage\Database\Query\Grammar\PostgresGrammar; class PostgresGrammarTest extends \PHPUnit\Framework\TestCase diff --git a/tests/DataStorage/Database/Query/Grammar/SQLiteGrammarTest.php b/tests/DataStorage/Database/Query/Grammar/SQLiteGrammarTest.php index 314447c7a..cdd4db84d 100644 --- a/tests/DataStorage/Database/Query/Grammar/SQLiteGrammarTest.php +++ b/tests/DataStorage/Database/Query/Grammar/SQLiteGrammarTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Database\Query\Grammar; - use phpOMS\DataStorage\Database\Query\Grammar\SQLiteGrammar; use phpOMS\Utils\TestUtils; diff --git a/tests/DataStorage/Database/Query/IntoTest.php b/tests/DataStorage/Database/Query/IntoTest.php index e70574328..9bc780507 100644 --- a/tests/DataStorage/Database/Query/IntoTest.php +++ b/tests/DataStorage/Database/Query/IntoTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Database\Query; - use phpOMS\DataStorage\Database\Query\Into; class IntoTest extends \PHPUnit\Framework\TestCase diff --git a/tests/DataStorage/Database/Query/JoinTypeTest.php b/tests/DataStorage/Database/Query/JoinTypeTest.php index 5ad8b668e..c56507431 100644 --- a/tests/DataStorage/Database/Query/JoinTypeTest.php +++ b/tests/DataStorage/Database/Query/JoinTypeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Database\Query; - use phpOMS\DataStorage\Database\Query\JoinType; class JoinTypeTest extends \PHPUnit\Framework\TestCase diff --git a/tests/DataStorage/Database/Query/QueryTypeTest.php b/tests/DataStorage/Database/Query/QueryTypeTest.php index 9aff7e9c1..5f8ab1d0e 100644 --- a/tests/DataStorage/Database/Query/QueryTypeTest.php +++ b/tests/DataStorage/Database/Query/QueryTypeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Database\Query; - use phpOMS\DataStorage\Database\Query\QueryType; class QueryTypeTest extends \PHPUnit\Framework\TestCase @@ -23,7 +22,7 @@ class QueryTypeTest extends \PHPUnit\Framework\TestCase { self::assertEquals(6, count(QueryType::getConstants())); self::assertEquals(QueryType::getConstants(), array_unique(QueryType::getConstants())); - + self::assertEquals(0, QueryType::SELECT); self::assertEquals(1, QueryType::INSERT); self::assertEquals(2, QueryType::UPDATE); diff --git a/tests/DataStorage/Database/Query/SelectTest.php b/tests/DataStorage/Database/Query/SelectTest.php index 1b4c3f69f..b480592cb 100644 --- a/tests/DataStorage/Database/Query/SelectTest.php +++ b/tests/DataStorage/Database/Query/SelectTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Database\Query; - use phpOMS\DataStorage\Database\Query\Select; class SelectTest extends \PHPUnit\Framework\TestCase diff --git a/tests/DataStorage/Database/Query/WhereTest.php b/tests/DataStorage/Database/Query/WhereTest.php index e1fe65bec..4d0828826 100644 --- a/tests/DataStorage/Database/Query/WhereTest.php +++ b/tests/DataStorage/Database/Query/WhereTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Database\Query; - use phpOMS\DataStorage\Database\Query\Where; class WhereTest extends \PHPUnit\Framework\TestCase diff --git a/tests/DataStorage/Database/RelationTypeTest.php b/tests/DataStorage/Database/RelationTypeTest.php index b5bea8f8e..ece676f3b 100644 --- a/tests/DataStorage/Database/RelationTypeTest.php +++ b/tests/DataStorage/Database/RelationTypeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Database; - use phpOMS\DataStorage\Database\RelationType; class RelationTypeTest extends \PHPUnit\Framework\TestCase diff --git a/tests/DataStorage/Database/Schema/BuilderTest.php b/tests/DataStorage/Database/Schema/BuilderTest.php index f7509a381..e344c0d0a 100644 --- a/tests/DataStorage/Database/Schema/BuilderTest.php +++ b/tests/DataStorage/Database/Schema/BuilderTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Database\Schema; - use phpOMS\DataStorage\Database\Schema\Builder; class BuilderTest extends \PHPUnit\Framework\TestCase diff --git a/tests/DataStorage/Database/Schema/Exception/TableExceptionTest.php b/tests/DataStorage/Database/Schema/Exception/TableExceptionTest.php index 6cbc427fc..6695b401c 100644 --- a/tests/DataStorage/Database/Schema/Exception/TableExceptionTest.php +++ b/tests/DataStorage/Database/Schema/Exception/TableExceptionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Database\Schema\Exception; - use phpOMS\DataStorage\Database\Schema\Exception\TableException; class TableExceptionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/DataStorage/Database/Schema/Grammar/GrammarTest.php b/tests/DataStorage/Database/Schema/Grammar/GrammarTest.php index 940233eaf..006031eb9 100644 --- a/tests/DataStorage/Database/Schema/Grammar/GrammarTest.php +++ b/tests/DataStorage/Database/Schema/Grammar/GrammarTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Database\Schema\Grammar; - use phpOMS\DataStorage\Database\Schema\Grammar\Grammar; class GrammarTest extends \PHPUnit\Framework\TestCase diff --git a/tests/DataStorage/Database/Schema/Grammar/MysqlGrammarTest.php b/tests/DataStorage/Database/Schema/Grammar/MysqlGrammarTest.php index bfd84b190..00ed94c4e 100644 --- a/tests/DataStorage/Database/Schema/Grammar/MysqlGrammarTest.php +++ b/tests/DataStorage/Database/Schema/Grammar/MysqlGrammarTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Database\Schema\Grammar; - use phpOMS\DataStorage\Database\Schema\Grammar\MysqlGrammar; class MysqlGrammarTest extends \PHPUnit\Framework\TestCase diff --git a/tests/DataStorage/Database/Schema/Grammar/PostgresGrammarTest.php b/tests/DataStorage/Database/Schema/Grammar/PostgresGrammarTest.php index cd2cd9a66..1279614cc 100644 --- a/tests/DataStorage/Database/Schema/Grammar/PostgresGrammarTest.php +++ b/tests/DataStorage/Database/Schema/Grammar/PostgresGrammarTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Database\Schema\Grammar; - use phpOMS\DataStorage\Database\Schema\Grammar\PostgresGrammar; class PostgresGrammarTest extends \PHPUnit\Framework\TestCase diff --git a/tests/DataStorage/Database/Schema/Grammar/SQLiteGrammarTest.php b/tests/DataStorage/Database/Schema/Grammar/SQLiteGrammarTest.php index 80e18d6f7..c423e3d03 100644 --- a/tests/DataStorage/Database/Schema/Grammar/SQLiteGrammarTest.php +++ b/tests/DataStorage/Database/Schema/Grammar/SQLiteGrammarTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Database\Schema\Grammar; - use phpOMS\DataStorage\Database\Schema\Grammar\SQLiteGrammar; class SQLiteGrammarTest extends \PHPUnit\Framework\TestCase diff --git a/tests/DataStorage/Database/Schema/Grammar/SqlServerGrammarTest.php b/tests/DataStorage/Database/Schema/Grammar/SqlServerGrammarTest.php index e03e42782..7be96e2c8 100644 --- a/tests/DataStorage/Database/Schema/Grammar/SqlServerGrammarTest.php +++ b/tests/DataStorage/Database/Schema/Grammar/SqlServerGrammarTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Database\Schema\Grammar; - use phpOMS\DataStorage\Database\Schema\Grammar\SqlServerGrammar; class SqlServerGrammarTest extends \PHPUnit\Framework\TestCase diff --git a/tests/DataStorage/Database/Schema/QueryTypeTest.php b/tests/DataStorage/Database/Schema/QueryTypeTest.php index 8db1a229f..8de7333d8 100644 --- a/tests/DataStorage/Database/Schema/QueryTypeTest.php +++ b/tests/DataStorage/Database/Schema/QueryTypeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Database\Schema; - use phpOMS\DataStorage\Database\Schema\QueryType; class QueryTypeTest extends \PHPUnit\Framework\TestCase @@ -23,7 +22,7 @@ class QueryTypeTest extends \PHPUnit\Framework\TestCase { self::assertEquals(4, count(QueryType::getConstants())); self::assertEquals(QueryType::getConstants(), array_unique(QueryType::getConstants())); - + self::assertEquals(0, QueryType::SELECT); self::assertEquals(1, QueryType::CREATE); self::assertEquals(2, QueryType::DROP); diff --git a/tests/DataStorage/Database/TestModel/BaseModel.php b/tests/DataStorage/Database/TestModel/BaseModel.php index d357e6682..962fddda8 100644 --- a/tests/DataStorage/Database/TestModel/BaseModel.php +++ b/tests/DataStorage/Database/TestModel/BaseModel.php @@ -17,19 +17,19 @@ namespace phpOMS\tests\DataStorage\Database\TestModel; class BaseModel { public $id = 0; - + public $string = 'Base'; - + public $int = 11; - + public $bool = false; - + public $float = 1.3; - + public $null = null; - + public $datetime = null; - + public $hasManyDirect = []; public $hasManyRelations = []; @@ -37,11 +37,11 @@ class BaseModel public $ownsOneSelf = 0; public $belongsToOne = 0; - + public $serializable = null; - + public $json = [1, 2, 3]; - + public $jsonSerializable = null; public function __construct() diff --git a/tests/DataStorage/Database/TestModel/BaseModelMapper.php b/tests/DataStorage/Database/TestModel/BaseModelMapper.php index 94f472be1..bc09eb3ac 100644 --- a/tests/DataStorage/Database/TestModel/BaseModelMapper.php +++ b/tests/DataStorage/Database/TestModel/BaseModelMapper.php @@ -13,7 +13,6 @@ declare(strict_types = 1); namespace phpOMS\tests\DataStorage\Database\TestModel; - use phpOMS\DataStorage\Database\DataMapperAbstract; use phpOMS\DataStorage\Database\Query\Builder; use phpOMS\DataStorage\Database\Query\Column; @@ -63,7 +62,7 @@ class BaseModelMapper extends DataMapperAbstract 'dst' => 'test_has_many_direct_to', 'src' => null, ], - 'hasManyRelations' => [ + 'hasManyRelations' => [ 'mapper' => ManyToManyRelModelMapper::class, 'table' => 'test_has_many_rel_relations', 'dst' => 'test_has_many_rel_relations_dest', diff --git a/tests/DataStorage/Database/TestModel/BelongsToModel.php b/tests/DataStorage/Database/TestModel/BelongsToModel.php index 9f8193eec..1316e4880 100644 --- a/tests/DataStorage/Database/TestModel/BelongsToModel.php +++ b/tests/DataStorage/Database/TestModel/BelongsToModel.php @@ -14,10 +14,9 @@ namespace phpOMS\tests\DataStorage\Database\TestModel; - class BelongsToModel { public $id = 0; - + public $string = 'BelongsTo'; } \ No newline at end of file diff --git a/tests/DataStorage/Database/TestModel/BelongsToModelMapper.php b/tests/DataStorage/Database/TestModel/BelongsToModelMapper.php index a2dac56c9..b9488d5fc 100644 --- a/tests/DataStorage/Database/TestModel/BelongsToModelMapper.php +++ b/tests/DataStorage/Database/TestModel/BelongsToModelMapper.php @@ -13,7 +13,6 @@ declare(strict_types = 1); namespace phpOMS\tests\DataStorage\Database\TestModel; - use phpOMS\DataStorage\Database\DataMapperAbstract; use phpOMS\DataStorage\Database\Query\Builder; use phpOMS\DataStorage\Database\Query\Column; diff --git a/tests/DataStorage/Database/TestModel/ManyToManyDirectModel.php b/tests/DataStorage/Database/TestModel/ManyToManyDirectModel.php index 03ad8812a..1a3aea986 100644 --- a/tests/DataStorage/Database/TestModel/ManyToManyDirectModel.php +++ b/tests/DataStorage/Database/TestModel/ManyToManyDirectModel.php @@ -14,11 +14,10 @@ namespace phpOMS\tests\DataStorage\Database\TestModel; - class ManyToManyDirectModel { public $id = 0; - + public $string = 'ManyToManyDirect'; public $to = 0; diff --git a/tests/DataStorage/Database/TestModel/ManyToManyDirectModelMapper.php b/tests/DataStorage/Database/TestModel/ManyToManyDirectModelMapper.php index 3441701fd..533996c43 100644 --- a/tests/DataStorage/Database/TestModel/ManyToManyDirectModelMapper.php +++ b/tests/DataStorage/Database/TestModel/ManyToManyDirectModelMapper.php @@ -13,7 +13,6 @@ declare(strict_types = 1); namespace phpOMS\tests\DataStorage\Database\TestModel; - use phpOMS\DataStorage\Database\DataMapperAbstract; use phpOMS\DataStorage\Database\Query\Builder; use phpOMS\DataStorage\Database\Query\Column; diff --git a/tests/DataStorage/Database/TestModel/ManyToManyRelModel.php b/tests/DataStorage/Database/TestModel/ManyToManyRelModel.php index 7e4767ea3..590d276cf 100644 --- a/tests/DataStorage/Database/TestModel/ManyToManyRelModel.php +++ b/tests/DataStorage/Database/TestModel/ManyToManyRelModel.php @@ -14,10 +14,9 @@ namespace phpOMS\tests\DataStorage\Database\TestModel; - class ManyToManyRelModel { public $id = 0; - + public $string = 'ManyToManyRel'; } \ No newline at end of file diff --git a/tests/DataStorage/Database/TestModel/ManyToManyRelModelMapper.php b/tests/DataStorage/Database/TestModel/ManyToManyRelModelMapper.php index e06a3cd74..50227d506 100644 --- a/tests/DataStorage/Database/TestModel/ManyToManyRelModelMapper.php +++ b/tests/DataStorage/Database/TestModel/ManyToManyRelModelMapper.php @@ -13,7 +13,6 @@ declare(strict_types = 1); namespace phpOMS\tests\DataStorage\Database\TestModel; - use phpOMS\DataStorage\Database\DataMapperAbstract; use phpOMS\DataStorage\Database\Query\Builder; use phpOMS\DataStorage\Database\Query\Column; diff --git a/tests/DataStorage/Database/TestModel/NullBaseModel.php b/tests/DataStorage/Database/TestModel/NullBaseModel.php index 173035366..95dcfc498 100644 --- a/tests/DataStorage/Database/TestModel/NullBaseModel.php +++ b/tests/DataStorage/Database/TestModel/NullBaseModel.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Database\TestModel; - class NullBaseModel extends BaseModel { } \ No newline at end of file diff --git a/tests/DataStorage/Database/TestModel/NullBelongsToModel.php b/tests/DataStorage/Database/TestModel/NullBelongsToModel.php index e22521273..a90d69070 100644 --- a/tests/DataStorage/Database/TestModel/NullBelongsToModel.php +++ b/tests/DataStorage/Database/TestModel/NullBelongsToModel.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Database\TestModel; - class NullBelongsToModel extends BelongsToModel { } \ No newline at end of file diff --git a/tests/DataStorage/Database/TestModel/NullManyToManyDirectModel.php b/tests/DataStorage/Database/TestModel/NullManyToManyDirectModel.php index 505548e20..a70dd573c 100644 --- a/tests/DataStorage/Database/TestModel/NullManyToManyDirectModel.php +++ b/tests/DataStorage/Database/TestModel/NullManyToManyDirectModel.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Database\TestModel; - class NullManyToManyDirectModel extends ManyToManyDirectModel { } \ No newline at end of file diff --git a/tests/DataStorage/Database/TestModel/NullManyToManyRelModel.php b/tests/DataStorage/Database/TestModel/NullManyToManyRelModel.php index 9d4a2faed..8fdbc8601 100644 --- a/tests/DataStorage/Database/TestModel/NullManyToManyRelModel.php +++ b/tests/DataStorage/Database/TestModel/NullManyToManyRelModel.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Database\TestModel; - class NullManyToManyRelModel extends ManyToManyRelModel { } \ No newline at end of file diff --git a/tests/DataStorage/Database/TestModel/NullOwnsOneModel.php b/tests/DataStorage/Database/TestModel/NullOwnsOneModel.php index 836f4746f..faf36b35b 100644 --- a/tests/DataStorage/Database/TestModel/NullOwnsOneModel.php +++ b/tests/DataStorage/Database/TestModel/NullOwnsOneModel.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Database\TestModel; - class NullOwnsOneModel extends OwnsOneModel { } \ No newline at end of file diff --git a/tests/DataStorage/Database/TestModel/OwnsOneModel.php b/tests/DataStorage/Database/TestModel/OwnsOneModel.php index 078d44629..a5f00c455 100644 --- a/tests/DataStorage/Database/TestModel/OwnsOneModel.php +++ b/tests/DataStorage/Database/TestModel/OwnsOneModel.php @@ -14,10 +14,9 @@ namespace phpOMS\tests\DataStorage\Database\TestModel; - class OwnsOneModel { public $id = 0; - + public $string = 'OwnsOne'; } \ No newline at end of file diff --git a/tests/DataStorage/Database/TestModel/OwnsOneModelMapper.php b/tests/DataStorage/Database/TestModel/OwnsOneModelMapper.php index 2c3a62e5a..03655fa53 100644 --- a/tests/DataStorage/Database/TestModel/OwnsOneModelMapper.php +++ b/tests/DataStorage/Database/TestModel/OwnsOneModelMapper.php @@ -13,7 +13,6 @@ declare(strict_types = 1); namespace phpOMS\tests\DataStorage\Database\TestModel; - use phpOMS\DataStorage\Database\DataMapperAbstract; use phpOMS\DataStorage\Database\Query\Builder; use phpOMS\DataStorage\Database\Query\Column; diff --git a/tests/DataStorage/Session/ConsoleSessionTest.php b/tests/DataStorage/Session/ConsoleSessionTest.php index 702bfdac4..e1f78f221 100644 --- a/tests/DataStorage/Session/ConsoleSessionTest.php +++ b/tests/DataStorage/Session/ConsoleSessionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Session; - use phpOMS\DataStorage\Session\ConsoleSession; class ConsoleSessionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/DataStorage/Session/HttpSessionTest.php b/tests/DataStorage/Session/HttpSessionTest.php index bd6d433f3..1682f6c17 100644 --- a/tests/DataStorage/Session/HttpSessionTest.php +++ b/tests/DataStorage/Session/HttpSessionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Session; - use phpOMS\DataStorage\Session\HttpSession; class HttpSessionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/DataStorage/Session/SocketSessionTest.php b/tests/DataStorage/Session/SocketSessionTest.php index cae6682b2..9d4401e23 100644 --- a/tests/DataStorage/Session/SocketSessionTest.php +++ b/tests/DataStorage/Session/SocketSessionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Session; - use phpOMS\DataStorage\Session\SocketSession; class SocketSessionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/DataStorage/Web/BuilderTest.php b/tests/DataStorage/Web/BuilderTest.php index 9b0cbfca8..0b0a2bcc3 100644 --- a/tests/DataStorage/Web/BuilderTest.php +++ b/tests/DataStorage/Web/BuilderTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\DataStorage\Web; - use phpOMS\DataStorage\Web\Builder; class BuilderTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Dispatcher/DispatcherTest.php b/tests/Dispatcher/DispatcherTest.php index a76fd5da4..270c91f35 100644 --- a/tests/Dispatcher/DispatcherTest.php +++ b/tests/Dispatcher/DispatcherTest.php @@ -51,8 +51,8 @@ class DispatcherTest extends \PHPUnit\Framework\TestCase self::assertTrue( !empty( $this->app->dispatcher->dispatch( - function($req, $resp, $data = null) { return true; }, - new Request(new Http(''), $localization), + function($req, $resp, $data = null) { return true; }, + new Request(new Http(''), $localization), new Response($localization) ) ) @@ -67,8 +67,8 @@ class DispatcherTest extends \PHPUnit\Framework\TestCase self::assertTrue( !empty( $this->app->dispatcher->dispatch( - 'phpOMS\tests\Dispatcher\TestController:testFunction', - new Request(new Http(''), $localization), + 'phpOMS\tests\Dispatcher\TestController:testFunction', + new Request(new Http(''), $localization), new Response($localization) ) ) @@ -83,8 +83,8 @@ class DispatcherTest extends \PHPUnit\Framework\TestCase self::assertTrue( !empty( $this->app->dispatcher->dispatch( - 'phpOMS\tests\Dispatcher\TestController::testFunctionStatic', - new Request(new Http(''), $localization), + 'phpOMS\tests\Dispatcher\TestController::testFunctionStatic', + new Request(new Http(''), $localization), new Response($localization) ) ) @@ -102,9 +102,9 @@ class DispatcherTest extends \PHPUnit\Framework\TestCase [ function($req, $resp, $data = null) { return true; }, 'phpOMS\tests\Dispatcher\TestController:testFunction', - 'phpOMS\tests\Dispatcher\TestController::testFunctionStatic', - ], - new Request(new Http(''), $localization), + 'phpOMS\tests\Dispatcher\TestController::testFunctionStatic', + ], + new Request(new Http(''), $localization), new Response($localization) ) ) diff --git a/tests/Dispatcher/TestController.php b/tests/Dispatcher/TestController.php index 56745306b..041361105 100644 --- a/tests/Dispatcher/TestController.php +++ b/tests/Dispatcher/TestController.php @@ -15,12 +15,12 @@ namespace phpOMS\tests\Dispatcher; class TestController { - public function testFunction($req, $resp, $data = null) + public function testFunction($req, $resp, $data = null) { return true; } - public static function testFunctionStatic($req, $resp, $data = null) + public static function testFunctionStatic($req, $resp, $data = null) { return true; } diff --git a/tests/Event/EventManagerTest.php b/tests/Event/EventManagerTest.php index d8705eb18..c25fe92ac 100644 --- a/tests/Event/EventManagerTest.php +++ b/tests/Event/EventManagerTest.php @@ -63,7 +63,7 @@ class EventManagerTest extends \PHPUnit\Framework\TestCase self::assertTrue($event->detach('group')); } - public function testDetach() + public function testDetach() { $event = new EventManager(); self::assertTrue($event->attach('group', function() { return true; }, false, true)); diff --git a/tests/Localization/L11nManagerTest.php b/tests/Localization/L11nManagerTest.php index e1bdd2386..cf71c0523 100644 --- a/tests/Localization/L11nManagerTest.php +++ b/tests/Localization/L11nManagerTest.php @@ -86,7 +86,7 @@ class L11nManagerTest extends \PHPUnit\Framework\TestCase $l11nManager2 = new L11nManager(); $l11nManager2->loadLanguageFromFile('en', 'Test', __DIR__ . '/langTestFile.php'); self::assertEquals('value', $l11nManager2->getHtml('en', 'Test', 'RandomThemeDoesNotMatterAlreadyLoaded', 'key')); - + self::assertEquals(['Test' => ['key' => 'value']], $l11nManager2->getModuleLanguage('en')); self::assertEquals(['key' => 'value'], $l11nManager2->getModuleLanguage('en', 'Test')); } diff --git a/tests/Localization/MoneyTest.php b/tests/Localization/MoneyTest.php index 973327664..ac0cc6fe4 100644 --- a/tests/Localization/MoneyTest.php +++ b/tests/Localization/MoneyTest.php @@ -30,11 +30,11 @@ class MoneyTest extends \PHPUnit\Framework\TestCase self::assertObjectHasAttribute('value', $money); self::assertGreaterThan(0, Money::MAX_DECIMALS); - + self::assertEquals(0, $money->getInt()); } - public function testMoney() + public function testMoney() { $money = new Money(12345678); @@ -47,7 +47,7 @@ class MoneyTest extends \PHPUnit\Framework\TestCase self::assertEquals(12345600, Money::toInt('1234,56', '.', ',')); } - public function testMoneySetters() + public function testMoneySetters() { $money = new Money(12345678); self::assertEquals('999.13', $money->setString('999.13')->getAmount()); @@ -56,7 +56,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() { $money = new Money('999.23'); self::assertEquals(9992300, $money->serialize()); diff --git a/tests/Localization/langTestFile.php b/tests/Localization/langTestFile.php index f1aac57e9..09dd142bb 100644 --- a/tests/Localization/langTestFile.php +++ b/tests/Localization/langTestFile.php @@ -1,4 +1,4 @@ - [ 'key' => 'value' diff --git a/tests/Log/FileLoggerTest.php b/tests/Log/FileLoggerTest.php index f321c3a45..50bfa57ed 100644 --- a/tests/Log/FileLoggerTest.php +++ b/tests/Log/FileLoggerTest.php @@ -167,5 +167,5 @@ class FileLoggerTest extends \PHPUnit\Framework\TestCase unlink(__DIR__ . '/' . date('Y-m-d') . '.log'); } } - + } diff --git a/tests/Math/Differential/FiniteDifferenceTest.php b/tests/Math/Differential/FiniteDifferenceTest.php index ff56934fb..aa772590a 100644 --- a/tests/Math/Differential/FiniteDifferenceTest.php +++ b/tests/Math/Differential/FiniteDifferenceTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Differential; - use phpOMS\Math\Differential\FiniteDifference; class FiniteDifferenceTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Exception/ZeroDevisionExceptionTest.php b/tests/Math/Exception/ZeroDevisionExceptionTest.php index 68ae04caa..16c3a1181 100644 --- a/tests/Math/Exception/ZeroDevisionExceptionTest.php +++ b/tests/Math/Exception/ZeroDevisionExceptionTest.php @@ -13,7 +13,6 @@ namespace phpOMS\tests\Math\Exception; - use phpOMS\Math\Exception\ZeroDevisionException; class ZeroDevisionExceptionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Functions/FibunacciTest.php b/tests/Math/Functions/FibunacciTest.php index 2f9038454..ca71ad05c 100644 --- a/tests/Math/Functions/FibunacciTest.php +++ b/tests/Math/Functions/FibunacciTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Functions; - use phpOMS\Math\Functions\Fibunacci; class FibunacciTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Functions/FunctionsTest.php b/tests/Math/Functions/FunctionsTest.php index 8fc74c5e4..ed3efcb15 100644 --- a/tests/Math/Functions/FunctionsTest.php +++ b/tests/Math/Functions/FunctionsTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Functions; - use phpOMS\Math\Functions\Functions; class FunctionsTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Geometry/ConvexHull/MonotoneChainTest.php b/tests/Math/Geometry/ConvexHull/MonotoneChainTest.php index 94001571f..a16d4bee7 100644 --- a/tests/Math/Geometry/ConvexHull/MonotoneChainTest.php +++ b/tests/Math/Geometry/ConvexHull/MonotoneChainTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Geometry\ConvexHull; - use phpOMS\Math\Geometry\ConvexHull\MonotoneChain; class MonotoneChainTest extends \PHPUnit\Framework\TestCase @@ -34,8 +33,8 @@ class MonotoneChainTest extends \PHPUnit\Framework\TestCase ['x' => 0, 'y' => 0], ['x' => 9, 'y' => 0], ['x' => 9, 'y' => 9], - ['x' => 0, 'y' => 9], - ], + ['x' => 0, 'y' => 9], + ], MonotoneChain::createConvexHull($points) ); } diff --git a/tests/Math/Geometry/Shape/D2/CircleTest.php b/tests/Math/Geometry/Shape/D2/CircleTest.php index 5e9c3dcaa..20e7d03fc 100644 --- a/tests/Math/Geometry/Shape/D2/CircleTest.php +++ b/tests/Math/Geometry/Shape/D2/CircleTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Shape\D2; - use phpOMS\Math\Geometry\Shape\D2\Circle; class CircleTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Geometry/Shape/D2/EllipseTest.php b/tests/Math/Geometry/Shape/D2/EllipseTest.php index eb7c8e72b..e091ff138 100644 --- a/tests/Math/Geometry/Shape/D2/EllipseTest.php +++ b/tests/Math/Geometry/Shape/D2/EllipseTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Shape\D2; - use phpOMS\Math\Geometry\Shape\D2\Ellipse; class EllipseTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Geometry/Shape/D2/PolygonTest.php b/tests/Math/Geometry/Shape/D2/PolygonTest.php index 23940749d..efedab107 100644 --- a/tests/Math/Geometry/Shape/D2/PolygonTest.php +++ b/tests/Math/Geometry/Shape/D2/PolygonTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Shape\D2; - use phpOMS\Math\Geometry\Shape\D2\Polygon; class PolygonTest extends \PHPUnit\Framework\TestCase @@ -22,12 +21,12 @@ class PolygonTest extends \PHPUnit\Framework\TestCase public function testPoint() { $polygon = new Polygon([ - ['x' => 1, 'y' => 1], - ['x' => 1, 'y' => 2], - ['x' => 2, 'y' => 2], - ['x' => 2, 'y' => 1], + ['x' => 1, 'y' => 1], + ['x' => 1, 'y' => 2], + ['x' => 2, 'y' => 2], + ['x' => 2, 'y' => 1], ]); - + self::assertEquals(-1, $polygon->pointInPolygon(['x' => 1.5, 'y' => 1.5])); self::assertEquals(1, $polygon->pointInPolygon(['x' => 4.9, 'y' => 1.2])); self::assertEquals(-1, $polygon->pointInPolygon(['x' => 1.8, 'y' => 1.1])); @@ -56,16 +55,16 @@ class PolygonTest extends \PHPUnit\Framework\TestCase self::assertEquals(360, $polygon->getExteriorAngleSum()); } - public function testPerimeter() + public function testPerimeter() { $polygon = new Polygon([ - ['x' => 2, 'y' => 1], - ['x' => 2, 'y' => 2], - ['x' => 3, 'y' => 3], - ['x' => 4, 'y' => 3], - ['x' => 5, 'y' => 2], - ['x' => 5, 'y' => 1], - ['x' => 4, 'y' => 0], + ['x' => 2, 'y' => 1], + ['x' => 2, 'y' => 2], + ['x' => 3, 'y' => 3], + ['x' => 4, 'y' => 3], + ['x' => 5, 'y' => 2], + ['x' => 5, 'y' => 1], + ['x' => 4, 'y' => 0], ['x' => 3, 'y' => 0], ]); self::assertEquals(9.6568, $polygon->getPerimeter(), '', 0.1); @@ -74,13 +73,13 @@ class PolygonTest extends \PHPUnit\Framework\TestCase public function testArea() { $polygon = new Polygon([ - ['x' => 2, 'y' => 1], - ['x' => 2, 'y' => 2], - ['x' => 3, 'y' => 3], - ['x' => 4, 'y' => 3], - ['x' => 5, 'y' => 2], - ['x' => 5, 'y' => 1], - ['x' => 4, 'y' => 0], + ['x' => 2, 'y' => 1], + ['x' => 2, 'y' => 2], + ['x' => 3, 'y' => 3], + ['x' => 4, 'y' => 3], + ['x' => 5, 'y' => 2], + ['x' => 5, 'y' => 1], + ['x' => 4, 'y' => 0], ['x' => 3, 'y' => 0], ]); self::assertEquals(7, $polygon->getSurface()); @@ -89,13 +88,13 @@ class PolygonTest extends \PHPUnit\Framework\TestCase public function testBarycenter() { $polygon = new Polygon([ - ['x' => 2, 'y' => 1], - ['x' => 2, 'y' => 2], - ['x' => 3, 'y' => 3], - ['x' => 4, 'y' => 3], - ['x' => 5, 'y' => 2], - ['x' => 5, 'y' => 1], - ['x' => 4, 'y' => 0], + ['x' => 2, 'y' => 1], + ['x' => 2, 'y' => 2], + ['x' => 3, 'y' => 3], + ['x' => 4, 'y' => 3], + ['x' => 5, 'y' => 2], + ['x' => 5, 'y' => 1], + ['x' => 4, 'y' => 0], ['x' => 3, 'y' => 0], ]); self::assertEquals(['x' => 3.5, 'y' => 1.5], $polygon->getBarycenter(), '', 0.5); diff --git a/tests/Math/Geometry/Shape/D2/QuadrilateralTest.php b/tests/Math/Geometry/Shape/D2/QuadrilateralTest.php index 7e330fef8..3272c9dd3 100644 --- a/tests/Math/Geometry/Shape/D2/QuadrilateralTest.php +++ b/tests/Math/Geometry/Shape/D2/QuadrilateralTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Shape\D2; - use phpOMS\Math\Geometry\Shape\D2\Quadrilateral; class QuadrilateralTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Geometry/Shape/D2/RectangleTest.php b/tests/Math/Geometry/Shape/D2/RectangleTest.php index 11980571b..11d4c0d31 100644 --- a/tests/Math/Geometry/Shape/D2/RectangleTest.php +++ b/tests/Math/Geometry/Shape/D2/RectangleTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Shape\D2; - use phpOMS\Math\Geometry\Shape\D2\Rectangle; class RectangleTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Geometry/Shape/D2/TrapezoidTest.php b/tests/Math/Geometry/Shape/D2/TrapezoidTest.php index fd5e06e86..3b2cea192 100644 --- a/tests/Math/Geometry/Shape/D2/TrapezoidTest.php +++ b/tests/Math/Geometry/Shape/D2/TrapezoidTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Shape\D2; - use phpOMS\Math\Geometry\Shape\D2\Trapezoid; class TrapezoidTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Geometry/Shape/D2/TriangleTest.php b/tests/Math/Geometry/Shape/D2/TriangleTest.php index 01732a298..f929a45a6 100644 --- a/tests/Math/Geometry/Shape/D2/TriangleTest.php +++ b/tests/Math/Geometry/Shape/D2/TriangleTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Shape\D2; - use phpOMS\Math\Geometry\Shape\D2\Triangle; class TriangleTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Geometry/Shape/D3/ConeTest.php b/tests/Math/Geometry/Shape/D3/ConeTest.php index 9536cadc9..eb2eee8a1 100644 --- a/tests/Math/Geometry/Shape/D3/ConeTest.php +++ b/tests/Math/Geometry/Shape/D3/ConeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Geometry\Shape\D3; - use phpOMS\Math\Geometry\Shape\D3\Cone; class ConeTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Geometry/Shape/D3/CuboidTest.php b/tests/Math/Geometry/Shape/D3/CuboidTest.php index a2a6b8c67..48df9c75c 100644 --- a/tests/Math/Geometry/Shape/D3/CuboidTest.php +++ b/tests/Math/Geometry/Shape/D3/CuboidTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Geometry\Shape\D3; - use phpOMS\Math\Geometry\Shape\D3\Cuboid; class CuboidTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Geometry/Shape/D3/CylinderTest.php b/tests/Math/Geometry/Shape/D3/CylinderTest.php index d2a68148b..4127ee672 100644 --- a/tests/Math/Geometry/Shape/D3/CylinderTest.php +++ b/tests/Math/Geometry/Shape/D3/CylinderTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Geometry\Shape\D3; - use phpOMS\Math\Geometry\Shape\D3\Cylinder; class CylinderTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Geometry/Shape/D3/PrismTest.php b/tests/Math/Geometry/Shape/D3/PrismTest.php index 31df94b94..2ca417e9b 100644 --- a/tests/Math/Geometry/Shape/D3/PrismTest.php +++ b/tests/Math/Geometry/Shape/D3/PrismTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Geometry\Shape\D3; - use phpOMS\Math\Geometry\Shape\D3\Prism; class PrismTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Geometry/Shape/D3/RectangularPyramidTest.php b/tests/Math/Geometry/Shape/D3/RectangularPyramidTest.php index 255f526ba..93ce563af 100644 --- a/tests/Math/Geometry/Shape/D3/RectangularPyramidTest.php +++ b/tests/Math/Geometry/Shape/D3/RectangularPyramidTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Geometry\Shape\D3; - use phpOMS\Math\Geometry\Shape\D3\RectangularPyramid; class RectangularPyramidTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Geometry/Shape/D3/SphereTest.php b/tests/Math/Geometry/Shape/D3/SphereTest.php index 7d4c1582f..98b8c75d6 100644 --- a/tests/Math/Geometry/Shape/D3/SphereTest.php +++ b/tests/Math/Geometry/Shape/D3/SphereTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Geometry\Shape\D3; - use phpOMS\Math\Geometry\Shape\D3\Sphere; class SphereTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Geometry/Shape/D3/TetrahedronTest.php b/tests/Math/Geometry/Shape/D3/TetrahedronTest.php index 91bdd7dc6..6fce1f5ab 100644 --- a/tests/Math/Geometry/Shape/D3/TetrahedronTest.php +++ b/tests/Math/Geometry/Shape/D3/TetrahedronTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Geometry\Shape\D3; - use phpOMS\Math\Geometry\Shape\D3\Tetrahedron; class TetrahedronTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Integral/GaussTest.php b/tests/Math/Integral/GaussTest.php index d5bb3d59d..8276e2cfc 100644 --- a/tests/Math/Integral/GaussTest.php +++ b/tests/Math/Integral/GaussTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Integral; - use phpOMS\Math\Integral\Gauss; class GaussTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Matrix/CholeskyDecompositionTest.php b/tests/Math/Matrix/CholeskyDecompositionTest.php index e3132f1af..29169b61c 100644 --- a/tests/Math/Matrix/CholeskyDecompositionTest.php +++ b/tests/Math/Matrix/CholeskyDecompositionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Matrix; - use phpOMS\Math\Matrix\Matrix; use phpOMS\Math\Matrix\Vector; use phpOMS\Math\Matrix\CholeskyDecomposition; @@ -31,7 +30,7 @@ class CholeskyDecompositionTest extends \PHPUnit\Framework\TestCase ]); $cholesky = new CholeskyDecomposition($A); - + self::assertEquals([ [5, 0, 0], [3, 3, 0], diff --git a/tests/Math/Matrix/Exception/InvalidDimensionExceptionTest.php b/tests/Math/Matrix/Exception/InvalidDimensionExceptionTest.php index 5c53fe5e0..d018a8ecc 100644 --- a/tests/Math/Matrix/Exception/InvalidDimensionExceptionTest.php +++ b/tests/Math/Matrix/Exception/InvalidDimensionExceptionTest.php @@ -13,7 +13,6 @@ namespace phpOMS\tests\Math\Matrix\Exception; - use phpOMS\Math\Matrix\Exception\InvalidDimensionException; class InvalidDimensionExceptionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Matrix/IdentityMatrixTest.php b/tests/Math/Matrix/IdentityMatrixTest.php index 4dd1f4780..c85f21657 100644 --- a/tests/Math/Matrix/IdentityMatrixTest.php +++ b/tests/Math/Matrix/IdentityMatrixTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Matrix; - use phpOMS\Math\Matrix\IdentityMatrix; class IdentityMatrixTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Matrix/InverseTypeTest.php b/tests/Math/Matrix/InverseTypeTest.php index 958c3e70e..92c0b7362 100644 --- a/tests/Math/Matrix/InverseTypeTest.php +++ b/tests/Math/Matrix/InverseTypeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Matrix; - use phpOMS\Math\Matrix\InverseType; class InverseTypeTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Matrix/LUDecompositionTest.php b/tests/Math/Matrix/LUDecompositionTest.php index 9fc9a3c43..220204f01 100644 --- a/tests/Math/Matrix/LUDecompositionTest.php +++ b/tests/Math/Matrix/LUDecompositionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Matrix; - use phpOMS\Math\Matrix\Matrix; use phpOMS\Math\Matrix\Vector; use phpOMS\Math\Matrix\LUDecomposition; @@ -31,13 +30,13 @@ class LUDecompositionTest extends \PHPUnit\Framework\TestCase ]); $lu = new LUDecomposition($B); - + self::assertEquals([ [1, 0, 0], [0.6, 1, 0], [-0.2, 0.375, 1], ], $lu->getL()->toArray(), '', 0.2); - + self::assertEquals([ [25, 15, -5], [0, 8, 3], diff --git a/tests/Math/Matrix/MatrixTest.php b/tests/Math/Matrix/MatrixTest.php index 31fa0488d..f62b893a6 100644 --- a/tests/Math/Matrix/MatrixTest.php +++ b/tests/Math/Matrix/MatrixTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Matrix; - use phpOMS\Math\Matrix\Matrix; class MatrixTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Matrix/VectorTest.php b/tests/Math/Matrix/VectorTest.php index 6a8353453..775f6e2e6 100644 --- a/tests/Math/Matrix/VectorTest.php +++ b/tests/Math/Matrix/VectorTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Matrix; - use phpOMS\Math\Matrix\Vector; class VectorTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Number/ComplexTest.php b/tests/Math/Number/ComplexTest.php index 8b20daab6..9c2c43f75 100644 --- a/tests/Math/Number/ComplexTest.php +++ b/tests/Math/Number/ComplexTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Number; - use phpOMS\Math\Number\Complex; class ComplexTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Number/IntegerTest.php b/tests/Math/Number/IntegerTest.php index 2d3080237..3f969c7f7 100644 --- a/tests/Math/Number/IntegerTest.php +++ b/tests/Math/Number/IntegerTest.php @@ -14,12 +14,11 @@ namespace phpOMS\tests\Math\Number; - use phpOMS\Math\Number\Integer; class IntegerTest extends \PHPUnit\Framework\TestCase { - public function testInteger() + public function testInteger() { self::assertTrue(Integer::isInteger(4)); self::assertFalse(Integer::isInteger(1.0)); diff --git a/tests/Math/Number/NaturalTest.php b/tests/Math/Number/NaturalTest.php index 7a5de31bd..d91fe514b 100644 --- a/tests/Math/Number/NaturalTest.php +++ b/tests/Math/Number/NaturalTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Number; - use phpOMS\Math\Number\Natural; class NaturalTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Number/NumberTypeTest.php b/tests/Math/Number/NumberTypeTest.php index 7657b32d1..a421a821e 100644 --- a/tests/Math/Number/NumberTypeTest.php +++ b/tests/Math/Number/NumberTypeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Number; - use phpOMS\Math\Number\NumberType; class NumberTypeTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Number/NumbersTest.php b/tests/Math/Number/NumbersTest.php index 5768191ce..1feabffcc 100644 --- a/tests/Math/Number/NumbersTest.php +++ b/tests/Math/Number/NumbersTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Number; - use phpOMS\Math\Number\Numbers; class NumbersTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Number/PrimeTest.php b/tests/Math/Number/PrimeTest.php index fcb8b7c5c..379d89809 100644 --- a/tests/Math/Number/PrimeTest.php +++ b/tests/Math/Number/PrimeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Number; - use phpOMS\Math\Number\Prime; class PrimeTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Numerics/Interpolation/CubicSplineInterpolationTest.php b/tests/Math/Numerics/Interpolation/CubicSplineInterpolationTest.php index 2503ce279..30604f593 100644 --- a/tests/Math/Numerics/Interpolation/CubicSplineInterpolationTest.php +++ b/tests/Math/Numerics/Interpolation/CubicSplineInterpolationTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Numerics\Interpolation; - use phpOMS\Math\Numerics\Interpolation\CubicSplineInterpolation; class CubicSplineInterpolationTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Numerics/Interpolation/LinearInterpolationTest.php b/tests/Math/Numerics/Interpolation/LinearInterpolationTest.php index 84de5a7ad..c8795dd34 100644 --- a/tests/Math/Numerics/Interpolation/LinearInterpolationTest.php +++ b/tests/Math/Numerics/Interpolation/LinearInterpolationTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Numerics\Interpolation; - use phpOMS\Math\Numerics\Interpolation\LinearInterpolation; class LinearInterpolationTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Numerics/Interpolation/PolynomialInterpolationTest.php b/tests/Math/Numerics/Interpolation/PolynomialInterpolationTest.php index 413b2dce5..4696d6788 100644 --- a/tests/Math/Numerics/Interpolation/PolynomialInterpolationTest.php +++ b/tests/Math/Numerics/Interpolation/PolynomialInterpolationTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Numerics\Interpolation; - use phpOMS\Math\Numerics\Interpolation\PolynomialInterpolation; class PolynomialInterpolationTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Optimization/AssignmentProblemTest.php b/tests/Math/Optimization/AssignmentProblemTest.php index 8812f8c7b..c15535d95 100644 --- a/tests/Math/Optimization/AssignmentProblemTest.php +++ b/tests/Math/Optimization/AssignmentProblemTest.php @@ -13,7 +13,6 @@ namespace phpOMS\tests\Math\Optimization; - use phpOMS\Math\Optimization\AssignmentProblem; class AssignmentProblemTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Optimization/Graph/DijkstraTest.php b/tests/Math/Optimization/Graph/DijkstraTest.php index 1126e3991..6a89f914c 100644 --- a/tests/Math/Optimization/Graph/DijkstraTest.php +++ b/tests/Math/Optimization/Graph/DijkstraTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Optimization\Graph; - use phpOMS\Math\Optimization\Graph\Dijkstra; class DijkstraTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Optimization/Graph/FloydWarshallTest.php b/tests/Math/Optimization/Graph/FloydWarshallTest.php index 205774c62..59c6ce2d0 100644 --- a/tests/Math/Optimization/Graph/FloydWarshallTest.php +++ b/tests/Math/Optimization/Graph/FloydWarshallTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Optimization\Graph; - use phpOMS\Math\Optimization\Graph\FloydWarshall; class FloydWarshallTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Optimization/Graph/GraphTest.php b/tests/Math/Optimization/Graph/GraphTest.php index c92a4ca45..512445093 100644 --- a/tests/Math/Optimization/Graph/GraphTest.php +++ b/tests/Math/Optimization/Graph/GraphTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Optimization\Graph; - use phpOMS\Math\Optimization\Graph\Graph; class GraphTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Optimization/Graph/NullEdgeTest.php b/tests/Math/Optimization/Graph/NullEdgeTest.php index c6d127505..3739e5bb6 100644 --- a/tests/Math/Optimization/Graph/NullEdgeTest.php +++ b/tests/Math/Optimization/Graph/NullEdgeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Optimization\Graph; - use phpOMS\Math\Optimization\Graph\NullEdge; class NullEdgeTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Optimization/Graph/NullVerticeTest.php b/tests/Math/Optimization/Graph/NullVerticeTest.php index aabfeb716..8268b90e1 100644 --- a/tests/Math/Optimization/Graph/NullVerticeTest.php +++ b/tests/Math/Optimization/Graph/NullVerticeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Optimization\Graph; - use phpOMS\Math\Optimization\Graph\NullVertice; class NullVerticeTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Optimization/Knappsack/BackpackTest.php b/tests/Math/Optimization/Knappsack/BackpackTest.php index 30adb848e..891d34ec5 100644 --- a/tests/Math/Optimization/Knappsack/BackpackTest.php +++ b/tests/Math/Optimization/Knappsack/BackpackTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Optimization\Knappsack; - use phpOMS\Math\Optimization\Knappsack\Backpack; class BackpackTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Optimization/Knappsack/BruteForceTest.php b/tests/Math/Optimization/Knappsack/BruteForceTest.php index 2355b16b6..061be871a 100644 --- a/tests/Math/Optimization/Knappsack/BruteForceTest.php +++ b/tests/Math/Optimization/Knappsack/BruteForceTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Optimization\Knappsack; - use phpOMS\Math\Optimization\Knappsack\BruteForce; class BruteForceTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Optimization/Knappsack/GATest.php b/tests/Math/Optimization/Knappsack/GATest.php index 471c02ff6..ffe0496fa 100644 --- a/tests/Math/Optimization/Knappsack/GATest.php +++ b/tests/Math/Optimization/Knappsack/GATest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Optimization\Knappsack; - use phpOMS\Math\Optimization\Knappsack\GA; class GATest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Optimization/Knappsack/ItemPoolTest.php b/tests/Math/Optimization/Knappsack/ItemPoolTest.php index 2a45248f0..54c190319 100644 --- a/tests/Math/Optimization/Knappsack/ItemPoolTest.php +++ b/tests/Math/Optimization/Knappsack/ItemPoolTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Optimization\Knappsack; - use phpOMS\Math\Optimization\Knappsack\ItemPool; class ItemPoolTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Optimization/Knappsack/ItemTest.php b/tests/Math/Optimization/Knappsack/ItemTest.php index f8d01e2ca..39328d439 100644 --- a/tests/Math/Optimization/Knappsack/ItemTest.php +++ b/tests/Math/Optimization/Knappsack/ItemTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Optimization\Knappsack; - use phpOMS\Math\Optimization\Knappsack\Item; class ItemTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Optimization/Knappsack/PopulationTest.php b/tests/Math/Optimization/Knappsack/PopulationTest.php index 7cbd756fd..78a081ace 100644 --- a/tests/Math/Optimization/Knappsack/PopulationTest.php +++ b/tests/Math/Optimization/Knappsack/PopulationTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Optimization\Knappsack; - use phpOMS\Math\Optimization\Knappsack\Population; class PopulationTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Optimization/ShiftScheduling/BruteForceTest.php b/tests/Math/Optimization/ShiftScheduling/BruteForceTest.php index ada056ed4..4620ef563 100644 --- a/tests/Math/Optimization/ShiftScheduling/BruteForceTest.php +++ b/tests/Math/Optimization/ShiftScheduling/BruteForceTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Optimization\ShiftScheduling; - use phpOMS\Math\Optimization\ShiftScheduling\BruteForce; class BruteForceTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Optimization/ShiftScheduling/GATest.php b/tests/Math/Optimization/ShiftScheduling/GATest.php index 33380c8fd..91d942571 100644 --- a/tests/Math/Optimization/ShiftScheduling/GATest.php +++ b/tests/Math/Optimization/ShiftScheduling/GATest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Optimization\ShiftScheduling; - use phpOMS\Math\Optimization\ShiftScheduling\GA; class GATest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Optimization/ShiftScheduling/PopulationTest.php b/tests/Math/Optimization/ShiftScheduling/PopulationTest.php index 1dcdf77d7..d3f9b5318 100644 --- a/tests/Math/Optimization/ShiftScheduling/PopulationTest.php +++ b/tests/Math/Optimization/ShiftScheduling/PopulationTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Optimization\ShiftScheduling; - use phpOMS\Math\Optimization\ShiftScheduling\Population; class PopulationTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Optimization/ShiftScheduling/WorkdayTest.php b/tests/Math/Optimization/ShiftScheduling/WorkdayTest.php index 090234ede..150ddcadf 100644 --- a/tests/Math/Optimization/ShiftScheduling/WorkdayTest.php +++ b/tests/Math/Optimization/ShiftScheduling/WorkdayTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Optimization\ShiftScheduling; - use phpOMS\Math\Optimization\ShiftScheduling\Workday; class WorkdayTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Optimization/ShiftScheduling/WorkerPoolTest.php b/tests/Math/Optimization/ShiftScheduling/WorkerPoolTest.php index 265268d42..4556507dd 100644 --- a/tests/Math/Optimization/ShiftScheduling/WorkerPoolTest.php +++ b/tests/Math/Optimization/ShiftScheduling/WorkerPoolTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Optimization\ShiftScheduling; - use phpOMS\Math\Optimization\ShiftScheduling\WorkerPool; class WorkerPoolTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Optimization/ShiftScheduling/WorkerTest.php b/tests/Math/Optimization/ShiftScheduling/WorkerTest.php index 9130dfdc9..d38c5f7a9 100644 --- a/tests/Math/Optimization/ShiftScheduling/WorkerTest.php +++ b/tests/Math/Optimization/ShiftScheduling/WorkerTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Optimization\ShiftScheduling; - use phpOMS\Math\Optimization\ShiftScheduling\Worker; class WorkerTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Optimization/TSP/BruteForceTest.php b/tests/Math/Optimization/TSP/BruteForceTest.php index 36e9cf46b..48c9882d6 100644 --- a/tests/Math/Optimization/TSP/BruteForceTest.php +++ b/tests/Math/Optimization/TSP/BruteForceTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Optimization\TSP; - use phpOMS\Math\Optimization\TSP\BruteForce; class BruteForceTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Optimization/TSP/CityPoolTest.php b/tests/Math/Optimization/TSP/CityPoolTest.php index 948cbd76e..df2271b9f 100644 --- a/tests/Math/Optimization/TSP/CityPoolTest.php +++ b/tests/Math/Optimization/TSP/CityPoolTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Optimization\TSP; - use phpOMS\Math\Optimization\TSP\CityPool; class CityPoolTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Optimization/TSP/CityTest.php b/tests/Math/Optimization/TSP/CityTest.php index 3e6da1257..a2758bb9e 100644 --- a/tests/Math/Optimization/TSP/CityTest.php +++ b/tests/Math/Optimization/TSP/CityTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Optimization\TSP; - use phpOMS\Math\Optimization\TSP\City; class CityTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Optimization/TSP/GATest.php b/tests/Math/Optimization/TSP/GATest.php index 89d754e48..d8f88f095 100644 --- a/tests/Math/Optimization/TSP/GATest.php +++ b/tests/Math/Optimization/TSP/GATest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Optimization\TSP; - use phpOMS\Math\Optimization\TSP\GA; use phpOMS\Math\Optimization\TSP\CityPool; use phpOMS\Math\Optimization\TSP\City; diff --git a/tests/Math/Optimization/TSP/PopulationTest.php b/tests/Math/Optimization/TSP/PopulationTest.php index 6ade861ca..a544ca69e 100644 --- a/tests/Math/Optimization/TSP/PopulationTest.php +++ b/tests/Math/Optimization/TSP/PopulationTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Optimization\TSP; - use phpOMS\Math\Optimization\TSP\Population; class PopulationTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Optimization/TSP/TourTest.php b/tests/Math/Optimization/TSP/TourTest.php index 503463901..eb70cdb35 100644 --- a/tests/Math/Optimization/TSP/TourTest.php +++ b/tests/Math/Optimization/TSP/TourTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Optimization\TSP; - use phpOMS\Math\Optimization\TSP\Tour; use phpOMS\Math\Optimization\TSP\CityPool; use phpOMS\Math\Optimization\TSP\City; diff --git a/tests/Math/Optimization/TransportationProblemTest.php b/tests/Math/Optimization/TransportationProblemTest.php index efe62fc51..37b870ed0 100644 --- a/tests/Math/Optimization/TransportationProblemTest.php +++ b/tests/Math/Optimization/TransportationProblemTest.php @@ -13,7 +13,6 @@ namespace phpOMS\tests\Math\Optimization; - use phpOMS\Math\Optimization\TransportationProblem; class TransportationProblemTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Parser/EvaluatorTest.php b/tests/Math/Parser/EvaluatorTest.php index f84e18753..66e6424d3 100644 --- a/tests/Math/Parser/EvaluatorTest.php +++ b/tests/Math/Parser/EvaluatorTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Parser; - use phpOMS\Math\Parser\Evaluator; class EvaluatorTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Statistic/AverageTest.php b/tests/Math/Statistic/AverageTest.php index ec0df5586..c0a3a71b7 100644 --- a/tests/Math/Statistic/AverageTest.php +++ b/tests/Math/Statistic/AverageTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Statistic; - use phpOMS\Math\Statistic\Average; class AverageTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Statistic/BasicTest.php b/tests/Math/Statistic/BasicTest.php index 81cdedea9..f99f4e63a 100644 --- a/tests/Math/Statistic/BasicTest.php +++ b/tests/Math/Statistic/BasicTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Statistic; - use phpOMS\Math\Statistic\Basic; class BasicTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Statistic/CorrelationTest.php b/tests/Math/Statistic/CorrelationTest.php index e4b20270b..a2c3e8fbf 100644 --- a/tests/Math/Statistic/CorrelationTest.php +++ b/tests/Math/Statistic/CorrelationTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Statistic; - use phpOMS\Math\Statistic\Correlation; class CorrelationTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Statistic/Forecast/ErrorTest.php b/tests/Math/Statistic/Forecast/ErrorTest.php index 20239a491..6d30f20fd 100644 --- a/tests/Math/Statistic/Forecast/ErrorTest.php +++ b/tests/Math/Statistic/Forecast/ErrorTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Statistic\Forecast; - use phpOMS\Math\Statistic\Forecast\Error; class ErrorTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Statistic/Forecast/ForecastIntervalMultiplierTest.php b/tests/Math/Statistic/Forecast/ForecastIntervalMultiplierTest.php index a4cea101c..323ef89cc 100644 --- a/tests/Math/Statistic/Forecast/ForecastIntervalMultiplierTest.php +++ b/tests/Math/Statistic/Forecast/ForecastIntervalMultiplierTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Statistic\Forecast; - use phpOMS\Math\Statistic\Forecast\ForecastIntervalMultiplier; class ForecastIntervalMultiplierTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Statistic/Forecast/ForecastsTest.php b/tests/Math/Statistic/Forecast/ForecastsTest.php index 296ec6113..ab958b4bc 100644 --- a/tests/Math/Statistic/Forecast/ForecastsTest.php +++ b/tests/Math/Statistic/Forecast/ForecastsTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Statistic\Forecast; - use phpOMS\Math\Statistic\Forecast\Forecasts; class ForecastsTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Statistic/Forecast/Regression/LevelLevelRegressionTest.php b/tests/Math/Statistic/Forecast/Regression/LevelLevelRegressionTest.php index 2b8070fdb..b649635ea 100644 --- a/tests/Math/Statistic/Forecast/Regression/LevelLevelRegressionTest.php +++ b/tests/Math/Statistic/Forecast/Regression/LevelLevelRegressionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Statistic\Forecast\Regression; - use phpOMS\Math\Statistic\Forecast\Regression\LevelLevelRegression; class LevelLevelRegressionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Statistic/Forecast/Regression/LevelLogRegressionTest.php b/tests/Math/Statistic/Forecast/Regression/LevelLogRegressionTest.php index 0c4f2c340..5169bbec3 100644 --- a/tests/Math/Statistic/Forecast/Regression/LevelLogRegressionTest.php +++ b/tests/Math/Statistic/Forecast/Regression/LevelLogRegressionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Statistic\Forecast\Regression; - use phpOMS\Math\Statistic\Forecast\Regression\LevelLogRegression; class LevelLogRegressionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Statistic/Forecast/Regression/LogLevelRegressionTest.php b/tests/Math/Statistic/Forecast/Regression/LogLevelRegressionTest.php index 38104a6c4..015f0182e 100644 --- a/tests/Math/Statistic/Forecast/Regression/LogLevelRegressionTest.php +++ b/tests/Math/Statistic/Forecast/Regression/LogLevelRegressionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Statistic\Forecast\Regression; - use phpOMS\Math\Statistic\Forecast\Regression\LogLevelRegression; class LogLevelRegressionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Statistic/Forecast/Regression/LogLogRegressionTest.php b/tests/Math/Statistic/Forecast/Regression/LogLogRegressionTest.php index d8fc84dee..2292eb4ae 100644 --- a/tests/Math/Statistic/Forecast/Regression/LogLogRegressionTest.php +++ b/tests/Math/Statistic/Forecast/Regression/LogLogRegressionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Statistic\Forecast\Regression; - use phpOMS\Math\Statistic\Forecast\Regression\LogLogRegression; class LogLogRegressionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Statistic/Forecast/Regression/MultipleLinearRegressionTest.php b/tests/Math/Statistic/Forecast/Regression/MultipleLinearRegressionTest.php index c61584a30..0a6364dfe 100644 --- a/tests/Math/Statistic/Forecast/Regression/MultipleLinearRegressionTest.php +++ b/tests/Math/Statistic/Forecast/Regression/MultipleLinearRegressionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Statistic\Forecast\Regression; - use phpOMS\Math\Statistic\Forecast\Regression\MultipleLinearRegression; class MultipleLinearRegressionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Statistic/MeasureOfDispersionTest.php b/tests/Math/Statistic/MeasureOfDispersionTest.php index ee00cc7e5..22bdcd478 100644 --- a/tests/Math/Statistic/MeasureOfDispersionTest.php +++ b/tests/Math/Statistic/MeasureOfDispersionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Statistic; - use phpOMS\Math\Statistic\MeasureOfDispersion; class MeasureOfDispersionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Stochastic/Distribution/BernoulliDistributionTest.php b/tests/Math/Stochastic/Distribution/BernoulliDistributionTest.php index adefe5586..3ce521d8b 100644 --- a/tests/Math/Stochastic/Distribution/BernoulliDistributionTest.php +++ b/tests/Math/Stochastic/Distribution/BernoulliDistributionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Stochastic\Distribution; - use phpOMS\Math\Stochastic\Distribution\BernoulliDistribution; class BernoulliDistributionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Stochastic/Distribution/BetaDistributionTest.php b/tests/Math/Stochastic/Distribution/BetaDistributionTest.php index 0041c0af8..7786f293b 100644 --- a/tests/Math/Stochastic/Distribution/BetaDistributionTest.php +++ b/tests/Math/Stochastic/Distribution/BetaDistributionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Stochastic\Distribution; - use phpOMS\Math\Stochastic\Distribution\BetaDistribution; class BetaDistributionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Stochastic/Distribution/BinomialDistributionTest.php b/tests/Math/Stochastic/Distribution/BinomialDistributionTest.php index d233c23f3..e8ff03711 100644 --- a/tests/Math/Stochastic/Distribution/BinomialDistributionTest.php +++ b/tests/Math/Stochastic/Distribution/BinomialDistributionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Stochastic\Distribution; - use phpOMS\Math\Stochastic\Distribution\BinomialDistribution; class BinomialDistributionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Stochastic/Distribution/CauchyDistributionTest.php b/tests/Math/Stochastic/Distribution/CauchyDistributionTest.php index 70d0db1be..9ca9f13fe 100644 --- a/tests/Math/Stochastic/Distribution/CauchyDistributionTest.php +++ b/tests/Math/Stochastic/Distribution/CauchyDistributionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Stochastic\Distribution; - use phpOMS\Math\Stochastic\Distribution\CauchyDistribution; class CauchyDistributionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Stochastic/Distribution/ChiSquaredDistributionTest.php b/tests/Math/Stochastic/Distribution/ChiSquaredDistributionTest.php index ec9ad0772..e0508193c 100644 --- a/tests/Math/Stochastic/Distribution/ChiSquaredDistributionTest.php +++ b/tests/Math/Stochastic/Distribution/ChiSquaredDistributionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Stochastic\Distribution; - use phpOMS\Math\Stochastic\Distribution\ChiSquaredDistribution; class ChiSquaredDistributionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Stochastic/Distribution/ExponentialDistributionTest.php b/tests/Math/Stochastic/Distribution/ExponentialDistributionTest.php index 3483628a6..fae14a4f7 100644 --- a/tests/Math/Stochastic/Distribution/ExponentialDistributionTest.php +++ b/tests/Math/Stochastic/Distribution/ExponentialDistributionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Stochastic\Distribution; - use phpOMS\Math\Stochastic\Distribution\ExponentialDistribution; class ExponentialDistributionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Stochastic/Distribution/FDistributionTest.php b/tests/Math/Stochastic/Distribution/FDistributionTest.php index 18c119279..d326c64c5 100644 --- a/tests/Math/Stochastic/Distribution/FDistributionTest.php +++ b/tests/Math/Stochastic/Distribution/FDistributionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Stochastic\Distribution; - use phpOMS\Math\Stochastic\Distribution\FDistribution; class FDistributionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Stochastic/Distribution/GammaDistributionTest.php b/tests/Math/Stochastic/Distribution/GammaDistributionTest.php index a9445de84..59c0a6337 100644 --- a/tests/Math/Stochastic/Distribution/GammaDistributionTest.php +++ b/tests/Math/Stochastic/Distribution/GammaDistributionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Stochastic\Distribution; - use phpOMS\Math\Stochastic\Distribution\GammaDistribution; class GammaDistributionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Stochastic/Distribution/GeometricDistributionTest.php b/tests/Math/Stochastic/Distribution/GeometricDistributionTest.php index c01227e62..830791a9c 100644 --- a/tests/Math/Stochastic/Distribution/GeometricDistributionTest.php +++ b/tests/Math/Stochastic/Distribution/GeometricDistributionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Stochastic\Distribution; - use phpOMS\Math\Stochastic\Distribution\GeometricDistribution; class GeometricDistributionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Stochastic/Distribution/HypergeometricDistributionTest.php b/tests/Math/Stochastic/Distribution/HypergeometricDistributionTest.php index 17c26f61b..f9e26627a 100644 --- a/tests/Math/Stochastic/Distribution/HypergeometricDistributionTest.php +++ b/tests/Math/Stochastic/Distribution/HypergeometricDistributionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Stochastic\Distribution; - use phpOMS\Math\Stochastic\Distribution\HypergeometricDistribution; class HypergeometricDistributionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Stochastic/Distribution/LaplaceDistributionTest.php b/tests/Math/Stochastic/Distribution/LaplaceDistributionTest.php index fa4c26150..6f47817dc 100644 --- a/tests/Math/Stochastic/Distribution/LaplaceDistributionTest.php +++ b/tests/Math/Stochastic/Distribution/LaplaceDistributionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Stochastic\Distribution; - use phpOMS\Math\Stochastic\Distribution\LaplaceDistribution; class LaplaceDistributionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Stochastic/Distribution/LogDistributionTest.php b/tests/Math/Stochastic/Distribution/LogDistributionTest.php index e63a79a0c..861e8eb76 100644 --- a/tests/Math/Stochastic/Distribution/LogDistributionTest.php +++ b/tests/Math/Stochastic/Distribution/LogDistributionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Stochastic\Distribution; - use phpOMS\Math\Stochastic\Distribution\LogDistribution; class LogDistributionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Stochastic/Distribution/LogNormalDistributionTest.php b/tests/Math/Stochastic/Distribution/LogNormalDistributionTest.php index e965c3909..58508df5d 100644 --- a/tests/Math/Stochastic/Distribution/LogNormalDistributionTest.php +++ b/tests/Math/Stochastic/Distribution/LogNormalDistributionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Stochastic\Distribution; - use phpOMS\Math\Stochastic\Distribution\LogNormalDistribution; class LogNormalDistributionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Stochastic/Distribution/LogisticDistributionTest.php b/tests/Math/Stochastic/Distribution/LogisticDistributionTest.php index a6b3de198..c520a5308 100644 --- a/tests/Math/Stochastic/Distribution/LogisticDistributionTest.php +++ b/tests/Math/Stochastic/Distribution/LogisticDistributionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Stochastic\Distribution; - use phpOMS\Math\Stochastic\Distribution\LogisticDistribution; class LogisticDistributionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Stochastic/Distribution/NormalDistributionTest.php b/tests/Math/Stochastic/Distribution/NormalDistributionTest.php index f7bb8c3da..117d862e5 100644 --- a/tests/Math/Stochastic/Distribution/NormalDistributionTest.php +++ b/tests/Math/Stochastic/Distribution/NormalDistributionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Stochastic\Distribution; - use phpOMS\Math\Stochastic\Distribution\NormalDistribution; class NormalDistributionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Stochastic/Distribution/ParetoDistributionTest.php b/tests/Math/Stochastic/Distribution/ParetoDistributionTest.php index f98936fb2..5d18b3491 100644 --- a/tests/Math/Stochastic/Distribution/ParetoDistributionTest.php +++ b/tests/Math/Stochastic/Distribution/ParetoDistributionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Stochastic\Distribution; - use phpOMS\Math\Stochastic\Distribution\ParetoDistribution; class ParetoDistributionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Stochastic/Distribution/PoissonDistributionTest.php b/tests/Math/Stochastic/Distribution/PoissonDistributionTest.php index a516e5dd2..439ab7a4c 100644 --- a/tests/Math/Stochastic/Distribution/PoissonDistributionTest.php +++ b/tests/Math/Stochastic/Distribution/PoissonDistributionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Stochastic\Distribution; - use phpOMS\Math\Stochastic\Distribution\PoissonDistribution; class PoissonDistributionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Stochastic/Distribution/TDistributionTest.php b/tests/Math/Stochastic/Distribution/TDistributionTest.php index 0e7b87feb..a3f1b29f2 100644 --- a/tests/Math/Stochastic/Distribution/TDistributionTest.php +++ b/tests/Math/Stochastic/Distribution/TDistributionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Stochastic\Distribution; - use phpOMS\Math\Stochastic\Distribution\TDistribution; class TDistributionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Stochastic/Distribution/UniformDistributionContinuousTest.php b/tests/Math/Stochastic/Distribution/UniformDistributionContinuousTest.php index e778f4a2d..ada09c520 100644 --- a/tests/Math/Stochastic/Distribution/UniformDistributionContinuousTest.php +++ b/tests/Math/Stochastic/Distribution/UniformDistributionContinuousTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Stochastic\Distribution; - use phpOMS\Math\Stochastic\Distribution\UniformDistributionContinuous; class UniformDistributionContinuousTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Stochastic/Distribution/UniformDistributionDiscreteTest.php b/tests/Math/Stochastic/Distribution/UniformDistributionDiscreteTest.php index 9fe430e41..9c253ced0 100644 --- a/tests/Math/Stochastic/Distribution/UniformDistributionDiscreteTest.php +++ b/tests/Math/Stochastic/Distribution/UniformDistributionDiscreteTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Stochastic\Distribution; - use phpOMS\Math\Stochastic\Distribution\UniformDistributionDiscrete; class UniformDistributionDiscreteTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Stochastic/Distribution/WeibullDistributionTest.php b/tests/Math/Stochastic/Distribution/WeibullDistributionTest.php index aebba985e..9ab686f6c 100644 --- a/tests/Math/Stochastic/Distribution/WeibullDistributionTest.php +++ b/tests/Math/Stochastic/Distribution/WeibullDistributionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Math\Stochastic\Distribution; - use phpOMS\Math\Stochastic\Distribution\WeibullDistribution; class WeibullDistributionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Math/Stochastic/NaiveBayesFilterTest.php b/tests/Math/Stochastic/NaiveBayesFilterTest.php index bb8d95173..37b08adcd 100644 --- a/tests/Math/Stochastic/NaiveBayesFilterTest.php +++ b/tests/Math/Stochastic/NaiveBayesFilterTest.php @@ -13,7 +13,6 @@ namespace phpOMS\tests\Math\Stochastic; - use phpOMS\Math\Stochastic\NaiveBayesFilter; class NaiveBayesFilterTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Message/Http/BrowserTypeTest.php b/tests/Message/Http/BrowserTypeTest.php index 3878f00bd..4fb351531 100644 --- a/tests/Message/Http/BrowserTypeTest.php +++ b/tests/Message/Http/BrowserTypeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Message\Http; - use phpOMS\Message\Http\BrowserType; class BrowserTypeTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Message/Http/HeaderTest.php b/tests/Message/Http/HeaderTest.php index e5225c3eb..6e85ee555 100644 --- a/tests/Message/Http/HeaderTest.php +++ b/tests/Message/Http/HeaderTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Message\Http; - use phpOMS\Message\Http\Header; use phpOMS\Localization\Localization; use phpOMS\Message\Http\RequestStatusCode; @@ -52,7 +51,7 @@ class HeaderTest extends \PHPUnit\Framework\TestCase self::assertTrue($header->set('key', 'header')); self::assertEquals(['header'], $header->get('key')); self::assertTrue($header->has('key')); - + self::assertFalse($header->set('key', 'header2')); self::assertEquals(['header'], $header->get('key')); diff --git a/tests/Message/Http/OSTypeTest.php b/tests/Message/Http/OSTypeTest.php index 028b2f6cc..3caa70519 100644 --- a/tests/Message/Http/OSTypeTest.php +++ b/tests/Message/Http/OSTypeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Message\Http; - use phpOMS\Message\Http\OSType; class OSTypeTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Message/Http/RequestMethodTest.php b/tests/Message/Http/RequestMethodTest.php index c5d6b6bf3..aba988102 100644 --- a/tests/Message/Http/RequestMethodTest.php +++ b/tests/Message/Http/RequestMethodTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Message\Http; - use phpOMS\Message\Http\RequestMethod; class RequestMethodTest extends \PHPUnit\Framework\TestCase @@ -23,7 +22,7 @@ class RequestMethodTest extends \PHPUnit\Framework\TestCase { self::assertEquals(6, count(RequestMethod::getConstants())); self::assertEquals(RequestMethod::getConstants(), array_unique(RequestMethod::getConstants())); - + self::assertEquals('GET', RequestMethod::GET); self::assertEquals('POST', RequestMethod::POST); self::assertEquals('PUT', RequestMethod::PUT); diff --git a/tests/Message/Http/RequestStatusCodeTest.php b/tests/Message/Http/RequestStatusCodeTest.php index c87e7b1c7..b860f8eb3 100644 --- a/tests/Message/Http/RequestStatusCodeTest.php +++ b/tests/Message/Http/RequestStatusCodeTest.php @@ -13,7 +13,6 @@ namespace phpOMS\tests\Message\Http; - use phpOMS\Message\Http\RequestStatusCode; class RequestStatusCodeTest extends \PHPUnit\Framework\TestCase @@ -22,7 +21,7 @@ class RequestStatusCodeTest extends \PHPUnit\Framework\TestCase { self::assertEquals(55, count(RequestStatusCode::getConstants())); self::assertEquals(RequestStatusCode::getConstants(), array_unique(RequestStatusCode::getConstants())); - + self::assertEquals(100, RequestStatusCode::R_100); self::assertEquals(101, RequestStatusCode::R_101); self::assertEquals(102, RequestStatusCode::R_102); diff --git a/tests/Message/Http/RequestStatusTest.php b/tests/Message/Http/RequestStatusTest.php index ae00fbe44..b44866f54 100644 --- a/tests/Message/Http/RequestStatusTest.php +++ b/tests/Message/Http/RequestStatusTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Message\Http; - use phpOMS\Message\Http\RequestStatus; class RequestStatusTest extends \PHPUnit\Framework\TestCase @@ -23,7 +22,7 @@ class RequestStatusTest extends \PHPUnit\Framework\TestCase { self::assertEquals(55, count(RequestStatus::getConstants())); self::assertEquals(RequestStatus::getConstants(), array_unique(RequestStatus::getConstants())); - + self::assertEquals('Continue', RequestStatus::R_100); self::assertEquals('Switching Protocols', RequestStatus::R_101); self::assertEquals('Processing', RequestStatus::R_102); diff --git a/tests/Message/Http/RequestTest.php b/tests/Message/Http/RequestTest.php index 035789787..1b35642b5 100644 --- a/tests/Message/Http/RequestTest.php +++ b/tests/Message/Http/RequestTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Message\Http; - use phpOMS\Message\Http\Request; use phpOMS\Message\Http\Header; use phpOMS\Message\Http\OSType; diff --git a/tests/Message/Http/ResponseTest.php b/tests/Message/Http/ResponseTest.php index 497126005..878c00b62 100644 --- a/tests/Message/Http/ResponseTest.php +++ b/tests/Message/Http/ResponseTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Message\Http; - use phpOMS\Message\Http\Response; use phpOMS\Localization\Localization; diff --git a/tests/Message/Http/RestTest.php b/tests/Message/Http/RestTest.php index bf67b9ef0..ae60c9bce 100644 --- a/tests/Message/Http/RestTest.php +++ b/tests/Message/Http/RestTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Message\Http; - use phpOMS\Message\Http\Rest; use phpOMS\Message\Http\Request; use phpOMS\Message\Http\RequestMethod; diff --git a/tests/Message/Mail/ImapTest.php b/tests/Message/Mail/ImapTest.php index 0dea1cf24..43f40e388 100644 --- a/tests/Message/Mail/ImapTest.php +++ b/tests/Message/Mail/ImapTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Message\Mail; - use phpOMS\Message\Mail\Imap; class ImapTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Message/Mail/MailTest.php b/tests/Message/Mail/MailTest.php index 117ef4f44..5b30d0fba 100644 --- a/tests/Message/Mail/MailTest.php +++ b/tests/Message/Mail/MailTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Message\Mail; - use phpOMS\Message\Mail\Mail; class MailTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Message/Mail/NntpTest.php b/tests/Message/Mail/NntpTest.php index efd201868..f54f50a04 100644 --- a/tests/Message/Mail/NntpTest.php +++ b/tests/Message/Mail/NntpTest.php @@ -13,7 +13,6 @@ namespace phpOMS\tests\Message\Mail; - use phpOMS\Message\Mail\Nntp; class NntpTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Message/Mail/Pop3Test.php b/tests/Message/Mail/Pop3Test.php index 07f6f737d..95d6213c5 100644 --- a/tests/Message/Mail/Pop3Test.php +++ b/tests/Message/Mail/Pop3Test.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Message\Mail; - use phpOMS\Message\Mail\Pop3; class Pop3Test extends \PHPUnit\Framework\TestCase diff --git a/tests/Message/Socket/RequestTest.php b/tests/Message/Socket/RequestTest.php index 4a17e1b99..cb09df3a0 100644 --- a/tests/Message/Socket/RequestTest.php +++ b/tests/Message/Socket/RequestTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Message\Socket; - use phpOMS\Message\Socket\Request; class RequestTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Message/Socket/ResponseTest.php b/tests/Message/Socket/ResponseTest.php index 086402a23..a785a80b2 100644 --- a/tests/Message/Socket/ResponseTest.php +++ b/tests/Message/Socket/ResponseTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Message\Socket; - use phpOMS\Message\Socket\Response; class ResponseTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Model/Html/HeadTest.php b/tests/Model/Html/HeadTest.php index 6bf865250..d94c05e68 100644 --- a/tests/Model/Html/HeadTest.php +++ b/tests/Model/Html/HeadTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Model\Html; - use phpOMS\Model\Html\Head; class HeadTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Model/Html/MetaTest.php b/tests/Model/Html/MetaTest.php index aa95e312e..b7a21e0f8 100644 --- a/tests/Model/Html/MetaTest.php +++ b/tests/Model/Html/MetaTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Model\Html; - use phpOMS\Model\Html\Meta; class MetaTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Module/Exception/InvalidModuleExceptionTest.php b/tests/Module/Exception/InvalidModuleExceptionTest.php index 3a6488c2e..10c0f5ef0 100644 --- a/tests/Module/Exception/InvalidModuleExceptionTest.php +++ b/tests/Module/Exception/InvalidModuleExceptionTest.php @@ -13,7 +13,6 @@ namespace phpOMS\tests\Module\Exception; - use phpOMS\Module\Exception\InvalidModuleException; class InvalidModuleExceptionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Module/Exception/InvalidThemeExceptionTest.php b/tests/Module/Exception/InvalidThemeExceptionTest.php index 60ff14a1a..300718fcc 100644 --- a/tests/Module/Exception/InvalidThemeExceptionTest.php +++ b/tests/Module/Exception/InvalidThemeExceptionTest.php @@ -13,7 +13,6 @@ namespace phpOMS\tests\Module\Exception; - use phpOMS\Module\Exception\InvalidThemeException; class InvalidThemeExceptionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Module/ModuleManagerTest.php b/tests/Module/ModuleManagerTest.php index f20236d9f..9d5924b63 100644 --- a/tests/Module/ModuleManagerTest.php +++ b/tests/Module/ModuleManagerTest.php @@ -36,7 +36,7 @@ class ModuleManagerTest extends \PHPUnit\Framework\TestCase public function testAttributes() { - $moduleManager = new ModuleManager($this->app, __DIR__ . '/../../../../Modules'); + $moduleManager = new ModuleManager($this->app, __DIR__ . '/../../../Modules'); self::assertInstanceOf('\phpOMS\Module\ModuleManager', $moduleManager); self::assertObjectHasAttribute('running', $moduleManager); @@ -48,14 +48,14 @@ class ModuleManagerTest extends \PHPUnit\Framework\TestCase public function testUnknownModuleInit() { - $moduleManager = new ModuleManager($this->app, __DIR__ . '/../../../../Modules'); + $moduleManager = new ModuleManager($this->app, __DIR__ . '/../../../Modules'); $moduleManager->initModule('doesNotExist'); self::assertInstanceOf('\phpOMS\Module\NullModule', $moduleManager->get('doesNotExist')); } public function testUnknownModuleGet() { - $moduleManager = new ModuleManager($this->app, __DIR__ . '/../../../../Modules'); + $moduleManager = new ModuleManager($this->app, __DIR__ . '/../../../Modules'); self::assertInstanceOf('\phpOMS\Module\NullModule', $moduleManager->get('doesNotExist2')); } @@ -64,7 +64,7 @@ class ModuleManagerTest extends \PHPUnit\Framework\TestCase $this->app->router = new Router(); $this->app->dispatcher = new Dispatcher($this->app); - $moduleManager = new ModuleManager($this->app, __DIR__ . '/../../../../Modules'); + $moduleManager = new ModuleManager($this->app, __DIR__ . '/../../../Modules'); $active = $moduleManager->getActiveModules(); $all = $moduleManager->getAllModules(); diff --git a/tests/Router/RouteVerbTest.php b/tests/Router/RouteVerbTest.php index 8bc2fac1b..17185fed7 100644 --- a/tests/Router/RouteVerbTest.php +++ b/tests/Router/RouteVerbTest.php @@ -22,11 +22,11 @@ class RouteVerbTest extends \PHPUnit\Framework\TestCase { public function testEnum() { - self::assertTrue(defined('phpOMS\Router\RouteVerb::GET')); - self::assertTrue(defined('phpOMS\Router\RouteVerb::PUT')); - self::assertTrue(defined('phpOMS\Router\RouteVerb::SET')); - self::assertTrue(defined('phpOMS\Router\RouteVerb::DELETE')); - self::assertTrue(defined('phpOMS\Router\RouteVerb::ANY')); + self::assertTrue(defined('phpOMS\Router\RouteVerb::GET')); + self::assertTrue(defined('phpOMS\Router\RouteVerb::PUT')); + self::assertTrue(defined('phpOMS\Router\RouteVerb::SET')); + self::assertTrue(defined('phpOMS\Router\RouteVerb::DELETE')); + self::assertTrue(defined('phpOMS\Router\RouteVerb::ANY')); } public function testEnumUnique() diff --git a/tests/Router/RouterTest.php b/tests/Router/RouterTest.php index a3f99233c..820d469f1 100644 --- a/tests/Router/RouterTest.php +++ b/tests/Router/RouterTest.php @@ -46,33 +46,33 @@ class RouterTest extends \PHPUnit\Framework\TestCase self::assertTrue($router->importFromFile(__Dir__ . '/routerTestFile.php')); self::assertEquals( - [['dest' => '\Modules\Admin\Controller:viewSettingsGeneral']], + [['dest' => '\Modules\Admin\Controller:viewSettingsGeneral']], $router->route('http://test.com/backend/admin/settings/general/something?test') ); self::assertNotEquals( - [['dest' => '\Modules\Admin\Controller:viewSettingsGeneral']], + [['dest' => '\Modules\Admin\Controller:viewSettingsGeneral']], $router->route('http://test.com/backend/admin/settings/general/something?test', RouteVerb::PUT) ); self::assertNotEquals( - [['dest' => '\Modules\Admin\Controller:viewSettingsGeneral']], + [['dest' => '\Modules\Admin\Controller:viewSettingsGeneral']], $router->route('http://test.com/backends/admin/settings/general/something?test') ); $router->add('^.*/backends/admin/settings/general.*$', 'Controller:test', RouteVerb::GET | RouteVerb::SET); self::assertEquals( - [['dest' => 'Controller:test']], + [['dest' => 'Controller:test']], $router->route('http://test.com/backends/admin/settings/general/something?test', RouteVerb::ANY) ); self::assertEquals( - [['dest' => 'Controller:test']], + [['dest' => 'Controller:test']], $router->route('http://test.com/backends/admin/settings/general/something?test', RouteVerb::SET) ); self::assertEquals( - [['dest' => 'Controller:test']], + [['dest' => 'Controller:test']], $router->route('http://test.com/backends/admin/settings/general/something?test', RouteVerb::GET) ); } diff --git a/tests/Router/routerTestFile.php b/tests/Router/routerTestFile.php index c72f02410..565f6928a 100644 --- a/tests/Router/routerTestFile.php +++ b/tests/Router/routerTestFile.php @@ -1,4 +1,4 @@ - [ 0 => [ diff --git a/tests/Socket/Client/ClientConnectionTest.php b/tests/Socket/Client/ClientConnectionTest.php index 513d695dc..c7c7eb598 100644 --- a/tests/Socket/Client/ClientConnectionTest.php +++ b/tests/Socket/Client/ClientConnectionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Socket\Client; - use phpOMS\Socket\Client\ClientConnection; class ClientConnectionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Socket/Client/ClientTest.php b/tests/Socket/Client/ClientTest.php index ee80a3ac8..f98b1dc65 100644 --- a/tests/Socket/Client/ClientTest.php +++ b/tests/Socket/Client/ClientTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Socket\Client; - use phpOMS\Socket\Client\Client; class ClientTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Socket/Client/NullClientConnectionTest.php b/tests/Socket/Client/NullClientConnectionTest.php index b5b80ab79..90beaf48c 100644 --- a/tests/Socket/Client/NullClientConnectionTest.php +++ b/tests/Socket/Client/NullClientConnectionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Socket\Client; - use phpOMS\Socket\Client\NullClientConnection; class NullClientConnectionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Socket/Packets/HeaderTest.php b/tests/Socket/Packets/HeaderTest.php index 5794abdb5..4e2ac0b74 100644 --- a/tests/Socket/Packets/HeaderTest.php +++ b/tests/Socket/Packets/HeaderTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Socket\Packets; - use phpOMS\Socket\Packets\Header; class HeaderTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Socket/Packets/PacketManagerTest.php b/tests/Socket/Packets/PacketManagerTest.php index 0e59709f8..05884623e 100644 --- a/tests/Socket/Packets/PacketManagerTest.php +++ b/tests/Socket/Packets/PacketManagerTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Socket\Packets; - use phpOMS\Socket\Packets\PacketManager; class PacketManagerTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Socket/Packets/PacketTypeTest.php b/tests/Socket/Packets/PacketTypeTest.php index 5b4059969..20b98cfdf 100644 --- a/tests/Socket/Packets/PacketTypeTest.php +++ b/tests/Socket/Packets/PacketTypeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Socket\Packets; - use phpOMS\Socket\Packets\PacketType; class PacketTypeTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Socket/Server/ClientManagerTest.php b/tests/Socket/Server/ClientManagerTest.php index 57f86c16d..3d192794d 100644 --- a/tests/Socket/Server/ClientManagerTest.php +++ b/tests/Socket/Server/ClientManagerTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Socket\Server; - use phpOMS\Socket\Server\ClientManager; class ClientManagerTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Socket/Server/ServerTest.php b/tests/Socket/Server/ServerTest.php index d8c66e823..1fca351f8 100644 --- a/tests/Socket/Server/ServerTest.php +++ b/tests/Socket/Server/ServerTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Socket\Server; - use phpOMS\Socket\Server\Server; class ServerTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Stdlib/Base/AddressTest.php b/tests/Stdlib/Base/AddressTest.php index 61f3afd4c..fb12dc9b7 100644 --- a/tests/Stdlib/Base/AddressTest.php +++ b/tests/Stdlib/Base/AddressTest.php @@ -17,7 +17,6 @@ namespace phpOMS\tests\Stdlib\Base; use phpOMS\Stdlib\Base\Address; use phpOMS\Stdlib\Base\Location; - class AddressTest extends \PHPUnit\Framework\TestCase { public function testAttributes() diff --git a/tests/Stdlib/Base/AddressTypeTest.php b/tests/Stdlib/Base/AddressTypeTest.php index d0ac3413c..8e3a29ed6 100644 --- a/tests/Stdlib/Base/AddressTypeTest.php +++ b/tests/Stdlib/Base/AddressTypeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Stdlib\Base; - use phpOMS\Stdlib\Base\AddressType; class AddressTypeTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Stdlib/Base/EnumArrayTest.php b/tests/Stdlib/Base/EnumArrayTest.php index 5cca15aa3..bfa657e40 100644 --- a/tests/Stdlib/Base/EnumArrayTest.php +++ b/tests/Stdlib/Base/EnumArrayTest.php @@ -16,7 +16,6 @@ namespace phpOMS\tests\Stdlib\Base; use phpOMS\Stdlib\Base\EnumArray; - final class EnumArrayDemo extends EnumArray { protected static $constants = [ diff --git a/tests/Stdlib/Base/EnumTest.php b/tests/Stdlib/Base/EnumTest.php index c6e23fac9..b74f94274 100644 --- a/tests/Stdlib/Base/EnumTest.php +++ b/tests/Stdlib/Base/EnumTest.php @@ -16,7 +16,6 @@ namespace phpOMS\tests\Stdlib\Base; use phpOMS\Stdlib\Base\Enum; - final class EnumDemo extends Enum { const ENUM1 = 1; diff --git a/tests/Stdlib/Base/Exception/InvalidEnumNameTest.php b/tests/Stdlib/Base/Exception/InvalidEnumNameTest.php index ab2ed0f25..1b1876399 100644 --- a/tests/Stdlib/Base/Exception/InvalidEnumNameTest.php +++ b/tests/Stdlib/Base/Exception/InvalidEnumNameTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Stdlib\Base\Exception; - use phpOMS\Stdlib\Base\Exception\InvalidEnumName; class InvalidEnumNameTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Stdlib/Base/Exception/InvalidEnumValueTest.php b/tests/Stdlib/Base/Exception/InvalidEnumValueTest.php index 869b5c48c..d9c867f79 100644 --- a/tests/Stdlib/Base/Exception/InvalidEnumValueTest.php +++ b/tests/Stdlib/Base/Exception/InvalidEnumValueTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Stdlib\Base\Exception; - use phpOMS\Stdlib\Base\Exception\InvalidEnumValue; class InvalidEnumValueTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Stdlib/Base/IbanTest.php b/tests/Stdlib/Base/IbanTest.php index 41b074c39..362a9e50c 100644 --- a/tests/Stdlib/Base/IbanTest.php +++ b/tests/Stdlib/Base/IbanTest.php @@ -17,7 +17,6 @@ namespace phpOMS\tests\Stdlib\Base; use phpOMS\Stdlib\Base\Iban; use phpOMS\Localization\ISO3166TwoEnum; - class IbanTest extends \PHPUnit\Framework\TestCase { public function testAttributes() diff --git a/tests/Stdlib/Base/LocationTest.php b/tests/Stdlib/Base/LocationTest.php index 8a3832a24..69189a364 100644 --- a/tests/Stdlib/Base/LocationTest.php +++ b/tests/Stdlib/Base/LocationTest.php @@ -17,7 +17,6 @@ namespace phpOMS\tests\Stdlib\Base; use phpOMS\Stdlib\Base\Location; use phpOMS\Stdlib\Base\AddressType; - class LocationTest extends \PHPUnit\Framework\TestCase { public function testAttributes() diff --git a/tests/Stdlib/Base/NullLocationTest.php b/tests/Stdlib/Base/NullLocationTest.php index 63d99d5e2..c725d31a4 100644 --- a/tests/Stdlib/Base/NullLocationTest.php +++ b/tests/Stdlib/Base/NullLocationTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Stdlib\Base; - use phpOMS\Stdlib\Base\NullLocation; class NullLocationTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Stdlib/Base/PhoneTypeTest.php b/tests/Stdlib/Base/PhoneTypeTest.php index c0e6cea23..bc5b67494 100644 --- a/tests/Stdlib/Base/PhoneTypeTest.php +++ b/tests/Stdlib/Base/PhoneTypeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Stdlib\Base; - use phpOMS\Stdlib\Base\PhoneType; class PhoneTypeTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Stdlib/Base/SmartDateTimeTest.php b/tests/Stdlib/Base/SmartDateTimeTest.php index b643f92be..2a08ae45e 100644 --- a/tests/Stdlib/Base/SmartDateTimeTest.php +++ b/tests/Stdlib/Base/SmartDateTimeTest.php @@ -16,7 +16,6 @@ namespace phpOMS\tests\Stdlib\Base; use phpOMS\Stdlib\Base\SmartDateTime; - class SmartDateTimeTest extends \PHPUnit\Framework\TestCase { public function testAttributes() diff --git a/tests/Stdlib/Graph/BinaryTreeTest.php b/tests/Stdlib/Graph/BinaryTreeTest.php index 8bf820c57..994527ebd 100644 --- a/tests/Stdlib/Graph/BinaryTreeTest.php +++ b/tests/Stdlib/Graph/BinaryTreeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Stdlib\Graph; - use phpOMS\Stdlib\Graph\BinaryTree; class BinaryTreeTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Stdlib/Graph/EdgeTest.php b/tests/Stdlib/Graph/EdgeTest.php index 1c7f45ab5..d6b4a078d 100644 --- a/tests/Stdlib/Graph/EdgeTest.php +++ b/tests/Stdlib/Graph/EdgeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Stdlib\Graph; - use phpOMS\Stdlib\Graph\Edge; class EdgeTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Stdlib/Graph/GraphTest.php b/tests/Stdlib/Graph/GraphTest.php index 39c4a22bc..cbb5c3dcd 100644 --- a/tests/Stdlib/Graph/GraphTest.php +++ b/tests/Stdlib/Graph/GraphTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Stdlib\Graph; - use phpOMS\Stdlib\Graph\Graph; class GraphTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Stdlib/Graph/NodeTest.php b/tests/Stdlib/Graph/NodeTest.php index 345178e27..655e86064 100644 --- a/tests/Stdlib/Graph/NodeTest.php +++ b/tests/Stdlib/Graph/NodeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Stdlib\Graph; - use phpOMS\Stdlib\Graph\Node; class NodeTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Stdlib/Graph/TreeTest.php b/tests/Stdlib/Graph/TreeTest.php index dd3778413..bdaccc84e 100644 --- a/tests/Stdlib/Graph/TreeTest.php +++ b/tests/Stdlib/Graph/TreeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Stdlib\Graph; - use phpOMS\Stdlib\Graph\Tree; class TreeTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Stdlib/Map/KeyTypeTest.php b/tests/Stdlib/Map/KeyTypeTest.php index 18ad0742e..44c4c9714 100644 --- a/tests/Stdlib/Map/KeyTypeTest.php +++ b/tests/Stdlib/Map/KeyTypeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Stdlib\Map; - use phpOMS\Stdlib\Map\KeyType; class KeyTypeTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Stdlib/Map/MultiMapTest.php b/tests/Stdlib/Map/MultiMapTest.php index afbd61f88..21e571d8f 100644 --- a/tests/Stdlib/Map/MultiMapTest.php +++ b/tests/Stdlib/Map/MultiMapTest.php @@ -16,7 +16,6 @@ namespace phpOMS\tests\Utils; use phpOMS\Stdlib\Map\MultiMap; - class MultiMapTest extends \PHPUnit\Framework\TestCase { public function testAttributes() diff --git a/tests/Stdlib/Map/OrderTypeTest.php b/tests/Stdlib/Map/OrderTypeTest.php index 85b0743b4..c0876d973 100644 --- a/tests/Stdlib/Map/OrderTypeTest.php +++ b/tests/Stdlib/Map/OrderTypeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Stdlib\Map; - use phpOMS\Stdlib\Map\OrderType; class OrderTypeTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Stdlib/Queue/PriorityModeTest.php b/tests/Stdlib/Queue/PriorityModeTest.php index 7b5b1c1f3..0d6ad1c21 100644 --- a/tests/Stdlib/Queue/PriorityModeTest.php +++ b/tests/Stdlib/Queue/PriorityModeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Stdlib\Queue; - use phpOMS\Stdlib\Queue\PriorityMode; class PriorityModeTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Stdlib/Queue/PriorityQueueTest.php b/tests/Stdlib/Queue/PriorityQueueTest.php index c75c6474b..838413dc6 100644 --- a/tests/Stdlib/Queue/PriorityQueueTest.php +++ b/tests/Stdlib/Queue/PriorityQueueTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Stdlib\Queue; - use phpOMS\Stdlib\Queue\PriorityQueue; class PriorityQueueTest extends \PHPUnit\Framework\TestCase diff --git a/tests/System/File/ContentPutModeTest.php b/tests/System/File/ContentPutModeTest.php index e87ef044f..10e7faf58 100644 --- a/tests/System/File/ContentPutModeTest.php +++ b/tests/System/File/ContentPutModeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\System\File; - use phpOMS\System\File\ContentPutMode; class ContentPutModeTest extends \PHPUnit\Framework\TestCase diff --git a/tests/System/File/ExtensionTypeTest.php b/tests/System/File/ExtensionTypeTest.php index 65606ef5d..bc490f1c4 100644 --- a/tests/System/File/ExtensionTypeTest.php +++ b/tests/System/File/ExtensionTypeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\System\File; - use phpOMS\System\File\ExtensionType; class ExtensionTypeTest extends \PHPUnit\Framework\TestCase diff --git a/tests/System/File/FileUtilsTest.php b/tests/System/File/FileUtilsTest.php index 3ef3ee4e3..0a4b63ecc 100644 --- a/tests/System/File/FileUtilsTest.php +++ b/tests/System/File/FileUtilsTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\System\File; - use phpOMS\System\File\FileUtils; use phpOMS\System\File\ExtensionType; diff --git a/tests/System/File/Ftp/DirectoryTest.php b/tests/System/File/Ftp/DirectoryTest.php index 026d0b5be..0ba5bbcc6 100644 --- a/tests/System/File/Ftp/DirectoryTest.php +++ b/tests/System/File/Ftp/DirectoryTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\System\File\Ftp; - use phpOMS\System\File\Ftp\Directory; use phpOMS\System\File\PathException; diff --git a/tests/System/File/Ftp/FileTest.php b/tests/System/File/Ftp/FileTest.php index 1a3cb9e04..2e8a18126 100644 --- a/tests/System/File/Ftp/FileTest.php +++ b/tests/System/File/Ftp/FileTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\System\File\Ftp; - use phpOMS\System\File\Ftp\File; use phpOMS\System\File\ContentPutMode; use phpOMS\System\File\PathException; diff --git a/tests/System/File/Ftp/FtpStorageTest.php b/tests/System/File/Ftp/FtpStorageTest.php index 9476fd6b7..151006fe6 100644 --- a/tests/System/File/Ftp/FtpStorageTest.php +++ b/tests/System/File/Ftp/FtpStorageTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\System\File\Ftp; - use phpOMS\System\File\Ftp\FtpStorage; use phpOMS\System\File\ContentPutMode; use phpOMS\System\File\PathException; diff --git a/tests/System/File/Local/DirectoryTest.php b/tests/System/File/Local/DirectoryTest.php index eb7d79922..681af3f9e 100644 --- a/tests/System/File/Local/DirectoryTest.php +++ b/tests/System/File/Local/DirectoryTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\System\File\Local; - use phpOMS\System\File\Local\Directory; use phpOMS\System\File\PathException; @@ -52,10 +51,10 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase public function testStaticMove() { $dirTestPath = __DIR__ . '/dirtest'; - + self::assertTrue(Directory::copy($dirTestPath, __DIR__ . '/newdirtest')); self::assertTrue(file_exists(__DIR__ . '/newdirtest/sub/path/test3.txt')); - + self::assertTrue(Directory::delete($dirTestPath)); self::assertFalse(Directory::exists($dirTestPath)); diff --git a/tests/System/File/Local/FileTest.php b/tests/System/File/Local/FileTest.php index c2d89b493..40af55f4e 100644 --- a/tests/System/File/Local/FileTest.php +++ b/tests/System/File/Local/FileTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\System\File\Local; - use phpOMS\System\File\Local\File; use phpOMS\System\File\ContentPutMode; use phpOMS\System\File\PathException; @@ -31,7 +30,7 @@ class FileTest extends \PHPUnit\Framework\TestCase self::assertFalse(File::put($testFile, 'test', ContentPutMode::CREATE)); self::assertTrue(File::put($testFile, 'test2', ContentPutMode::REPLACE)); - + self::assertEquals('test2', File::get($testFile)); self::assertTrue(File::set($testFile, 'test3')); self::assertTrue(File::append($testFile, 'test4')); diff --git a/tests/System/File/Local/LocalStorageTest.php b/tests/System/File/Local/LocalStorageTest.php index c076760bd..4d6138daf 100644 --- a/tests/System/File/Local/LocalStorageTest.php +++ b/tests/System/File/Local/LocalStorageTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\System\File\Local; - use phpOMS\System\File\Local\LocalStorage; use phpOMS\System\File\ContentPutMode; use phpOMS\System\File\PathException; @@ -31,7 +30,7 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase self::assertFalse(LocalStorage::put($testFile, 'test', ContentPutMode::CREATE)); self::assertTrue(LocalStorage::put($testFile, 'test2', ContentPutMode::REPLACE)); - + self::assertEquals('test2', LocalStorage::get($testFile)); self::assertTrue(LocalStorage::set($testFile, 'test3')); self::assertTrue(LocalStorage::append($testFile, 'test4')); @@ -115,13 +114,13 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase $dirTestPath = __DIR__ . '/dirtest'; self::assertTrue(LocalStorage::copy($dirTestPath, __DIR__ . '/newdirtest')); self::assertTrue(file_exists(__DIR__ . '/newdirtest/sub/path/test3.txt')); - + self::assertTrue(LocalStorage::delete($dirTestPath)); self::assertFalse(LocalStorage::exists($dirTestPath)); - + self::assertTrue(LocalStorage::move(__DIR__ . '/newdirtest', $dirTestPath)); self::assertTrue(file_exists($dirTestPath . '/sub/path/test3.txt')); - + self::assertEquals(4, LocalStorage::count($dirTestPath)); self::assertEquals(1, LocalStorage::count($dirTestPath, false)); @@ -135,7 +134,7 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase { LocalStorage::put(__DIR__, 'Test'); } - + /** * @expectedException \phpOMS\System\File\PathException */ @@ -143,7 +142,7 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase { LocalStorage::get(__DIR__); } - + /** * @expectedException \phpOMS\System\File\PathException */ @@ -151,7 +150,7 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase { LocalStorage::list(__DIR__ . '/LocalStorageTest.php'); } - + /** * @expectedException \phpOMS\System\File\PathException */ @@ -159,7 +158,7 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase { LocalStorage::set(__DIR__, 'Test'); } - + /** * @expectedException \phpOMS\System\File\PathException */ @@ -167,7 +166,7 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase { LocalStorage::append(__DIR__, 'Test'); } - + /** * @expectedException \phpOMS\System\File\PathException */ @@ -175,7 +174,7 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase { LocalStorage::prepend(__DIR__, 'Test'); } - + /** * @expectedException \phpOMS\System\File\PathException */ diff --git a/tests/System/File/PathExceptionTest.php b/tests/System/File/PathExceptionTest.php index 021336350..237775931 100644 --- a/tests/System/File/PathExceptionTest.php +++ b/tests/System/File/PathExceptionTest.php @@ -16,7 +16,6 @@ namespace phpOMS\tests\System\File; use phpOMS\System\File\PathException; - class PathExceptionTest extends \PHPUnit\Framework\TestCase { public function testConstructor() diff --git a/tests/System/File/PermissionExceptionTest.php b/tests/System/File/PermissionExceptionTest.php index 496625b02..9bf0b952c 100644 --- a/tests/System/File/PermissionExceptionTest.php +++ b/tests/System/File/PermissionExceptionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\System\File; - use phpOMS\System\File\PermissionException; class PermissionExceptionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/System/File/StorageTest.php b/tests/System/File/StorageTest.php index 20819a4d3..279f17781 100644 --- a/tests/System/File/StorageTest.php +++ b/tests/System/File/StorageTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\System\File; - use phpOMS\System\File\Storage; use phpOMS\System\File\Local\LocalStorage; use phpOMS\System\File\Ftp\FtpStorage; diff --git a/tests/System/MimeTypeTest.php b/tests/System/MimeTypeTest.php index af6eede15..752ba0f92 100644 --- a/tests/System/MimeTypeTest.php +++ b/tests/System/MimeTypeTest.php @@ -27,7 +27,7 @@ class MimeTypeTest extends \PHPUnit\Framework\TestCase foreach ($enums as $key => $value) { if (stripos($value, '/') === false) { self::assertFalse(true); - } + } } self::assertTrue(true); diff --git a/tests/UnhandledHandlerTest.php b/tests/UnhandledHandlerTest.php index f8000be38..8054ea4ad 100644 --- a/tests/UnhandledHandlerTest.php +++ b/tests/UnhandledHandlerTest.php @@ -26,7 +26,7 @@ class UnhandledHandlerTest extends \PHPUnit\Framework\TestCase register_shutdown_function(['\phpOMS\UnhandledHandler', 'shutdownHandler']); trigger_error('', E_USER_ERROR); - + UnhandledHandler::shutdownHandler(); self::assertFalse(UnhandledHandler::errorHandler(0, '', '', 0)); diff --git a/tests/Utils/Barcode/AztecTest.php b/tests/Utils/Barcode/AztecTest.php index f1fab3cd9..b3613a042 100644 --- a/tests/Utils/Barcode/AztecTest.php +++ b/tests/Utils/Barcode/AztecTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Barcode; - use phpOMS\Utils\Barcode\Aztec; class AztecTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/Barcode/C128aTest.php b/tests/Utils/Barcode/C128aTest.php index ed1753eda..5af1af6a3 100644 --- a/tests/Utils/Barcode/C128aTest.php +++ b/tests/Utils/Barcode/C128aTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Barcode; - use phpOMS\Utils\Barcode\C128a; class C128aTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/Barcode/C128bTest.php b/tests/Utils/Barcode/C128bTest.php index 826904217..c951b3386 100644 --- a/tests/Utils/Barcode/C128bTest.php +++ b/tests/Utils/Barcode/C128bTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Barcode; - use phpOMS\Utils\Barcode\C128b; class C128bTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/Barcode/C128cTest.php b/tests/Utils/Barcode/C128cTest.php index d62532c44..01ac7fe37 100644 --- a/tests/Utils/Barcode/C128cTest.php +++ b/tests/Utils/Barcode/C128cTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Barcode; - use phpOMS\Utils\Barcode\C128c; class C128cTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/Barcode/C25Test.php b/tests/Utils/Barcode/C25Test.php index 01644ce58..1caf214e9 100644 --- a/tests/Utils/Barcode/C25Test.php +++ b/tests/Utils/Barcode/C25Test.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Barcode; - use phpOMS\Utils\Barcode\C25; class C25Test extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/Barcode/C39Test.php b/tests/Utils/Barcode/C39Test.php index c5a4b7094..39ffc1ee0 100644 --- a/tests/Utils/Barcode/C39Test.php +++ b/tests/Utils/Barcode/C39Test.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Barcode; - use phpOMS\Utils\Barcode\C39; class C39Test extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/Barcode/CodebarTest.php b/tests/Utils/Barcode/CodebarTest.php index 8fa25d8d6..85b4cd5aa 100644 --- a/tests/Utils/Barcode/CodebarTest.php +++ b/tests/Utils/Barcode/CodebarTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Barcode; - use phpOMS\Utils\Barcode\Codebar; class CodebarTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/Barcode/DatamatrixTest.php b/tests/Utils/Barcode/DatamatrixTest.php index 8b22d0182..e8dfd9641 100644 --- a/tests/Utils/Barcode/DatamatrixTest.php +++ b/tests/Utils/Barcode/DatamatrixTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Barcode; - use phpOMS\Utils\Barcode\Datamatrix; class DatamatrixTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/Barcode/HIBCCTest.php b/tests/Utils/Barcode/HIBCCTest.php index b17e924df..9602b1ff4 100644 --- a/tests/Utils/Barcode/HIBCCTest.php +++ b/tests/Utils/Barcode/HIBCCTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Barcode; - use phpOMS\Utils\Barcode\HIBCC; class HIBCCTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/Barcode/OrientationTypeTest.php b/tests/Utils/Barcode/OrientationTypeTest.php index 81dea6f2e..59119829a 100644 --- a/tests/Utils/Barcode/OrientationTypeTest.php +++ b/tests/Utils/Barcode/OrientationTypeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Barcode; - use phpOMS\Utils\Barcode\OrientationType; class OrientationTypeTest extends \PHPUnit\Framework\TestCase @@ -23,7 +22,7 @@ class OrientationTypeTest extends \PHPUnit\Framework\TestCase { self::assertEquals(2, count(OrientationType::getConstants())); self::assertEquals(OrientationType::getConstants(), array_unique(OrientationType::getConstants())); - + self::assertEquals(0, OrientationType::HORIZONTAL); self::assertEquals(1, OrientationType::VERTICAL); } diff --git a/tests/Utils/Barcode/QRTest.php b/tests/Utils/Barcode/QRTest.php index 6158863ed..edade799d 100644 --- a/tests/Utils/Barcode/QRTest.php +++ b/tests/Utils/Barcode/QRTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Barcode; - use phpOMS\Utils\Barcode\QR; class QRTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/Compression/LZWTest.php b/tests/Utils/Compression/LZWTest.php index 64ace390c..81ff4dbca 100644 --- a/tests/Utils/Compression/LZWTest.php +++ b/tests/Utils/Compression/LZWTest.php @@ -16,7 +16,6 @@ namespace phpOMS\tests\Utils\Compression; use phpOMS\Utils\Compression\LZW; - class LZWTest extends \PHPUnit\Framework\TestCase { public function testLZW() diff --git a/tests/Utils/Converter/AngleTypeTest.php b/tests/Utils/Converter/AngleTypeTest.php index 5f43511bd..735abd85a 100644 --- a/tests/Utils/Converter/AngleTypeTest.php +++ b/tests/Utils/Converter/AngleTypeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Converter; - use phpOMS\Utils\Converter\AngleType; class AngleTypeTest extends \PHPUnit\Framework\TestCase @@ -23,7 +22,7 @@ class AngleTypeTest extends \PHPUnit\Framework\TestCase { self::assertEquals(10, count(AngleType::getConstants())); self::assertEquals(AngleType::getConstants(), array_unique(AngleType::getConstants())); - + self::assertEquals('deg', AngleType::DEGREE); self::assertEquals('rad', AngleType::RADIAN); self::assertEquals('arcsec', AngleType::SECOND); diff --git a/tests/Utils/Converter/AreaTypeTest.php b/tests/Utils/Converter/AreaTypeTest.php index 2565e3d5d..8e369b75f 100644 --- a/tests/Utils/Converter/AreaTypeTest.php +++ b/tests/Utils/Converter/AreaTypeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Converter; - use phpOMS\Utils\Converter\AreaType; class AreaTypeTest extends \PHPUnit\Framework\TestCase @@ -23,7 +22,7 @@ class AreaTypeTest extends \PHPUnit\Framework\TestCase { self::assertEquals(13, count(AreaType::getConstants())); self::assertEquals(AreaType::getConstants(), array_unique(AreaType::getConstants())); - + self::assertEquals('ft', AreaType::SQUARE_FEET); self::assertEquals('m', AreaType::SQUARE_METERS); self::assertEquals('km', AreaType::SQUARE_KILOMETERS); diff --git a/tests/Utils/Converter/CurrencyTest.php b/tests/Utils/Converter/CurrencyTest.php index 4cd1719e9..d0cdcb9a3 100644 --- a/tests/Utils/Converter/CurrencyTest.php +++ b/tests/Utils/Converter/CurrencyTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Converter; - use phpOMS\Utils\Converter\Currency; use phpOMS\Localization\ISO4217CharEnum; @@ -24,7 +23,7 @@ class CurrencyTest extends \PHPUnit\Framework\TestCase { self::assertGreaterThan(0, Currency::fromEurTo(1, ISO4217CharEnum::_USD)); self::assertGreaterThan(0, Currency::fromToEur(1, ISO4217CharEnum::_USD)); - + Currency::resetCurrencies(); self::assertGreaterThan(0, Currency::convertCurrency(1, ISO4217CharEnum::_USD, ISO4217CharEnum::_GBP)); } @@ -36,7 +35,7 @@ class CurrencyTest extends \PHPUnit\Framework\TestCase { Currency::fromEurTo(1, 'ERROR'); } - + /** * @expectedException \InvalidArgumentException */ @@ -44,7 +43,7 @@ class CurrencyTest extends \PHPUnit\Framework\TestCase { Currency::fromToEur(1, 'ERROR'); } - + /** * @expectedException \InvalidArgumentException */ diff --git a/tests/Utils/Converter/EnergyPowerTypeTest.php b/tests/Utils/Converter/EnergyPowerTypeTest.php index 57db1ede3..5e4f35f74 100644 --- a/tests/Utils/Converter/EnergyPowerTypeTest.php +++ b/tests/Utils/Converter/EnergyPowerTypeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Converter; - use phpOMS\Utils\Converter\EnergyPowerType; class EnergyPowerTypeTest extends \PHPUnit\Framework\TestCase @@ -23,7 +22,7 @@ class EnergyPowerTypeTest extends \PHPUnit\Framework\TestCase { self::assertEquals(9, count(EnergyPowerType::getConstants())); self::assertEquals(EnergyPowerType::getConstants(), array_unique(EnergyPowerType::getConstants())); - + self::assertEquals('kWh', EnergyPowerType::KILOWATT_HOUERS); self::assertEquals('MWh', EnergyPowerType::MEGAWATT_HOUERS); self::assertEquals('kt', EnergyPowerType::KILOTONS); diff --git a/tests/Utils/Converter/FileSizeTypeTest.php b/tests/Utils/Converter/FileSizeTypeTest.php index 6085de83b..68ecc61ff 100644 --- a/tests/Utils/Converter/FileSizeTypeTest.php +++ b/tests/Utils/Converter/FileSizeTypeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Converter; - use phpOMS\Utils\Converter\FileSizeType; class FileSizeTypeTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/Converter/FileTest.php b/tests/Utils/Converter/FileTest.php index e740fa74a..d7d25ab4e 100644 --- a/tests/Utils/Converter/FileTest.php +++ b/tests/Utils/Converter/FileTest.php @@ -16,7 +16,6 @@ namespace phpOMS\tests\Utils\Converter; use phpOMS\Utils\Converter\File; - class FileTest extends \PHPUnit\Framework\TestCase { public function testByteSizeToString() diff --git a/tests/Utils/Converter/IpTest.php b/tests/Utils/Converter/IpTest.php index 7e2e626b1..27a6bcae1 100644 --- a/tests/Utils/Converter/IpTest.php +++ b/tests/Utils/Converter/IpTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Converter; - use phpOMS\Utils\Converter\Ip; class IpTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/Converter/LengthTypeTest.php b/tests/Utils/Converter/LengthTypeTest.php index a4df22de6..42c37a096 100644 --- a/tests/Utils/Converter/LengthTypeTest.php +++ b/tests/Utils/Converter/LengthTypeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Converter; - use phpOMS\Utils\Converter\LengthType; class LengthTypeTest extends \PHPUnit\Framework\TestCase @@ -23,7 +22,7 @@ class LengthTypeTest extends \PHPUnit\Framework\TestCase { self::assertEquals(21, count(LengthType::getConstants())); self::assertEquals(LengthType::getConstants(), array_unique(LengthType::getConstants())); - + self::assertEquals('mi', LengthType::MILES); self::assertEquals('m', LengthType::METERS); self::assertEquals('micron', LengthType::MICROMETER); diff --git a/tests/Utils/Converter/MeasurementTest.php b/tests/Utils/Converter/MeasurementTest.php index d08411a2f..e036380e0 100644 --- a/tests/Utils/Converter/MeasurementTest.php +++ b/tests/Utils/Converter/MeasurementTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Converter; - use phpOMS\Utils\Converter\Measurement; use phpOMS\Utils\Converter\TemperatureType; use phpOMS\Utils\Converter\WeightType; diff --git a/tests/Utils/Converter/NumericTest.php b/tests/Utils/Converter/NumericTest.php index fc32c0775..2fe66bfa6 100644 --- a/tests/Utils/Converter/NumericTest.php +++ b/tests/Utils/Converter/NumericTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Converter; - use phpOMS\Utils\Converter\Numeric; class NumericTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/Converter/PressureTypeTest.php b/tests/Utils/Converter/PressureTypeTest.php index 597e7614f..8b40c1e08 100644 --- a/tests/Utils/Converter/PressureTypeTest.php +++ b/tests/Utils/Converter/PressureTypeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Converter; - use phpOMS\Utils\Converter\PressureType; class PressureTypeTest extends \PHPUnit\Framework\TestCase @@ -23,7 +22,7 @@ class PressureTypeTest extends \PHPUnit\Framework\TestCase { self::assertEquals(13, count(PressureType::getConstants())); self::assertEquals(PressureType::getConstants(), array_unique(PressureType::getConstants())); - + self::assertEquals('Pa', PressureType::PASCALS); self::assertEquals('bar', PressureType::BAR); self::assertEquals('psi', PressureType::POUND_PER_SQUARE_INCH); diff --git a/tests/Utils/Converter/SpeedTypeTest.php b/tests/Utils/Converter/SpeedTypeTest.php index 3d34f4d13..2a2143b4c 100644 --- a/tests/Utils/Converter/SpeedTypeTest.php +++ b/tests/Utils/Converter/SpeedTypeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Converter; - use phpOMS\Utils\Converter\SpeedType; class SpeedTypeTest extends \PHPUnit\Framework\TestCase @@ -23,7 +22,7 @@ class SpeedTypeTest extends \PHPUnit\Framework\TestCase { self::assertEquals(34, count(SpeedType::getConstants())); self::assertEquals(SpeedType::getConstants(), array_unique(SpeedType::getConstants())); - + self::assertEquals('mpd', SpeedType::MILES_PER_DAY); self::assertEquals('mph', SpeedType::MILES_PER_HOUR); self::assertEquals('mpm', SpeedType::MILES_PER_MINUTE); diff --git a/tests/Utils/Converter/TemperatureTypeTest.php b/tests/Utils/Converter/TemperatureTypeTest.php index 11fe26618..135dd79c6 100644 --- a/tests/Utils/Converter/TemperatureTypeTest.php +++ b/tests/Utils/Converter/TemperatureTypeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Converter; - use phpOMS\Utils\Converter\TemperatureType; class TemperatureTypeTest extends \PHPUnit\Framework\TestCase @@ -23,7 +22,7 @@ class TemperatureTypeTest extends \PHPUnit\Framework\TestCase { self::assertEquals(8, count(TemperatureType::getConstants())); self::assertEquals(TemperatureType::getConstants(), array_unique(TemperatureType::getConstants())); - + self::assertEquals('celsius', TemperatureType::CELSIUS); self::assertEquals('fahrenheit', TemperatureType::FAHRENHEIT); self::assertEquals('kelvin', TemperatureType::KELVIN); diff --git a/tests/Utils/Converter/TimeTypeTest.php b/tests/Utils/Converter/TimeTypeTest.php index a8c66867d..fa18bec1e 100644 --- a/tests/Utils/Converter/TimeTypeTest.php +++ b/tests/Utils/Converter/TimeTypeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Converter; - use phpOMS\Utils\Converter\TimeType; class TimeTypeTest extends \PHPUnit\Framework\TestCase @@ -23,7 +22,7 @@ class TimeTypeTest extends \PHPUnit\Framework\TestCase { self::assertEquals(9, count(TimeType::getConstants())); self::assertEquals(TimeType::getConstants(), array_unique(TimeType::getConstants())); - + self::assertEquals('ms', TimeType::MILLISECONDS); self::assertEquals('s', TimeType::SECONDS); self::assertEquals('i', TimeType::MINUTES); diff --git a/tests/Utils/Converter/VolumeTypeTest.php b/tests/Utils/Converter/VolumeTypeTest.php index 632a9e0d9..5ca5c1a80 100644 --- a/tests/Utils/Converter/VolumeTypeTest.php +++ b/tests/Utils/Converter/VolumeTypeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Converter; - use phpOMS\Utils\Converter\VolumeType; class VolumeTypeTest extends \PHPUnit\Framework\TestCase @@ -23,7 +22,7 @@ class VolumeTypeTest extends \PHPUnit\Framework\TestCase { self::assertEquals(38, count(VolumeType::getConstants())); self::assertEquals(VolumeType::getConstants(), array_unique(VolumeType::getConstants())); - + self::assertEquals('UK gal', VolumeType::UK_GALLON); self::assertEquals('US gal lqd', VolumeType::US_GALLON_LIQUID); self::assertEquals('US gal dry', VolumeType::US_GALLON_DRY); diff --git a/tests/Utils/Converter/WeightTypeTest.php b/tests/Utils/Converter/WeightTypeTest.php index 94105effd..af1a09604 100644 --- a/tests/Utils/Converter/WeightTypeTest.php +++ b/tests/Utils/Converter/WeightTypeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Converter; - use phpOMS\Utils\Converter\WeightType; class WeightTypeTest extends \PHPUnit\Framework\TestCase @@ -23,7 +22,7 @@ class WeightTypeTest extends \PHPUnit\Framework\TestCase { self::assertEquals(14, count(WeightType::getConstants())); self::assertEquals(WeightType::getConstants(), array_unique(WeightType::getConstants())); - + self::assertEquals('mg', WeightType::MICROGRAM); self::assertEquals('mug', WeightType::MILLIGRAM); self::assertEquals('g', WeightType::GRAM); diff --git a/tests/Utils/Encoding/CaesarTest.php b/tests/Utils/Encoding/CaesarTest.php index 532ca0f8c..c90d1d7e9 100644 --- a/tests/Utils/Encoding/CaesarTest.php +++ b/tests/Utils/Encoding/CaesarTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Encoding; - use phpOMS\Utils\Encoding\Caesar; use phpOMS\Utils\RnG\StringUtils; diff --git a/tests/Utils/Encoding/GrayTest.php b/tests/Utils/Encoding/GrayTest.php index 2ee4450be..0ee207587 100644 --- a/tests/Utils/Encoding/GrayTest.php +++ b/tests/Utils/Encoding/GrayTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Encoding; - use phpOMS\Utils\Encoding\Gray; class GrayTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/Encoding/Huffman/DictionaryTest.php b/tests/Utils/Encoding/Huffman/DictionaryTest.php index 8434033d4..868b05566 100644 --- a/tests/Utils/Encoding/Huffman/DictionaryTest.php +++ b/tests/Utils/Encoding/Huffman/DictionaryTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Encoding\Huffman; - use phpOMS\Utils\Encoding\Huffman\Dictionary; class DictionaryTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/Encoding/Huffman/HuffmanTest.php b/tests/Utils/Encoding/Huffman/HuffmanTest.php index 2521a1367..638d514a9 100644 --- a/tests/Utils/Encoding/Huffman/HuffmanTest.php +++ b/tests/Utils/Encoding/Huffman/HuffmanTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Encoding\Huffman; - use phpOMS\Utils\Encoding\Huffman\Huffman; use phpOMS\Utils\Encoding\Huffman\Dictionary; @@ -33,7 +32,7 @@ class HuffmanTest extends \PHPUnit\Framework\TestCase $man = new Huffman(); $man->setDictionary($huff->getDictionary()); - + self::assertEquals( 'This is a test message in order to test the encoding and decoding of the Huffman algorithm.', $man->decode(hex2bin('a42f5debafd35bee6a940f78f38638fb3f4d6fd13cc672cf01d61bb1ce59e03cdbe89e8e56b5d63aa61387d1ba10')) diff --git a/tests/Utils/Encoding/XorEncodingTest.php b/tests/Utils/Encoding/XorEncodingTest.php index 1d0b8df39..21f7c6ea7 100644 --- a/tests/Utils/Encoding/XorEncodingTest.php +++ b/tests/Utils/Encoding/XorEncodingTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Encoding; - use phpOMS\Utils\Encoding\XorEncoding; use phpOMS\Utils\RnG\StringUtils; diff --git a/tests/Utils/Excel/ExcelTest.php b/tests/Utils/Excel/ExcelTest.php index 5e80e6be2..3362735e3 100644 --- a/tests/Utils/Excel/ExcelTest.php +++ b/tests/Utils/Excel/ExcelTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Excel; - use phpOMS\Utils\Excel\Excel; class ExcelTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/Git/AuthorTest.php b/tests/Utils/Git/AuthorTest.php index 972da794a..933dd930e 100644 --- a/tests/Utils/Git/AuthorTest.php +++ b/tests/Utils/Git/AuthorTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Git; - use phpOMS\Utils\Git\Author; class AuthorTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/Git/BranchTest.php b/tests/Utils/Git/BranchTest.php index 1486677b2..9d3804f4b 100644 --- a/tests/Utils/Git/BranchTest.php +++ b/tests/Utils/Git/BranchTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Git; - use phpOMS\Utils\Git\Branch; class BranchTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/Git/CommitTest.php b/tests/Utils/Git/CommitTest.php index a8e7b66de..7f53f3836 100644 --- a/tests/Utils/Git/CommitTest.php +++ b/tests/Utils/Git/CommitTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Git; - use phpOMS\Utils\Git\Commit; use phpOMS\Utils\Git\Author; use phpOMS\Utils\Git\Branch; diff --git a/tests/Utils/Git/GitTest.php b/tests/Utils/Git/GitTest.php index 68fb4444c..f0a9ba409 100644 --- a/tests/Utils/Git/GitTest.php +++ b/tests/Utils/Git/GitTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Git; - use phpOMS\Utils\Git\Git; class GitTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/Git/TagTest.php b/tests/Utils/Git/TagTest.php index 4bd973ca4..ed8820d43 100644 --- a/tests/Utils/Git/TagTest.php +++ b/tests/Utils/Git/TagTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Git; - use phpOMS\Utils\Git\Tag; class TagTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/IO/Csv/CsvDatabaseMapperTest.php b/tests/Utils/IO/Csv/CsvDatabaseMapperTest.php index 1e96dc363..69ff6a800 100644 --- a/tests/Utils/IO/Csv/CsvDatabaseMapperTest.php +++ b/tests/Utils/IO/Csv/CsvDatabaseMapperTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\IO\Csv; - use phpOMS\Utils\IO\Csv\CsvDatabaseMapper; class CsvDatabaseMapperTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/IO/Csv/CsvSettingsTest.php b/tests/Utils/IO/Csv/CsvSettingsTest.php index fb27e5009..2d0c8c0d8 100644 --- a/tests/Utils/IO/Csv/CsvSettingsTest.php +++ b/tests/Utils/IO/Csv/CsvSettingsTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\IO\Csv; - use phpOMS\Utils\IO\Csv\CsvSettings; class CsvSettingsTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/IO/Excel/ExcelDatabaseMapperTest.php b/tests/Utils/IO/Excel/ExcelDatabaseMapperTest.php index 4b90f1b15..15f8cede6 100644 --- a/tests/Utils/IO/Excel/ExcelDatabaseMapperTest.php +++ b/tests/Utils/IO/Excel/ExcelDatabaseMapperTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\IO\Excel; - use phpOMS\Utils\IO\Excel\ExcelDatabaseMapper; class ExcelDatabaseMapperTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/IO/IODatabaseMapperTest.php b/tests/Utils/IO/IODatabaseMapperTest.php index e897a7a3a..967bd6fc1 100644 --- a/tests/Utils/IO/IODatabaseMapperTest.php +++ b/tests/Utils/IO/IODatabaseMapperTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\IO; - use phpOMS\Utils\IO\IODatabaseMapper; class IODatabaseMapperTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/IO/Json/InvalidJsonExceptionTest.php b/tests/Utils/IO/Json/InvalidJsonExceptionTest.php index 4b013706b..88c58c7d3 100644 --- a/tests/Utils/IO/Json/InvalidJsonExceptionTest.php +++ b/tests/Utils/IO/Json/InvalidJsonExceptionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\IO\Json; - use phpOMS\Utils\IO\Json\InvalidJsonException; class InvalidJsonExceptionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/IO/Zip/GzTest.php b/tests/Utils/IO/Zip/GzTest.php index 48b80d4b7..741df97c7 100644 --- a/tests/Utils/IO/Zip/GzTest.php +++ b/tests/Utils/IO/Zip/GzTest.php @@ -13,7 +13,6 @@ namespace phpOMS\tests\Utils\IO\Zip; - use phpOMS\Utils\IO\Zip\Gz; class GzTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/IO/Zip/TarGzTest.php b/tests/Utils/IO/Zip/TarGzTest.php index 0d8c47861..548b12fd9 100644 --- a/tests/Utils/IO/Zip/TarGzTest.php +++ b/tests/Utils/IO/Zip/TarGzTest.php @@ -13,7 +13,6 @@ namespace phpOMS\tests\Utils\IO\Zip; - use phpOMS\Utils\IO\Zip\TarGz; class TarGzTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/IO/Zip/TarTest.php b/tests/Utils/IO/Zip/TarTest.php index a5220695a..8bd6796fe 100644 --- a/tests/Utils/IO/Zip/TarTest.php +++ b/tests/Utils/IO/Zip/TarTest.php @@ -13,7 +13,6 @@ namespace phpOMS\tests\Utils\IO\Zip; - use phpOMS\Utils\IO\Zip\Tar; class TarTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/IO/Zip/ZipTest.php b/tests/Utils/IO/Zip/ZipTest.php index 68cf9e928..3d25b434f 100644 --- a/tests/Utils/IO/Zip/ZipTest.php +++ b/tests/Utils/IO/Zip/ZipTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\IO\Zip; - use phpOMS\Utils\IO\Zip\Zip; class ZipTest extends \PHPUnit\Framework\TestCase @@ -62,7 +61,7 @@ class ZipTest extends \PHPUnit\Framework\TestCase self::assertFalse(file_exists(__DIR__ . '/test/sub/test e.txt')); self::assertFalse(file_exists(__DIR__ . '/test/sub')); self::assertFalse(file_exists(__DIR__ . '/test')); - + self::assertTrue(Zip::unpack(__DIR__ . '/test.zip', __DIR__)); self::assertTrue(file_exists(__DIR__ . '/test a.txt')); diff --git a/tests/Utils/JobQueue/JobQueueTest.php b/tests/Utils/JobQueue/JobQueueTest.php index 45c5f4345..e0bfde097 100644 --- a/tests/Utils/JobQueue/JobQueueTest.php +++ b/tests/Utils/JobQueue/JobQueueTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\JobQueue; - use phpOMS\Utils\JobQueue\JobQueue; class JobQueueTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/JobQueue/JobTest.php b/tests/Utils/JobQueue/JobTest.php index e5d2fac57..268d2ecb2 100644 --- a/tests/Utils/JobQueue/JobTest.php +++ b/tests/Utils/JobQueue/JobTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\JobQueue; - use phpOMS\Utils\JobQueue\Job; class JobTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/PDF/PdfTest.php b/tests/Utils/PDF/PdfTest.php index c6ce5d388..7d0f7cd30 100644 --- a/tests/Utils/PDF/PdfTest.php +++ b/tests/Utils/PDF/PdfTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\PDF; - use phpOMS\Utils\PDF\Pdf; class PdfTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/Parser/LaTex/Expressions/ProductTest.php b/tests/Utils/Parser/LaTex/Expressions/ProductTest.php index cea24823b..e8892041d 100644 --- a/tests/Utils/Parser/LaTex/Expressions/ProductTest.php +++ b/tests/Utils/Parser/LaTex/Expressions/ProductTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Parser\LaTex\Expressions; - use phpOMS\Utils\Parser\LaTex\Expressions\Product; class ProductTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/Parser/LaTex/Expressions/SumTest.php b/tests/Utils/Parser/LaTex/Expressions/SumTest.php index f6d420180..2b6785b5d 100644 --- a/tests/Utils/Parser/LaTex/Expressions/SumTest.php +++ b/tests/Utils/Parser/LaTex/Expressions/SumTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Parser\LaTex\Expressions; - use phpOMS\Utils\Parser\LaTex\Expressions\Sum; class SumTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/Parser/LaTex/Expressions/TrigonometryTest.php b/tests/Utils/Parser/LaTex/Expressions/TrigonometryTest.php index b09a7aac1..2324d4c91 100644 --- a/tests/Utils/Parser/LaTex/Expressions/TrigonometryTest.php +++ b/tests/Utils/Parser/LaTex/Expressions/TrigonometryTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Parser\LaTex\Expressions; - use phpOMS\Utils\Parser\LaTex\Expressions\Trigonometry; class TrigonometryTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/Parser/LaTex/LaTexParserTest.php b/tests/Utils/Parser/LaTex/LaTexParserTest.php index f3e6c3a3e..152cdb5b0 100644 --- a/tests/Utils/Parser/LaTex/LaTexParserTest.php +++ b/tests/Utils/Parser/LaTex/LaTexParserTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Parser\LaTex; - use phpOMS\Utils\Parser\LaTex\LaTexParser; class LaTexParserTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/Parser/LaTex/Types/IntervalTest.php b/tests/Utils/Parser/LaTex/Types/IntervalTest.php index 711ffd391..4a5b472c2 100644 --- a/tests/Utils/Parser/LaTex/Types/IntervalTest.php +++ b/tests/Utils/Parser/LaTex/Types/IntervalTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Parser\LaTex\Types; - use phpOMS\Utils\Parser\LaTex\Types\Interval; class IntervalTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/Parser/LaTex/Types/MathFunctionTest.php b/tests/Utils/Parser/LaTex/Types/MathFunctionTest.php index c2e48cc40..39cb07da0 100644 --- a/tests/Utils/Parser/LaTex/Types/MathFunctionTest.php +++ b/tests/Utils/Parser/LaTex/Types/MathFunctionTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Parser\LaTex\Types; - use phpOMS\Utils\Parser\LaTex\Types\MathFunction; class MathFunctionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/Parser/LaTex/Types/VariableTest.php b/tests/Utils/Parser/LaTex/Types/VariableTest.php index 9d89da940..4eb07435e 100644 --- a/tests/Utils/Parser/LaTex/Types/VariableTest.php +++ b/tests/Utils/Parser/LaTex/Types/VariableTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Parser\LaTex\Types; - use phpOMS\Utils\Parser\LaTex\Types\Variable; class VariableTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/Parser/Markdown/MarkdownTest.php b/tests/Utils/Parser/Markdown/MarkdownTest.php index 4f33d1ab4..c0918f485 100644 --- a/tests/Utils/Parser/Markdown/MarkdownTest.php +++ b/tests/Utils/Parser/Markdown/MarkdownTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Parser\Markdown; - use phpOMS\Utils\Parser\Markdown\Markdown; use phpOMS\System\File\Local\Directory; @@ -29,7 +28,7 @@ class MarkdownTest extends \PHPUnit\Framework\TestCase if ($data[1] === 'md') { self::assertEquals( - file_get_contents(__DIR__ . '/data/' . $data[0] . '.html'), + file_get_contents(__DIR__ . '/data/' . $data[0] . '.html'), Markdown::parse(file_get_contents(__DIR__ . '/data/' . $data[0] . '.md')), $file ); diff --git a/tests/Utils/Parser/Php/ArrayParserTest.php b/tests/Utils/Parser/Php/ArrayParserTest.php index 70b652c39..25e4d2114 100644 --- a/tests/Utils/Parser/Php/ArrayParserTest.php +++ b/tests/Utils/Parser/Php/ArrayParserTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\Parser\Php; - use phpOMS\Utils\Parser\Php\ArrayParser; class ArrayParserTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/RnG/AddressTest.php b/tests/Utils/RnG/AddressTest.php index cb23b4488..d7a9e8bda 100644 --- a/tests/Utils/RnG/AddressTest.php +++ b/tests/Utils/RnG/AddressTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\RnG; - use phpOMS\Utils\RnG\Address; class AddressTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/RnG/ArrayRandomizeTest.php b/tests/Utils/RnG/ArrayRandomizeTest.php index 491d91b29..a3615fc2c 100644 --- a/tests/Utils/RnG/ArrayRandomizeTest.php +++ b/tests/Utils/RnG/ArrayRandomizeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\RnG; - use phpOMS\Utils\RnG\ArrayRandomize; class ArrayRandomizeTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/RnG/CityTest.php b/tests/Utils/RnG/CityTest.php index 84bf02429..34a55ca2f 100644 --- a/tests/Utils/RnG/CityTest.php +++ b/tests/Utils/RnG/CityTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\RnG; - use phpOMS\Utils\RnG\City; class CityTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/RnG/DateTimeTest.php b/tests/Utils/RnG/DateTimeTest.php index 6cf8a5538..3ccc6277f 100644 --- a/tests/Utils/RnG/DateTimeTest.php +++ b/tests/Utils/RnG/DateTimeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\RnG; - use phpOMS\Utils\RnG\DateTime; class DateTimeTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/RnG/DistributionTypeTest.php b/tests/Utils/RnG/DistributionTypeTest.php index ab618a91a..bbac21d45 100644 --- a/tests/Utils/RnG/DistributionTypeTest.php +++ b/tests/Utils/RnG/DistributionTypeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\RnG; - use phpOMS\Utils\RnG\DistributionType; class DistributionTypeTest extends \PHPUnit\Framework\TestCase @@ -23,7 +22,7 @@ class DistributionTypeTest extends \PHPUnit\Framework\TestCase { self::assertEquals(2, count(DistributionType::getConstants())); self::assertEquals(DistributionType::getConstants(), array_unique(DistributionType::getConstants())); - + self::assertEquals(0, DistributionType::UNIFORM); self::assertEquals(1, DistributionType::NORMAL); } diff --git a/tests/Utils/RnG/EmailTest.php b/tests/Utils/RnG/EmailTest.php index 59a80d075..c119d338d 100644 --- a/tests/Utils/RnG/EmailTest.php +++ b/tests/Utils/RnG/EmailTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\RnG; - use phpOMS\Utils\RnG\Email; class EmailTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/RnG/FileTest.php b/tests/Utils/RnG/FileTest.php index 5cbf3b75e..faa47c44d 100644 --- a/tests/Utils/RnG/FileTest.php +++ b/tests/Utils/RnG/FileTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\RnG; - use phpOMS\Utils\RnG\File; class FileTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/RnG/IBANTest.php b/tests/Utils/RnG/IBANTest.php index b60dcf8cb..dfb350a2e 100644 --- a/tests/Utils/RnG/IBANTest.php +++ b/tests/Utils/RnG/IBANTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\RnG; - use phpOMS\Utils\RnG\IBAN; class IBANTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/RnG/LinearCongruentialGeneratorTest.php b/tests/Utils/RnG/LinearCongruentialGeneratorTest.php index 317575de1..aa842f885 100644 --- a/tests/Utils/RnG/LinearCongruentialGeneratorTest.php +++ b/tests/Utils/RnG/LinearCongruentialGeneratorTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\RnG; - use phpOMS\Utils\RnG\LinearCongruentialGenerator; class LinearCongruentialGeneratorTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/RnG/NameTest.php b/tests/Utils/RnG/NameTest.php index b9ea97089..5470418e8 100644 --- a/tests/Utils/RnG/NameTest.php +++ b/tests/Utils/RnG/NameTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\RnG; - use phpOMS\Utils\RnG\Name; class NameTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/RnG/NumericTest.php b/tests/Utils/RnG/NumericTest.php index c1d9799d8..e40309890 100644 --- a/tests/Utils/RnG/NumericTest.php +++ b/tests/Utils/RnG/NumericTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\RnG; - use phpOMS\Utils\RnG\Numeric; class NumericTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/RnG/PhoneTest.php b/tests/Utils/RnG/PhoneTest.php index e9f53add0..6083f1865 100644 --- a/tests/Utils/RnG/PhoneTest.php +++ b/tests/Utils/RnG/PhoneTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\RnG; - use phpOMS\Utils\RnG\Phone; class PhoneTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/RnG/PostalZipTest.php b/tests/Utils/RnG/PostalZipTest.php index 40a7aad68..0218d79b3 100644 --- a/tests/Utils/RnG/PostalZipTest.php +++ b/tests/Utils/RnG/PostalZipTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\RnG; - use phpOMS\Utils\RnG\PostalZip; class PostalZipTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/RnG/StringUtilsTest.php b/tests/Utils/RnG/StringUtilsTest.php index 6792fc5f0..ea4c6a379 100644 --- a/tests/Utils/RnG/StringUtilsTest.php +++ b/tests/Utils/RnG/StringUtilsTest.php @@ -16,7 +16,6 @@ namespace phpOMS\tests\Utils\RnG; use phpOMS\Utils\RnG\StringUtils; - class StringUtilsTest extends \PHPUnit\Framework\TestCase { /** diff --git a/tests/Utils/RnG/TextTest.php b/tests/Utils/RnG/TextTest.php index 7c0e213f3..508dd88ab 100644 --- a/tests/Utils/RnG/TextTest.php +++ b/tests/Utils/RnG/TextTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\RnG; - use phpOMS\Utils\RnG\Text; class TextTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/TaskSchedule/CronJobTest.php b/tests/Utils/TaskSchedule/CronJobTest.php index 4198f78ed..8f05c8856 100644 --- a/tests/Utils/TaskSchedule/CronJobTest.php +++ b/tests/Utils/TaskSchedule/CronJobTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\TaskSchedule; - use phpOMS\Utils\TaskSchedule\CronJob; class CronJobTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/TaskSchedule/CronTest.php b/tests/Utils/TaskSchedule/CronTest.php index 5215288b3..a946bba64 100644 --- a/tests/Utils/TaskSchedule/CronTest.php +++ b/tests/Utils/TaskSchedule/CronTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\TaskSchedule; - use phpOMS\Utils\TaskSchedule\Cron; class CronTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/TaskSchedule/IntervalTest.php b/tests/Utils/TaskSchedule/IntervalTest.php index 152a50e38..758bfc17d 100644 --- a/tests/Utils/TaskSchedule/IntervalTest.php +++ b/tests/Utils/TaskSchedule/IntervalTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\TaskSchedule; - use phpOMS\Utils\TaskSchedule\Interval; class IntervalTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/TaskSchedule/ScheduleTest.php b/tests/Utils/TaskSchedule/ScheduleTest.php index 04c0ef4c9..fe891df80 100644 --- a/tests/Utils/TaskSchedule/ScheduleTest.php +++ b/tests/Utils/TaskSchedule/ScheduleTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\TaskSchedule; - use phpOMS\Utils\TaskSchedule\Schedule; class ScheduleTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/TaskSchedule/SchedulerAbstractTest.php b/tests/Utils/TaskSchedule/SchedulerAbstractTest.php index cd7074b7d..26ee5b244 100644 --- a/tests/Utils/TaskSchedule/SchedulerAbstractTest.php +++ b/tests/Utils/TaskSchedule/SchedulerAbstractTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\TaskSchedule; - use phpOMS\Utils\TaskSchedule\SchedulerAbstract; class SchedulerAbstractTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/TaskSchedule/SchedulerFactoryTest.php b/tests/Utils/TaskSchedule/SchedulerFactoryTest.php index 642d85e74..04ba9a878 100644 --- a/tests/Utils/TaskSchedule/SchedulerFactoryTest.php +++ b/tests/Utils/TaskSchedule/SchedulerFactoryTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\TaskSchedule; - use phpOMS\Utils\TaskSchedule\SchedulerFactory; use phpOMS\Utils\TaskSchedule\TaskScheduler; use phpOMS\Utils\TaskSchedule\Cron; @@ -24,7 +23,7 @@ class SchedulerFactoryTest extends \PHPUnit\Framework\TestCase public function testFactory() { self::assertTrue((SchedulerFactory::create('') instanceof Cron) || (SchedulerFactory::create('') instanceof TaskScheduler)); - + // todo: make full test here by defining schtask or crontab path // todo: create task // todo: get task diff --git a/tests/Utils/TaskSchedule/TaskAbstractTest.php b/tests/Utils/TaskSchedule/TaskAbstractTest.php index c7d644ecb..27693ac5b 100644 --- a/tests/Utils/TaskSchedule/TaskAbstractTest.php +++ b/tests/Utils/TaskSchedule/TaskAbstractTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\TaskSchedule; - use phpOMS\Utils\TaskSchedule\TaskAbstract; class TaskAbstractTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Utils/TaskSchedule/TaskFactoryTest.php b/tests/Utils/TaskSchedule/TaskFactoryTest.php index feb552f44..a31dd7dc3 100644 --- a/tests/Utils/TaskSchedule/TaskFactoryTest.php +++ b/tests/Utils/TaskSchedule/TaskFactoryTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\TaskSchedule; - use phpOMS\Utils\TaskSchedule\TaskFactory; use phpOMS\Utils\TaskSchedule\Schedule; use phpOMS\Utils\TaskSchedule\CronJob; diff --git a/tests/Utils/TaskSchedule/TaskSchedulerTest.php b/tests/Utils/TaskSchedule/TaskSchedulerTest.php index d80cb2bbf..f472024bc 100644 --- a/tests/Utils/TaskSchedule/TaskSchedulerTest.php +++ b/tests/Utils/TaskSchedule/TaskSchedulerTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Utils\TaskSchedule; - use phpOMS\Utils\TaskSchedule\TaskScheduler; class TaskSchedulerTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Validation/Barcode/Barcode11Test.php b/tests/Validation/Barcode/Barcode11Test.php index 94d2f543d..cd37d815e 100644 --- a/tests/Validation/Barcode/Barcode11Test.php +++ b/tests/Validation/Barcode/Barcode11Test.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Validation\Barcode; - use phpOMS\Validation\Barcode\Barcode11; class Barcode11Test extends \PHPUnit\Framework\TestCase diff --git a/tests/Validation/Barcode/Barcode128Test.php b/tests/Validation/Barcode/Barcode128Test.php index 0dd5a749d..a1a60039c 100644 --- a/tests/Validation/Barcode/Barcode128Test.php +++ b/tests/Validation/Barcode/Barcode128Test.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Validation\Barcode; - use phpOMS\Validation\Barcode\Barcode128; class Barcode128Test extends \PHPUnit\Framework\TestCase diff --git a/tests/Validation/Barcode/Barcode25Test.php b/tests/Validation/Barcode/Barcode25Test.php index 8417aff01..998c63600 100644 --- a/tests/Validation/Barcode/Barcode25Test.php +++ b/tests/Validation/Barcode/Barcode25Test.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Validation\Barcode; - use phpOMS\Validation\Barcode\Barcode25; class Barcode25Test extends \PHPUnit\Framework\TestCase diff --git a/tests/Validation/Barcode/Barcode39Test.php b/tests/Validation/Barcode/Barcode39Test.php index f3b860c87..6ffddd170 100644 --- a/tests/Validation/Barcode/Barcode39Test.php +++ b/tests/Validation/Barcode/Barcode39Test.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Validation\Barcode; - use phpOMS\Validation\Barcode\Barcode39; class Barcode39Test extends \PHPUnit\Framework\TestCase diff --git a/tests/Validation/Barcode/Barcode93Test.php b/tests/Validation/Barcode/Barcode93Test.php index e445f7b95..ec1e6ddc9 100644 --- a/tests/Validation/Barcode/Barcode93Test.php +++ b/tests/Validation/Barcode/Barcode93Test.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Validation\Barcode; - use phpOMS\Validation\Barcode\Barcode93; class Barcode93Test extends \PHPUnit\Framework\TestCase diff --git a/tests/Validation/Barcode/BarcodeCodebarTest.php b/tests/Validation/Barcode/BarcodeCodebarTest.php index e3f7e1424..38279afd0 100644 --- a/tests/Validation/Barcode/BarcodeCodebarTest.php +++ b/tests/Validation/Barcode/BarcodeCodebarTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Validation\Barcode; - use phpOMS\Validation\Barcode\BarcodeCodebar; class BarcodeCodebarTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Validation/Barcode/BarcodeDatamatrixTest.php b/tests/Validation/Barcode/BarcodeDatamatrixTest.php index 103abc10c..71981cbcd 100644 --- a/tests/Validation/Barcode/BarcodeDatamatrixTest.php +++ b/tests/Validation/Barcode/BarcodeDatamatrixTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Validation\Barcode; - use phpOMS\Validation\Barcode\BarcodeDatamatrix; class BarcodeDatamatrixTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Validation/Barcode/BarcodeEANTest.php b/tests/Validation/Barcode/BarcodeEANTest.php index 631c39546..826a13f7e 100644 --- a/tests/Validation/Barcode/BarcodeEANTest.php +++ b/tests/Validation/Barcode/BarcodeEANTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Validation\Barcode; - use phpOMS\Validation\Barcode\BarcodeEAN; class BarcodeEANTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Validation/Barcode/BarcodeMSITest.php b/tests/Validation/Barcode/BarcodeMSITest.php index a3dc71456..ff5df7076 100644 --- a/tests/Validation/Barcode/BarcodeMSITest.php +++ b/tests/Validation/Barcode/BarcodeMSITest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Validation\Barcode; - use phpOMS\Validation\Barcode\BarcodeMSI; class BarcodeMSITest extends \PHPUnit\Framework\TestCase diff --git a/tests/Validation/Barcode/BarcodeTest.php b/tests/Validation/Barcode/BarcodeTest.php index 588a9a230..ed6efc2f0 100644 --- a/tests/Validation/Barcode/BarcodeTest.php +++ b/tests/Validation/Barcode/BarcodeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Validation\Barcode; - use phpOMS\Validation\Barcode\Barcode; class BarcodeTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Validation/Barcode/QrCodeTest.php b/tests/Validation/Barcode/QrCodeTest.php index 5c7b38931..a704f13dd 100644 --- a/tests/Validation/Barcode/QrCodeTest.php +++ b/tests/Validation/Barcode/QrCodeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Validation\Barcode; - use phpOMS\Validation\Barcode\QrCode; class QrCodeTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Validation/Base/DateTimeTest.php b/tests/Validation/Base/DateTimeTest.php index c9fb24a1c..e5318a8b1 100644 --- a/tests/Validation/Base/DateTimeTest.php +++ b/tests/Validation/Base/DateTimeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Validation\Base; - use phpOMS\Validation\Base\DateTime; class DateTimeTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Validation/Finance/BICTest.php b/tests/Validation/Finance/BICTest.php index 3d814f90f..2ebec80c7 100644 --- a/tests/Validation/Finance/BICTest.php +++ b/tests/Validation/Finance/BICTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Validation\Finance; - use phpOMS\Validation\Finance\BIC; class BICTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Validation/Finance/CreditCardTest.php b/tests/Validation/Finance/CreditCardTest.php index 3759ce1e5..48554e9dd 100644 --- a/tests/Validation/Finance/CreditCardTest.php +++ b/tests/Validation/Finance/CreditCardTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Validation\Finance; - use phpOMS\Validation\Finance\CreditCard; class CreditCardTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Validation/Finance/IbanEnumTest.php b/tests/Validation/Finance/IbanEnumTest.php index ade79124e..fdd4116cb 100644 --- a/tests/Validation/Finance/IbanEnumTest.php +++ b/tests/Validation/Finance/IbanEnumTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Validation\Finance; - use phpOMS\Validation\Finance\IbanEnum; class IbanEnumTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Validation/Finance/IbanErrorTypeTest.php b/tests/Validation/Finance/IbanErrorTypeTest.php index ff4a9f217..3e1fce831 100644 --- a/tests/Validation/Finance/IbanErrorTypeTest.php +++ b/tests/Validation/Finance/IbanErrorTypeTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Validation\Finance; - use phpOMS\Validation\Finance\IbanErrorType; class IbanErrorTypeTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Validation/Finance/IbanTest.php b/tests/Validation/Finance/IbanTest.php index cc734b717..06a4c958b 100644 --- a/tests/Validation/Finance/IbanTest.php +++ b/tests/Validation/Finance/IbanTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Validation\Finance; - use phpOMS\Validation\Finance\Iban; class IbanTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Validation/Network/EmailTest.php b/tests/Validation/Network/EmailTest.php index 9663e55a1..a075729e1 100644 --- a/tests/Validation/Network/EmailTest.php +++ b/tests/Validation/Network/EmailTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Validation\Network; - use phpOMS\Validation\Network\Email; class EmailTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Validation/Network/HostnameTest.php b/tests/Validation/Network/HostnameTest.php index 620c5c3ec..60cc6bd47 100644 --- a/tests/Validation/Network/HostnameTest.php +++ b/tests/Validation/Network/HostnameTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Validation\Network; - use phpOMS\Validation\Network\Hostname; class HostnameTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Validation/Network/IpTest.php b/tests/Validation/Network/IpTest.php index 88442b7e6..6492a889d 100644 --- a/tests/Validation/Network/IpTest.php +++ b/tests/Validation/Network/IpTest.php @@ -14,7 +14,6 @@ namespace phpOMS\tests\Validation\Network; - use phpOMS\Validation\Network\Ip; class IpTest extends \PHPUnit\Framework\TestCase diff --git a/tests/Views/ViewTest.php b/tests/Views/ViewTest.php index 724a52038..c0faeff37 100644 --- a/tests/Views/ViewTest.php +++ b/tests/Views/ViewTest.php @@ -96,7 +96,7 @@ class ViewTest extends \PHPUnit\Framework\TestCase self::assertEquals($response, $view->getResponse()); self::assertEquals('<a href="test">Test</a>', $view->printHtml('Test')); - + $tView = new View($this->app, $request, $response); self::assertTrue($view->addView('test', $tView)); self::assertEquals($tView, $view->getView('test')); @@ -109,7 +109,7 @@ class ViewTest extends \PHPUnit\Framework\TestCase public function testRender() { $view = new View($this->app, new Request(), new Response(new Localization())); - + $view->setTemplate('/phpOMS/tests/Views/testTemplate'); self::assertEquals('Test', $view->render());