diff --git a/DataStorage/Cache/MemCache.php b/DataStorage/Cache/MemCache.php index bef505724..cc1bc5f48 100644 --- a/DataStorage/Cache/MemCache.php +++ b/DataStorage/Cache/MemCache.php @@ -42,6 +42,8 @@ class MemCache implements CacheInterface * @since 1.0.0 */ private $threshold = 10; + + private $status; /** * Constructor. diff --git a/DataStorage/Cache/MemCached.php b/DataStorage/Cache/MemCached.php index 19a85fb6e..e769ee19e 100644 --- a/DataStorage/Cache/MemCached.php +++ b/DataStorage/Cache/MemCached.php @@ -42,6 +42,7 @@ class MemCached implements CacheInterface * @since 1.0.0 */ private $threshold = 10; + private $status; /** * Constructor. diff --git a/DataStorage/Database/BuilderAbstract.php b/DataStorage/Database/BuilderAbstract.php index 5048fe8d7..2dca73296 100644 --- a/DataStorage/Database/BuilderAbstract.php +++ b/DataStorage/Database/BuilderAbstract.php @@ -60,6 +60,14 @@ abstract class BuilderAbstract */ protected $prefix = ''; + /** + * Raw. + * + * @var string + * @since 1.0.0 + */ + public $raw = ''; + /** * Set prefix. * diff --git a/DataStorage/Database/DataMapperAbstract.php b/DataStorage/Database/DataMapperAbstract.php index c03b23907..7a8e4daee 100644 --- a/DataStorage/Database/DataMapperAbstract.php +++ b/DataStorage/Database/DataMapperAbstract.php @@ -347,7 +347,7 @@ class DataMapperAbstract implements DataMapperInterface self::extend(__CLASS__); if ($obj === null || - (is_object($obj) && strpos($className = get_class($obj), '\Null') !== false) + (strpos($className = get_class($obj), '\Null') !== false && is_object($obj)) ) { return null; } diff --git a/DataStorage/Database/Query/Builder.php b/DataStorage/Database/Query/Builder.php index 8e18ae680..aa521c90a 100644 --- a/DataStorage/Database/Query/Builder.php +++ b/DataStorage/Database/Query/Builder.php @@ -181,14 +181,6 @@ class Builder extends BuilderAbstract */ public $lock = false; - /** - * Raw query. - * - * @var string - * @since 1.0.0 - */ - public $raw = ''; - /** * Comparison OPERATORS. * diff --git a/DataStorage/Web/Builder.php b/DataStorage/Web/Builder.php index 2d3c096db..37606b9b1 100644 --- a/DataStorage/Web/Builder.php +++ b/DataStorage/Web/Builder.php @@ -15,6 +15,9 @@ declare(strict_types = 1); namespace phpOMS\Utils\Crawler; use phpOMs\DataStorage\Database\Query\Builder as DatabaseQueryBuilder; +use phpOMS\Localization\Localization; +use phpOMS\Message\Http\Rest; +use phpOMS\Uri\Http; /** * Array utils. diff --git a/Math/Matrix/IdentityMatrix.php b/Math/Matrix/IdentityMatrix.php index 14b95acc2..1991f5565 100644 --- a/Math/Matrix/IdentityMatrix.php +++ b/Math/Matrix/IdentityMatrix.php @@ -35,11 +35,9 @@ class IdentityMatrix extends Matrix */ public function __construct(int $n) { - $this->n = $n; - $this->m = $n; + parent::__construct($n, $n); for ($i = 0; $i < $n; $i++) { - $this->matrix[$i] = array_fill(0, $n, 0); $this->matrix[$i][$i] = 1; } } diff --git a/Math/Optimization/Graph/Dijkstra.php b/Math/Optimization/Graph/Dijkstra.php index 04fef7e61..fcae57154 100644 --- a/Math/Optimization/Graph/Dijkstra.php +++ b/Math/Optimization/Graph/Dijkstra.php @@ -14,6 +14,8 @@ declare(strict_types = 1); namespace phpOMS\Math\Optimization\Graph; +use phpOMS\Stdlib\Graph\Graph; + class Dijkstra { public static function dijkstra(Graph $graph, $source, $target) diff --git a/Module/ModuleManager.php b/Module/ModuleManager.php index cc5793f16..916e17498 100644 --- a/Module/ModuleManager.php +++ b/Module/ModuleManager.php @@ -19,6 +19,7 @@ use phpOMS\ApplicationAbstract; use phpOMS\Autoloader; use phpOMS\DataStorage\Database\DatabaseType; use phpOMS\Message\Http\Request; +use phpOMS\Message\RequestAbstract; use phpOMS\System\File\PathException; use phpOMS\Module\Exception\InvalidModuleException; @@ -109,13 +110,13 @@ class ModuleManager /** * Get language files. * - * @param Request $request Request + * @param RequestAbstract $request Request * * @return array * * @since 1.0.0 */ - public function getLanguageFiles(Request $request) : array + public function getLanguageFiles(RequestAbstract $request) : array { $files = $this->getUriLoad($request); @@ -132,13 +133,13 @@ class ModuleManager /** * Get modules that run on this page. * - * @param Request $request Request + * @param RequestAbstract $request Request * * @return array * * @since 1.0.0 */ - public function getUriLoad(Request $request) : array + public function getUriLoad(RequestAbstract $request) : array { if (!isset($this->uriLoad)) { switch ($this->app->dbPool->get('select')->getType()) { diff --git a/Stdlib/Map/MultiMap.php b/Stdlib/Map/MultiMap.php index f1a0104e1..0e7f22692 100644 --- a/Stdlib/Map/MultiMap.php +++ b/Stdlib/Map/MultiMap.php @@ -280,9 +280,9 @@ class MultiMap implements \Countable { if ($this->keyType === KeyType::MULTIPLE && is_array($key)) { return $this->removeMultiple($key); - } else { - return $this->removeSingle($key); } + + return $this->removeSingle($key); } /** @@ -290,11 +290,11 @@ class MultiMap implements \Countable * * @param mixed $key Key used to identify value * - * @return void + * @return bool * * @since 1.0.0 */ - private function removeMultiple($key) /* : void */ + private function removeMultiple($key) : bool { if ($this->orderType !== OrderType::LOOSE) { return $this->remove(implode(':', $key)); diff --git a/System/File/Ftp/Directory.php b/System/File/Ftp/Directory.php index df331c93f..877d2f51a 100644 --- a/System/File/Ftp/Directory.php +++ b/System/File/Ftp/Directory.php @@ -33,6 +33,14 @@ use phpOMS\System\File\Local\Directory as DirectoryLocal; */ class Directory extends FileAbstract implements DirectoryInterface { + /** + * Directory nodes (files and directories). + * + * @var FileAbstract[] + * @since 1.0.0 + */ + private $nodes = []; + /** * {@inheritdoc} */ diff --git a/Utils/Compression/LZW.php b/Utils/Compression/LZW.php index 906afa373..ccc9c74ea 100644 --- a/Utils/Compression/LZW.php +++ b/Utils/Compression/LZW.php @@ -32,7 +32,6 @@ class LZW implements CompressionInterface */ public function compress(string $source) : string { - $wc = ''; $w = ''; $dictionary = []; $result = [];