From 3aa3c6b0ddcd9af5539de637c629deacc430c061 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sun, 3 Jun 2018 14:22:05 +0200 Subject: [PATCH] Handle open todos --- DataStorage/Cache/Connection/FileCache.php | 41 +++++++++---------- .../Connection/ConnectionAbstract.php | 21 +++++++++- Math/Functions/Functions.php | 22 +++++++++- Math/Geometry/ConvexHull/MonotoneChain.php | 4 +- Math/Geometry/Shape/D2/Polygon.php | 13 ++++-- Math/Matrix/Matrix.php | 13 ------ Message/Console/Request.php | 2 - Message/Http/Header.php | 2 - Message/Http/Request.php | 5 +-- Module/ModuleManager.php | 7 ---- Stdlib/Base/SmartDateTime.php | 3 +- System/File/ContainerInterface.php | 3 +- System/File/Ftp/Directory.php | 4 +- System/File/Ftp/File.php | 4 +- System/File/Local/Directory.php | 4 +- System/File/Local/File.php | 4 +- Uri/UriFactory.php | 36 +++++++++------- Utils/Git/Repository.php | 4 -- tests/Uri/UriFactoryTest.php | 5 ++- tests/Views/ViewTest.php | 4 -- 20 files changed, 108 insertions(+), 93 deletions(-) diff --git a/DataStorage/Cache/Connection/FileCache.php b/DataStorage/Cache/Connection/FileCache.php index 7ad8ccadf..75f42b2e0 100644 --- a/DataStorage/Cache/Connection/FileCache.php +++ b/DataStorage/Cache/Connection/FileCache.php @@ -126,8 +126,7 @@ class FileCache extends ConnectionAbstract return; } - // todo: allow $key to contain / as char and create subdirectory if necessary. This is important for cleaner caching. - $path = File::sanitize($key, self::SANITIZE); + $path = Directory::sanitize($key, self::SANITIZE); File::put($this->con . '/' . trim($path, '/') . '.cache', $this->build($value, $expire)); } @@ -242,10 +241,10 @@ class FileCache extends ConnectionAbstract */ private function getExpire(string $raw) : int { - $expireStart = strpos($raw, self::DELIM); - $expireEnd = strpos($raw, self::DELIM, $expireStart + 1); + $expireStart = \strpos($raw, self::DELIM); + $expireEnd = \strpos($raw, self::DELIM, $expireStart + 1); - return (int) substr($raw, $expireStart + 1, $expireEnd - ($expireStart + 1)); + return (int) \substr($raw, $expireStart + 1, $expireEnd - ($expireStart + 1)); } /** @@ -273,9 +272,9 @@ class FileCache extends ConnectionAbstract $raw = File::get($path); $type = (int) $raw[0]; - $expireStart = strpos($raw, self::DELIM); - $expireEnd = strpos($raw, self::DELIM, $expireStart + 1); - $cacheExpire = substr($raw, $expireStart + 1, $expireEnd - ($expireStart + 1)); + $expireStart = \strpos($raw, self::DELIM); + $expireEnd = \strpos($raw, self::DELIM, $expireStart + 1); + $cacheExpire = \substr($raw, $expireStart + 1, $expireEnd - ($expireStart + 1)); if ($cacheExpire >= 0 && $created + $cacheExpire < $now) { $this->delete($key); @@ -303,16 +302,16 @@ class FileCache extends ConnectionAbstract switch ($type) { case CacheValueType::_INT: - $value = (int) substr($raw, $expireEnd + 1); + $value = (int) \substr($raw, $expireEnd + 1); break; case CacheValueType::_FLOAT: - $value = (float) substr($raw, $expireEnd + 1); + $value = (float) \substr($raw, $expireEnd + 1); break; case CacheValueType::_BOOL: - $value = (bool) substr($raw, $expireEnd + 1); + $value = (bool) \substr($raw, $expireEnd + 1); break; case CacheValueType::_STRING: - $value = substr($raw, $expireEnd + 1); + $value = \substr($raw, $expireEnd + 1); break; case CacheValueType::_ARRAY: $value = \json_decode(substr($raw, $expireEnd + 1)); @@ -322,9 +321,9 @@ class FileCache extends ConnectionAbstract break; case CacheValueType::_SERIALIZABLE: case CacheValueType::_JSONSERIALIZABLE: - $namespaceStart = strpos($raw, self::DELIM, $expireEnd); - $namespaceEnd = strpos($raw, self::DELIM, $namespaceStart + 1); - $namespace = substr($raw, $namespaceStart, $namespaceEnd); + $namespaceStart = \strpos($raw, self::DELIM, $expireEnd); + $namespaceEnd = \strpos($raw, self::DELIM, $namespaceStart + 1); + $namespace = \substr($raw, $namespaceStart, $namespaceEnd); $value = $namespace::unserialize(substr($raw, $namespaceEnd + 1)); break; @@ -351,12 +350,12 @@ class FileCache extends ConnectionAbstract } if ($expire >= 0) { - $created = Directory::created(File::sanitize($key, self::SANITIZE))->getTimestamp(); - $now = time(); + $created = Directory::created(Directory::sanitize($key, self::SANITIZE))->getTimestamp(); + $now = \time(); $raw = \file_get_contents($path); - $expireStart = strpos($raw, self::DELIM); - $expireEnd = strpos($raw, self::DELIM, $expireStart + 1); - $cacheExpire = substr($raw, $expireStart + 1, $expireEnd - ($expireStart + 1)); + $expireStart = \strpos($raw, self::DELIM); + $expireEnd = \strpos($raw, self::DELIM, $expireStart + 1); + $cacheExpire = \substr($raw, $expireStart + 1, $expireEnd - ($expireStart + 1)); if ($cacheExpire >= 0 && $created + $cacheExpire > $now) { File::delete($path); @@ -425,7 +424,7 @@ class FileCache extends ConnectionAbstract */ private function getPath($key) : string { - $path = File::sanitize($key, self::SANITIZE); + $path = Directory::sanitize($key, self::SANITIZE); return $this->con . '/' . trim($path, '/') . '.cache'; } } diff --git a/DataStorage/Database/Connection/ConnectionAbstract.php b/DataStorage/Database/Connection/ConnectionAbstract.php index 1adf1530f..59b2047cf 100644 --- a/DataStorage/Database/Connection/ConnectionAbstract.php +++ b/DataStorage/Database/Connection/ConnectionAbstract.php @@ -47,8 +47,6 @@ abstract class ConnectionAbstract implements ConnectionInterface * * The database prefix name for unique table names * - * @todo: make private? could add huge overhead since function call required - * * @var string * @since 1.0.0 */ @@ -94,6 +92,25 @@ abstract class ConnectionAbstract implements ConnectionInterface */ protected $schemaGrammar = null; + /** + * Set values + * + * @param string $name Variable name + * @param string $value Variable value + * + * @return void + * + * @since 1.0.0 + */ + public function __set($name, $value) : void + { + if (!empty($this->$name)) { + return; + } + + $this->$name = $value; + } + /** * {@inheritdoc} */ diff --git a/Math/Functions/Functions.php b/Math/Functions/Functions.php index 3fb814044..b82794bdc 100644 --- a/Math/Functions/Functions.php +++ b/Math/Functions/Functions.php @@ -246,7 +246,6 @@ final class Functions * @return array * * @since 1.0.0 - * todo: move to utils?! implement sqrt for array as well... could be usefull for others (e.g. matrix) */ public static function powerFloat(array $values, float $exp = 2.0) : array { @@ -268,7 +267,6 @@ final class Functions * @return array * * @since 1.0.0 - * todo: move to utils?! implement sqrt for array as well... could be usefull for others (e.g. matrix) */ public static function powerInt(array $values, int $exp = 2) : array { @@ -281,6 +279,26 @@ final class Functions return $squared; } + /** + * Sqrt all values in array. + * + * @param array $values Values to sqrt + * + * @return array + * + * @since 1.0.0 + */ + public static function sqrt(array $values) : array + { + $squared = []; + + foreach ($values as $value) { + $squared[] = sqrt($value); + } + + return $squared; + } + /** * Gets the relative position on a circular construct. * diff --git a/Math/Geometry/ConvexHull/MonotoneChain.php b/Math/Geometry/ConvexHull/MonotoneChain.php index 811756462..f2068baf6 100644 --- a/Math/Geometry/ConvexHull/MonotoneChain.php +++ b/Math/Geometry/ConvexHull/MonotoneChain.php @@ -21,8 +21,6 @@ namespace phpOMS\Math\Geometry\ConvexHull; * @license OMS License 1.0 * @link http://website.orange-management.de * @since 1.0.0 - * - * @todo : implement vertice class or use vertice class used by graphs? May be usefull in order to give vertices IDs! */ final class MonotoneChain { @@ -40,7 +38,7 @@ final class MonotoneChain /** * Create convex hull * - * @param array $points Points (Point Cloud) + * @param array> $points Points (Point Cloud) * * @return array * diff --git a/Math/Geometry/Shape/D2/Polygon.php b/Math/Geometry/Shape/D2/Polygon.php index 9e3168ae0..ca67290c9 100644 --- a/Math/Geometry/Shape/D2/Polygon.php +++ b/Math/Geometry/Shape/D2/Polygon.php @@ -102,16 +102,23 @@ final class Polygon implements D2ShapeInterface $countIntersect = 0; $polygonCount = count($polygon); - // todo: return based on highest possibility not by first match for ($i = 1; $i < $polygonCount; ++$i) { $vertex1 = $polygon[$i - 1]; $vertex2 = $polygon[$i]; - if (abs($vertex1['y'] - $vertex2['y']) < self::EPSILON && abs($vertex1['y'] - $point['y']) < self::EPSILON && $point['x'] > min($vertex1['x'], $vertex2['x']) && $point['x'] < max($vertex1['x'], $vertex2['x'])) { + if (abs($vertex1['y'] - $vertex2['y']) < self::EPSILON + && abs($vertex1['y'] - $point['y']) < self::EPSILON + && $point['x'] > min($vertex1['x'], $vertex2['x']) + && $point['x'] < max($vertex1['x'], $vertex2['x']) + ) { return 0; // boundary } - if ($point['y'] > min($vertex1['y'], $vertex2['y']) && $point['y'] <= max($vertex1['y'], $vertex2['y']) && $point['x'] <= max($vertex1['x'], $vertex2['x']) && abs($vertex1['y'] - $vertex2['y']) >= self::EPSILON) { + if ($point['y'] > min($vertex1['y'], $vertex2['y']) + && $point['y'] <= max($vertex1['y'], $vertex2['y']) + && $point['x'] <= max($vertex1['x'], $vertex2['x']) + && abs($vertex1['y'] - $vertex2['y']) >= self::EPSILON + ) { $xinters = ($point['y'] - $vertex1['y']) * ($vertex2['x'] - $vertex1['x']) / ($vertex2['y'] - $vertex1['y']) + $vertex1['x']; if (abs($xinters - $point['x']) < self::EPSILON) { diff --git a/Math/Matrix/Matrix.php b/Math/Matrix/Matrix.php index 93d28b474..2f41933ad 100644 --- a/Math/Matrix/Matrix.php +++ b/Math/Matrix/Matrix.php @@ -672,19 +672,6 @@ class Matrix implements \ArrayAccess, \Iterator return $sign; } - /** - * Lower triangulize matrix. - * - * @return Matrix - * - * @since 1.0.0 - */ - public function lowerTriangular() : Matrix - { - // todo: implement - return new Matrix($this->m, $this->n); - } - /** * Inverse matrix. * diff --git a/Message/Console/Request.php b/Message/Console/Request.php index 8724f8e47..a2d074f91 100644 --- a/Message/Console/Request.php +++ b/Message/Console/Request.php @@ -67,8 +67,6 @@ final class Request extends RequestAbstract * * @return void * - * @todo: maybe change to normal path string e.g. /some/path/here instead of hash! Remember to adjust navigation elements - * * @since 1.0.0 */ public function createRequestHashs(int $start = 0) : void diff --git a/Message/Http/Header.php b/Message/Http/Header.php index 84a5d3a7e..4922931b6 100644 --- a/Message/Http/Header.php +++ b/Message/Http/Header.php @@ -58,8 +58,6 @@ final class Header extends HeaderAbstract * * @return bool * - * @todo Allow to extend header key with additional values. - * * @since 1.0.0 */ public function set(string $key, string $header, bool $overwrite = false) : bool diff --git a/Message/Http/Request.php b/Message/Http/Request.php index df55e2ea7..f623bfff6 100644 --- a/Message/Http/Request.php +++ b/Message/Http/Request.php @@ -183,9 +183,9 @@ final class Request extends RequestAbstract */ private function setupUriBuilder() : void { + UriFactory::clean('?'); UriFactory::setQuery('/lang', $this->header->getL11n()->getLanguage()); - // todo: flush previous foreach ($this->data as $key => $value) { UriFactory::setQuery('?' . $key, $value); } @@ -221,8 +221,6 @@ final class Request extends RequestAbstract * * @return void * - * @todo: maybe change to normal path string e.g. /some/path/here instead of hash! Remember to adjust navigation elements - * * @since 1.0.0 */ public function createRequestHashs(int $start = 0) : void @@ -249,7 +247,6 @@ final class Request extends RequestAbstract */ public function isMobile() : bool { - // TODO: maybe replace this with smart media queries... checked gets handled in reverse!!! $useragent = $_SERVER['HTTP_USER_AGENT'] ?? ''; if (\preg_match('/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i', $useragent) || \preg_match('/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i', $useragent)) { diff --git a/Module/ModuleManager.php b/Module/ModuleManager.php index 3df839e6b..98644c43a 100644 --- a/Module/ModuleManager.php +++ b/Module/ModuleManager.php @@ -396,14 +396,7 @@ final class ModuleManager $this->activateModule($info); return true; - } catch (PathException $e) { - // todo: handle module doesn't exist or files are missing - //echo $e->getMessage(); - - return false; } catch (\Exception $e) { - //echo $e->getMessage(); - return false; } } diff --git a/Stdlib/Base/SmartDateTime.php b/Stdlib/Base/SmartDateTime.php index 12acb3f2e..cf3e617b0 100644 --- a/Stdlib/Base/SmartDateTime.php +++ b/Stdlib/Base/SmartDateTime.php @@ -151,8 +151,7 @@ class SmartDateTime extends \DateTime */ public function getDaysOfMonth() : int { - // todo: maybe ->format('t') is better - return cal_days_in_month(CAL_GREGORIAN, (int) $this->format('m'), (int) $this->format('Y')); + return (int) $this->format('t'); } /** diff --git a/System/File/ContainerInterface.php b/System/File/ContainerInterface.php index 5d0aba240..dac7b3e51 100644 --- a/System/File/ContainerInterface.php +++ b/System/File/ContainerInterface.php @@ -181,12 +181,13 @@ interface ContainerInterface * * @param string $path Path of the resource * @param string $replace Replace invalid chars with + * @param string $invalid Invalid chars to sanitize * * @return string * * @since 1.0.0 */ - public static function sanitize(string $path, string $replace = '') : string; + public static function sanitize(string $path, string $replace = '', string $invalid = '/[^\w\s\d\.\-_~,;\/\[\]\(\]]/') : string; /** * Get amount of sub-resources. diff --git a/System/File/Ftp/Directory.php b/System/File/Ftp/Directory.php index 3407f244c..5a31e69a6 100644 --- a/System/File/Ftp/Directory.php +++ b/System/File/Ftp/Directory.php @@ -165,9 +165,9 @@ class Directory extends FileAbstract implements DirectoryInterface /** * {@inheritdoc} */ - public static function sanitize(string $path, string $replace = '') : string + public static function sanitize(string $path, string $replace = '', string $invalid = '/[^\w\s\d\.\-_~,;\/\[\]\(\]]/') : string { - return DirectoryLocal::sanitize($path, $replace); + return DirectoryLocal::sanitize($path, $replace, $invalid); } /** diff --git a/System/File/Ftp/File.php b/System/File/Ftp/File.php index 3acc14a7b..6ff95bc18 100644 --- a/System/File/Ftp/File.php +++ b/System/File/Ftp/File.php @@ -187,9 +187,9 @@ class File extends FileAbstract implements FileInterface /** * {@inheritdoc} */ - public static function sanitize(string $path, string $replace = '') : string + public static function sanitize(string $path, string $replace = '', string $invalid = '/[^\w\s\d\.\-_~,;\/\[\]\(\]]/') : string { - return LocalFile::sanitize($path, $replace); + return LocalFile::sanitize($path, $replace, $invalid); } /** diff --git a/System/File/Local/Directory.php b/System/File/Local/Directory.php index 86e01c01f..d5e51fe64 100644 --- a/System/File/Local/Directory.php +++ b/System/File/Local/Directory.php @@ -370,9 +370,9 @@ final class Directory extends FileAbstract implements DirectoryInterface /** * {@inheritdoc} */ - public static function sanitize(string $path, string $replace = '') : string + public static function sanitize(string $path, string $replace = '', string $invalid = '/[^\w\s\d\.\-_~,;:\[\]\(\]\/]/') : string { - return \preg_replace('[^\w\s\d\.\-_~,;:\[\]\(\]\/]', $replace, $path); + return \preg_replace($invalid, $replace, $path); } /** diff --git a/System/File/Local/File.php b/System/File/Local/File.php index d1965feea..2e0c84033 100644 --- a/System/File/Local/File.php +++ b/System/File/Local/File.php @@ -152,9 +152,9 @@ final class File extends FileAbstract implements FileInterface /** * {@inheritdoc} */ - public static function sanitize(string $path, string $replace = '') : string + public static function sanitize(string $path, string $replace = '', string $invalid = '/[^\w\s\d\.\-_~,;\/\[\]\(\]]/') : string { - return \preg_replace('/[^\w\s\d\.\-_~,;\/\[\]\(\]]/', $replace, $path); + return \preg_replace($invalid, $replace, $path); } /** diff --git a/Uri/UriFactory.php b/Uri/UriFactory.php index b2a600431..6ce3a6b12 100644 --- a/Uri/UriFactory.php +++ b/Uri/UriFactory.php @@ -59,6 +59,28 @@ final class UriFactory return self::$uri[$key] ?? null; } + /** + * Cleanup + * + * @param string $identifier Identifier for cleaning up (e.g. * = everything, / = only path, ? = only query parameters, # only fragment etc.) + * + * @return void + * + * @since 1.0.0 + */ + public static function clean(string $identifier = '?') : void + { + if ($identifier === '*') { + self::$uri = []; + } else { + foreach (self::$uri as $key => $value) { + if (\stripos($key, $identifier) === 0) { + unset(self::$uri[$key]); + } + } + } + } + /** * Set global query replacements. * @@ -81,20 +103,6 @@ final class UriFactory return false; } - /** - * Clear all uri components - * - * @return bool - * - * @since 1.0.0 - */ - public static function clearAll() : bool - { - self::$uri = []; - - return true; - } - /** * Setup uri builder based on current request * diff --git a/Utils/Git/Repository.php b/Utils/Git/Repository.php index d8e34f367..3e9c69d11 100644 --- a/Utils/Git/Repository.php +++ b/Utils/Git/Repository.php @@ -376,8 +376,6 @@ class Repository throw new PathException($source); } - // todo: is valid git repository? - return implode("\n", $this->run('clone --local ' . $source . ' ' . $this->path)); } @@ -392,8 +390,6 @@ class Repository */ public function cloneRemote(string $source) : string { - // todo: is valid remote git repository? - return implode("\n", $this->run('clone ' . $source . ' ' . $this->path)); } diff --git a/tests/Uri/UriFactoryTest.php b/tests/Uri/UriFactoryTest.php index 6c4de2b89..583629b54 100644 --- a/tests/Uri/UriFactoryTest.php +++ b/tests/Uri/UriFactoryTest.php @@ -48,7 +48,7 @@ class UriFactoryTest extends \PHPUnit\Framework\TestCase self::assertNull(UriFactory::getQuery('Valid')); self::assertEquals('query4', UriFactory::getQuery('/valid2')); - self::assertTrue(UriFactory::clearAll()); + self::assertTrue(UriFactory::clean('*')); self::assertNull(UriFactory::getQuery('/valid2')); self::assertTrue(UriFactory::setQuery('/abc', 'query1')); @@ -59,6 +59,9 @@ class UriFactoryTest extends \PHPUnit\Framework\TestCase self::assertNull(UriFactory::getQuery('/valid2')); self::assertNull(UriFactory::getQuery('/valid3')); self::assertEquals('query1', UriFactory::getQuery('/abc')); + + self::assertTrue(UriFactory::clean('/')); + self::assertNull(UriFactory::getQuery('/abc')); } public function testBuilder() diff --git a/tests/Views/ViewTest.php b/tests/Views/ViewTest.php index 744149409..d0a5319c1 100644 --- a/tests/Views/ViewTest.php +++ b/tests/Views/ViewTest.php @@ -114,10 +114,6 @@ class ViewTest extends \PHPUnit\Framework\TestCase $view->setTemplate('/phpOMS/tests/Views/testTemplate'); self::assertEquals('Test', $view->render()); - - // todo: why is this failing? - //$view->setTemplate('phpOMS/tests/Views/testArray'); - //self::assertEquals([1, 2, 3], $view->render()); } /**