From 8a91224f6607ee9107c4a3e292fd7410766fd469 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Fri, 21 Sep 2018 23:17:37 +0200 Subject: [PATCH] Fix whitespaces --- DataStorage/Database/DataMapperAbstract.php | 8 ++++---- Event/EventManager.php | 2 +- Localization/Localization.php | 4 ++-- Math/Matrix/CholeskyDecomposition.php | 2 +- Math/Matrix/EigenvalueDecomposition.php | 8 ++++---- Math/Matrix/LUDecomposition.php | 2 +- Math/Matrix/Matrix.php | 8 ++++---- Math/Matrix/QRDecomposition.php | 4 ++-- Math/Parser/Evaluator.php | 6 +++--- Stdlib/Base/Iban.php | 2 +- Stdlib/Graph/Edge.php | 4 ++-- Stdlib/Graph/Graph.php | 2 +- Stdlib/Graph/Node.php | 2 +- Stdlib/Queue/PriorityQueue.php | 2 +- Uri/UriFactory.php | 2 +- Utils/Converter/Ip.php | 6 +++--- Utils/RnG/Phone.php | 4 ++-- Utils/TaskSchedule/CronJob.php | 2 +- Validation/Validator.php | 2 +- tests/DataStorage/Database/Query/BuilderTest.php | 4 ++-- tests/Event/EventManagerTest.php | 4 ++-- tests/Localization/Defaults/CityMapperTest.php | 4 ++-- tests/Localization/Defaults/CountryMapperTest.php | 4 ++-- tests/Localization/Defaults/CurrencyMapperTest.php | 4 ++-- tests/Localization/Defaults/IbanMapperTest.php | 4 ++-- tests/Localization/Defaults/LanguageMapperTest.php | 4 ++-- tests/Math/Statistic/Forecast/ErrorTest.php | 8 ++++---- tests/Module/ModuleFactoryTest.php | 4 ++-- tests/Stdlib/Graph/NodeTest.php | 2 +- tests/Stdlib/Queue/PriorityQueueTest.php | 8 ++++---- tests/Utils/Parser/Php/ArrayParserTest.php | 4 ++-- tests/Utils/TaskSchedule/TaskSchedulerTest.php | 4 ++-- 32 files changed, 65 insertions(+), 65 deletions(-) diff --git a/DataStorage/Database/DataMapperAbstract.php b/DataStorage/Database/DataMapperAbstract.php index db2638ceb..6eadb61ff 100644 --- a/DataStorage/Database/DataMapperAbstract.php +++ b/DataStorage/Database/DataMapperAbstract.php @@ -570,7 +570,7 @@ class DataMapperAbstract implements DataMapperInterface /** * Create relation - * + * * This is only possible for hasMany objects which are stored in a relation table * * @param string $member Member name of the relation @@ -651,9 +651,9 @@ class DataMapperAbstract implements DataMapperInterface } // Setting relation value (id) for relation (since the relation is not stored in an extra relation table) - /** - * @todo: this if comparison is correct, trust me. however, - * manybe it makes more sense to simply check if 'src' isset(static::$hasMany[$propertyName]['src']) + /** + * @todo: this if comparison is correct, trust me. however, + * manybe it makes more sense to simply check if 'src' isset(static::$hasMany[$propertyName]['src']) * source shouldn't be set if the relation is stored in the object itself */ /** @var string $table */ diff --git a/Event/EventManager.php b/Event/EventManager.php index c86eeee42..936a0891e 100644 --- a/Event/EventManager.php +++ b/Event/EventManager.php @@ -196,7 +196,7 @@ final class EventManager * * @since 1.0.0 */ - private function detachGroup(string $group) : bool + private function detachGroup(string $group) : bool { if (isset($this->groups[$group])) { unset($this->groups[$group]); diff --git a/Localization/Localization.php b/Localization/Localization.php index aa7887a7f..242555771 100644 --- a/Localization/Localization.php +++ b/Localization/Localization.php @@ -162,7 +162,7 @@ final class Localization if ($fileContent === false) { return; - } + } $this->importLocale(\json_decode($fileContent, true)); @@ -174,7 +174,7 @@ final class Localization if ($fileContent === false) { return; - } + } $this->importLocale(\json_decode($fileContent, true)); } diff --git a/Math/Matrix/CholeskyDecomposition.php b/Math/Matrix/CholeskyDecomposition.php index fc86eca55..49b3be002 100644 --- a/Math/Matrix/CholeskyDecomposition.php +++ b/Math/Matrix/CholeskyDecomposition.php @@ -18,7 +18,7 @@ use phpOMS\Math\Matrix\Exception\InvalidDimensionException; /** * Cholesky decomposition - * + * * A is syymetric, positive definite then A = L*L' * * @package phpOMS\Math\Matrix diff --git a/Math/Matrix/EigenvalueDecomposition.php b/Math/Matrix/EigenvalueDecomposition.php index 9fe6269bf..72ecbeae9 100644 --- a/Math/Matrix/EigenvalueDecomposition.php +++ b/Math/Matrix/EigenvalueDecomposition.php @@ -18,7 +18,7 @@ use phpOMS\Math\Geometry\Shape\D2\Triangle; /** * Eigenvalue decomposition - * + * * A symmetric then A = V*D*V' * A not symmetric then (potentially) A = V*D*inverse(V) * @@ -645,7 +645,7 @@ final class EigenvalueDecomposition ) { break; } - + --$m; } @@ -657,7 +657,7 @@ final class EigenvalueDecomposition } } - + } } } @@ -667,7 +667,7 @@ final class EigenvalueDecomposition return $this->isSymmetric; } - public function getV() : Matrix + public function getV() : Matrix { $matrix = new Matrix(); $matrix->setMatrix($this->V); diff --git a/Math/Matrix/LUDecomposition.php b/Math/Matrix/LUDecomposition.php index cf187c8c5..98c6d1b8b 100644 --- a/Math/Matrix/LUDecomposition.php +++ b/Math/Matrix/LUDecomposition.php @@ -18,7 +18,7 @@ use phpOMS\Math\Matrix\Exception\InvalidDimensionException; /** * LU decomposition - * + * * A(piv,:) = L*U * * @package phpOMS\Math\Matrix diff --git a/Math/Matrix/Matrix.php b/Math/Matrix/Matrix.php index 302861609..cb6a19103 100644 --- a/Math/Matrix/Matrix.php +++ b/Math/Matrix/Matrix.php @@ -148,7 +148,7 @@ class Matrix implements \ArrayAccess, \Iterator /** * Get sub matrix array. - * + * * @param int $iRow Start row * @param int $lRow End row * @param int $iCol Start col @@ -175,7 +175,7 @@ class Matrix implements \ArrayAccess, \Iterator /** * Get sub matrix array. - * + * * @param array $rows Row indices * @param array $cols Row indices * @@ -203,7 +203,7 @@ class Matrix implements \ArrayAccess, \Iterator /** * Get sub matrix array. - * + * * @param int $iRow Start row * @param int $lRow End row * @param array $cols Row indices @@ -231,7 +231,7 @@ class Matrix implements \ArrayAccess, \Iterator /** * Get sub matrix array. - * + * * @param array $rows Row indices * @param int $iCol Start col * @param int $lCol End col diff --git a/Math/Matrix/QRDecomposition.php b/Math/Matrix/QRDecomposition.php index ae2e1557c..25459b0ea 100644 --- a/Math/Matrix/QRDecomposition.php +++ b/Math/Matrix/QRDecomposition.php @@ -19,7 +19,7 @@ use phpOMS\Math\Geometry\Shape\D2\Triangle; /** * QR decomposition - * + * * For every matrix A = Q*R * * @package phpOMS\Math\Matrix @@ -246,7 +246,7 @@ final class QRDecomposition $nx = $B->getN(); $X = $B->toArray(); - + // Compute Y = transpose(Q)*B for ($k = 0; $k < $this->n; ++$k) { for ($j = 0; $j < $nx; ++$j) { diff --git a/Math/Parser/Evaluator.php b/Math/Parser/Evaluator.php index d9746f834..016fc0a67 100644 --- a/Math/Parser/Evaluator.php +++ b/Math/Parser/Evaluator.php @@ -79,7 +79,7 @@ class Evaluator * * @since 1.0.0 */ - private static function parseValue($value) + private static function parseValue($value) { return !\is_string($value) ? $value : (\stripos($value, '.') === false ? (int) $value : (float) $value); } @@ -112,8 +112,8 @@ class Evaluator return []; } - $equation = \array_filter($equation, function($n) { - return $n !== ''; + $equation = \array_filter($equation, function($n) { + return $n !== ''; }); foreach ($equation as $i => $token) { diff --git a/Stdlib/Base/Iban.php b/Stdlib/Base/Iban.php index 9f122f203..a42024c7f 100644 --- a/Stdlib/Base/Iban.php +++ b/Stdlib/Base/Iban.php @@ -137,7 +137,7 @@ class Iban implements \Serializable public function getCountry() : string { $country = \substr($this->iban, 0, 2); - + return $country === false ? '?' : $country; } diff --git a/Stdlib/Graph/Edge.php b/Stdlib/Graph/Edge.php index e7358fee4..f6e9b9a37 100644 --- a/Stdlib/Graph/Edge.php +++ b/Stdlib/Graph/Edge.php @@ -26,7 +26,7 @@ class Edge { /** * Node1. - * + * * In case of directed edges this is the from node/starting node. * * @var Node @@ -36,7 +36,7 @@ class Edge /** * Node2. - * + * * In case of directed edges this is the to node/end node. * * @var Node diff --git a/Stdlib/Graph/Graph.php b/Stdlib/Graph/Graph.php index 493fe7a8d..e3ccadb01 100644 --- a/Stdlib/Graph/Graph.php +++ b/Stdlib/Graph/Graph.php @@ -69,7 +69,7 @@ class Graph public function addNodeRelative(Node $relative, Node $node) : Graph { $this->edges[] = new Edge($relative, $node); - + return $this; } diff --git a/Stdlib/Graph/Node.php b/Stdlib/Graph/Node.php index 695bb13f2..3b93b7a81 100644 --- a/Stdlib/Graph/Node.php +++ b/Stdlib/Graph/Node.php @@ -28,7 +28,7 @@ class Node { /** * Node data. - * + * * @var mixed * @since 1.0.0 */ diff --git a/Stdlib/Queue/PriorityQueue.php b/Stdlib/Queue/PriorityQueue.php index 80fd0cc8c..33dd2e370 100644 --- a/Stdlib/Queue/PriorityQueue.php +++ b/Stdlib/Queue/PriorityQueue.php @@ -252,7 +252,7 @@ class PriorityQueue implements \Countable, \Serializable { if ($this->type === PriorityMode::FIFO || $this->type === PriorityMode::LIFO) { $this->queue[$id]['priority'] = $priority; - + return; } diff --git a/Uri/UriFactory.php b/Uri/UriFactory.php index 89e5c9331..688b2e4c0 100644 --- a/Uri/UriFactory.php +++ b/Uri/UriFactory.php @@ -77,7 +77,7 @@ final class UriFactory if (\stripos($key, $identifier) === 0) { unset(self::$uri[$key]); } - } + } } } diff --git a/Utils/Converter/Ip.php b/Utils/Converter/Ip.php index 21a86dad0..019a8f559 100644 --- a/Utils/Converter/Ip.php +++ b/Utils/Converter/Ip.php @@ -49,9 +49,9 @@ class Ip { $split = \explode('.', $ip); - return ((int) $split[0] ?? 0) * (256 ** 3) - + ((int) $split[1] ?? 0) * (256 ** 2) - + ((int) $split[2] ?? 0) * (256 ** 1) + return ((int) $split[0] ?? 0) * (256 ** 3) + + ((int) $split[1] ?? 0) * (256 ** 2) + + ((int) $split[2] ?? 0) * (256 ** 1) + ((int) $split[3] ?? 0); } } diff --git a/Utils/RnG/Phone.php b/Utils/RnG/Phone.php index 928dbcbe6..db85b5d7e 100644 --- a/Utils/RnG/Phone.php +++ b/Utils/RnG/Phone.php @@ -37,10 +37,10 @@ class Phone * @since 1.0.0 */ public static function generatePhone( - $isInt = true, + $isInt = true, $layout = [ 'struct' => '+$1 ($2) $3-$4', - 'size' => [null, [3, 4], [3, 5], [3, 8],],], + 'size' => [null, [3, 4], [3, 5], [3, 8],],], $countries = null ) { $numberString = $layout['struct']; diff --git a/Utils/TaskSchedule/CronJob.php b/Utils/TaskSchedule/CronJob.php index 01ab3bd47..ec0ff40ad 100644 --- a/Utils/TaskSchedule/CronJob.php +++ b/Utils/TaskSchedule/CronJob.php @@ -33,7 +33,7 @@ class CronJob extends TaskAbstract { return $this->interval . ' ' . $this->command . ' # name="' . $this->id . '" ' . $this->comment; } - + /** * {@inheritdoc} */ diff --git a/Validation/Validator.php b/Validation/Validator.php index 0cfb7922c..058144f9f 100644 --- a/Validation/Validator.php +++ b/Validation/Validator.php @@ -34,7 +34,7 @@ final class Validator extends ValidatorAbstract * @param array $constraints Constraints for validation * * @return bool - * + * * @throws \Exception * * @since 1.0.0 diff --git a/tests/DataStorage/Database/Query/BuilderTest.php b/tests/DataStorage/Database/Query/BuilderTest.php index 0671bf327..e9e4f2184 100644 --- a/tests/DataStorage/Database/Query/BuilderTest.php +++ b/tests/DataStorage/Database/Query/BuilderTest.php @@ -202,7 +202,7 @@ class BuilderTest extends \PHPUnit\Framework\TestCase $query = new Builder($this->con); $sql = 'SELECT `a`.`test` FROM `a` JOIN `b` ON `a`.`id` = `b`.`id` AND `a`.`id2` = `b`.`id2` WHERE `a`.`test` = 1;'; self::assertEquals($sql, $query->select('a.test')->from('a')->join('b')->on('a.id', '=', 'b.id')->andOn('a.id2', '=', 'b.id2')->where('a.test', '=', 1)->toSql()); - + $query = new Builder($this->con); $sql = 'SELECT `a`.`test` FROM `a` LEFT JOIN `b` ON `a`.`id` = `b`.`id` WHERE `a`.`test` = 1;'; self::assertEquals($sql, $query->select('a.test')->from('a')->leftJoin('b')->on('a.id', '=', 'b.id')->where('a.test', '=', 1)->toSql()); @@ -242,7 +242,7 @@ class BuilderTest extends \PHPUnit\Framework\TestCase $query = new Builder($this->con); $sql = 'SELECT `a`.`test` FROM `a` FULL JOIN `b` ON `a`.`id` = `b`.`id` WHERE `a`.`test` = 1;'; self::assertEquals($sql, $query->select('a.test')->from('a')->fullJoin('b')->on('a.id', '=', 'b.id')->where('a.test', '=', 1)->toSql()); - + $query = new Builder($this->con); $sql = 'SELECT `a`.`test` FROM `a` FULL OUTER JOIN `b` ON `a`.`id` = `b`.`id` WHERE `a`.`test` = 1;'; self::assertEquals($sql, $query->select('a.test')->from('a')->fullOuterJoin('b')->on('a.id', '=', 'b.id')->where('a.test', '=', 1)->toSql()); diff --git a/tests/Event/EventManagerTest.php b/tests/Event/EventManagerTest.php index a5b06949f..9fe9d623b 100644 --- a/tests/Event/EventManagerTest.php +++ b/tests/Event/EventManagerTest.php @@ -70,14 +70,14 @@ class EventManagerTest extends \PHPUnit\Framework\TestCase self::assertTrue($event->detach('group')); self::assertEquals(0, $event->count()); self::assertFalse($event->trigger('group')); - + self::assertFalse($event->detach('group')); } public function testRemove() { $event = new EventManager(); - + self::assertTrue($event->attach('group1', function() { return true; }, true, false)); self::assertTrue($event->attach('group2', function() { return true; }, true, false)); self::assertEquals(2, $event->count()); diff --git a/tests/Localization/Defaults/CityMapperTest.php b/tests/Localization/Defaults/CityMapperTest.php index d4a3d12cd..b3e67b98c 100644 --- a/tests/Localization/Defaults/CityMapperTest.php +++ b/tests/Localization/Defaults/CityMapperTest.php @@ -22,7 +22,7 @@ use phpOMS\DataStorage\Database\Connection\SQLiteConnection; class CityMapperTest extends \PHPUnit\Framework\TestCase { - static function setUpBeforeClass() + static function setUpBeforeClass() { $con = new SqliteConnection([ 'prefix' => '', @@ -45,7 +45,7 @@ class CityMapperTest extends \PHPUnit\Framework\TestCase self::assertLessThan(9, $obj->getLong()); } - static function tearDownAfterClass() + static function tearDownAfterClass() { DataMapperAbstract::setConnection($GLOBALS['dbpool']->get()); } diff --git a/tests/Localization/Defaults/CountryMapperTest.php b/tests/Localization/Defaults/CountryMapperTest.php index 335cddf58..dd2128ce7 100644 --- a/tests/Localization/Defaults/CountryMapperTest.php +++ b/tests/Localization/Defaults/CountryMapperTest.php @@ -22,7 +22,7 @@ use phpOMS\DataStorage\Database\Connection\SQLiteConnection; class CountryMapperTest extends \PHPUnit\Framework\TestCase { - static function setUpBeforeClass() + static function setUpBeforeClass() { $con = new SqliteConnection([ 'prefix' => '', @@ -43,7 +43,7 @@ class CountryMapperTest extends \PHPUnit\Framework\TestCase self::assertEquals('ISO 3166-2:DE', $obj->getSubdevision()); } - static function tearDownAfterClass() + static function tearDownAfterClass() { DataMapperAbstract::setConnection($GLOBALS['dbpool']->get()); } diff --git a/tests/Localization/Defaults/CurrencyMapperTest.php b/tests/Localization/Defaults/CurrencyMapperTest.php index 8184a5d7b..c4566dff9 100644 --- a/tests/Localization/Defaults/CurrencyMapperTest.php +++ b/tests/Localization/Defaults/CurrencyMapperTest.php @@ -22,7 +22,7 @@ use phpOMS\DataStorage\Database\Connection\SQLiteConnection; class CurrencyMapperTest extends \PHPUnit\Framework\TestCase { - static function setUpBeforeClass() + static function setUpBeforeClass() { $con = new SqliteConnection([ 'prefix' => '', @@ -43,7 +43,7 @@ class CurrencyMapperTest extends \PHPUnit\Framework\TestCase self::assertContains('Germany', $obj->getCountries()); } - static function tearDownAfterClass() + static function tearDownAfterClass() { DataMapperAbstract::setConnection($GLOBALS['dbpool']->get()); } diff --git a/tests/Localization/Defaults/IbanMapperTest.php b/tests/Localization/Defaults/IbanMapperTest.php index 3c9ec8790..b198e4418 100644 --- a/tests/Localization/Defaults/IbanMapperTest.php +++ b/tests/Localization/Defaults/IbanMapperTest.php @@ -22,7 +22,7 @@ use phpOMS\DataStorage\Database\Connection\SQLiteConnection; class IbanMapperTest extends \PHPUnit\Framework\TestCase { - static function setUpBeforeClass() + static function setUpBeforeClass() { $con = new SqliteConnection([ 'prefix' => '', @@ -42,7 +42,7 @@ class IbanMapperTest extends \PHPUnit\Framework\TestCase self::assertEquals('DEkk bbbb bbbb cccc cccc cc', $obj->getFields()); } - static function tearDownAfterClass() + static function tearDownAfterClass() { DataMapperAbstract::setConnection($GLOBALS['dbpool']->get()); } diff --git a/tests/Localization/Defaults/LanguageMapperTest.php b/tests/Localization/Defaults/LanguageMapperTest.php index d2c57a5f1..1632f7700 100644 --- a/tests/Localization/Defaults/LanguageMapperTest.php +++ b/tests/Localization/Defaults/LanguageMapperTest.php @@ -22,7 +22,7 @@ use phpOMS\DataStorage\Database\Connection\SQLiteConnection; class LanguageMapperTest extends \PHPUnit\Framework\TestCase { - static function setUpBeforeClass() + static function setUpBeforeClass() { $con = new SqliteConnection([ 'prefix' => '', @@ -43,7 +43,7 @@ class LanguageMapperTest extends \PHPUnit\Framework\TestCase self::assertEquals('ger', $obj->getCode3()); } - static function tearDownAfterClass() + static function tearDownAfterClass() { DataMapperAbstract::setConnection($GLOBALS['dbpool']->get()); } diff --git a/tests/Math/Statistic/Forecast/ErrorTest.php b/tests/Math/Statistic/Forecast/ErrorTest.php index b6f697518..983d60be4 100644 --- a/tests/Math/Statistic/Forecast/ErrorTest.php +++ b/tests/Math/Statistic/Forecast/ErrorTest.php @@ -73,12 +73,12 @@ class ErrorTest extends \PHPUnit\Framework\TestCase public function testMASE() { $observed = [ - -2.9, -2.83, -0.95, -0.88, 1.21, -1.67, 0.83, -0.27, 1.36, + -2.9, -2.83, -0.95, -0.88, 1.21, -1.67, 0.83, -0.27, 1.36, -0.34, 0.48, -2.83, -0.95, -0.88, 1.21, -1.67, -2.99, 1.24, 0.64 ]; - + $forecast = [ - -2.95, -2.7, -1.00, -0.68, 1.50, -1.00, 0.90, -0.37, 1.26, + -2.95, -2.7, -1.00, -0.68, 1.50, -1.00, 0.90, -0.37, 1.26, -0.54, 0.58, -2.13, -0.75, -0.89, 1.25, -1.65, -3.20, 1.29, 0.60 ]; @@ -91,7 +91,7 @@ class ErrorTest extends \PHPUnit\Framework\TestCase public function testScaledError() { self::assertEquals( - [Error::getScaledError(Error::getForecastError(1000, 700), [1000, 800])], + [Error::getScaledError(Error::getForecastError(1000, 700), [1000, 800])], Error::getScaledErrorArray([Error::getForecastError(1000, 700)], [1000, 800]) ); } diff --git a/tests/Module/ModuleFactoryTest.php b/tests/Module/ModuleFactoryTest.php index 714f3bfc2..d91eb3763 100644 --- a/tests/Module/ModuleFactoryTest.php +++ b/tests/Module/ModuleFactoryTest.php @@ -26,8 +26,8 @@ class ModuleFactoryTest extends \PHPUnit\Framework\TestCase $instance = NullModule::class; if (\file_exists(__DIR__ . '/../../../Modules')) { $instance = \Modules\Admin\Controller\ApiController::class; - } - + } + self::assertInstanceOf($instance, ModuleFactory::getInstance('Admin', new class extends ApplicationAbstract { protected $appName = 'Api'; })); } } diff --git a/tests/Stdlib/Graph/NodeTest.php b/tests/Stdlib/Graph/NodeTest.php index b6c52101a..f9f84a125 100644 --- a/tests/Stdlib/Graph/NodeTest.php +++ b/tests/Stdlib/Graph/NodeTest.php @@ -27,7 +27,7 @@ class NodeTest extends \PHPUnit\Framework\TestCase { $node = new Node(1); self::assertEquals(1, $node->getData()); - + $node->setData(false); self::assertEquals(false, $node->getData()); } diff --git a/tests/Stdlib/Queue/PriorityQueueTest.php b/tests/Stdlib/Queue/PriorityQueueTest.php index a9e0cffc7..b0166252c 100644 --- a/tests/Stdlib/Queue/PriorityQueueTest.php +++ b/tests/Stdlib/Queue/PriorityQueueTest.php @@ -86,7 +86,7 @@ class PriorityQueueTest extends \PHPUnit\Framework\TestCase self::assertEquals(['data' => 'a', 'priority' => -2], $queue->get($id1)); self::assertEquals(['data' => 'a', 'priority' => -2], $queue->pop()); self::assertEquals(2, $queue->count()); - + self::assertTrue($queue->delete($id3)); self::assertFalse($queue->delete($id3)); self::assertEquals(1, $queue->count()); @@ -124,7 +124,7 @@ class PriorityQueueTest extends \PHPUnit\Framework\TestCase self::assertEquals(['data' => 'c', 'priority' => -1], $queue->get($id3)); self::assertEquals(['data' => 'c', 'priority' => -1], $queue->pop()); self::assertEquals(2, $queue->count()); - + self::assertTrue($queue->delete($id1)); self::assertFalse($queue->delete($id1)); self::assertEquals(1, $queue->count()); @@ -162,7 +162,7 @@ class PriorityQueueTest extends \PHPUnit\Framework\TestCase self::assertEquals(['data' => 'a', 'priority' => 3], $queue->get($id1)); self::assertEquals(['data' => 'a', 'priority' => 3], $queue->pop()); self::assertEquals(2, $queue->count()); - + self::assertTrue($queue->delete($id2)); self::assertFalse($queue->delete($id2)); self::assertEquals(1, $queue->count()); @@ -200,7 +200,7 @@ class PriorityQueueTest extends \PHPUnit\Framework\TestCase self::assertEquals(['data' => 'a', 'priority' => 1], $queue->get($id1)); self::assertEquals(['data' => 'a', 'priority' => 1], $queue->pop()); self::assertEquals(2, $queue->count()); - + self::assertTrue($queue->delete($id2)); self::assertFalse($queue->delete($id2)); self::assertEquals(1, $queue->count()); diff --git a/tests/Utils/Parser/Php/ArrayParserTest.php b/tests/Utils/Parser/Php/ArrayParserTest.php index 001adfe90..94a4bbec8 100644 --- a/tests/Utils/Parser/Php/ArrayParserTest.php +++ b/tests/Utils/Parser/Php/ArrayParserTest.php @@ -19,8 +19,8 @@ class ArrayParserTest extends \PHPUnit\Framework\TestCase { public function testParser() { - $serializable = new class implements \Serializable { - public function serialize() { return 2; } + $serializable = new class implements \Serializable { + public function serialize() { return 2; } public function unserialize($raw) {} }; diff --git a/tests/Utils/TaskSchedule/TaskSchedulerTest.php b/tests/Utils/TaskSchedule/TaskSchedulerTest.php index 3f18146fa..c41e5edda 100644 --- a/tests/Utils/TaskSchedule/TaskSchedulerTest.php +++ b/tests/Utils/TaskSchedule/TaskSchedulerTest.php @@ -30,10 +30,10 @@ class TaskSchedulerTest extends \PHPUnit\Framework\TestCase $cron = new TaskScheduler(); self::assertEquals([], $cron->getAllByName('testCronJob', false)); - + $job = new Schedule('testCronJob', 'testFile', '0 0 1 1 *'); $cron->create($job); - + self::assertTrue(!empty($cron->getAllByName('testCronJob', false))); if (!empty($cron->getAllByName('testCronJob', false))) { self::assertEquals('testFile', $cron->getAllByName('testCronJob', false)[0]->getCommand());