diff --git a/src/Container/Movable.php b/src/Container/Movable.php index e242952..2456816 100644 --- a/src/Container/Movable.php +++ b/src/Container/Movable.php @@ -22,7 +22,7 @@ class Movable extends AbstractContainer /** * Internal object Id * - * @var integer + * @var int */ protected $id; @@ -48,7 +48,7 @@ class Movable extends AbstractContainer /** * Value state (LOADED/SWAPPED/LOCKED) * - * @var integer + * @var int */ private $state; @@ -56,7 +56,7 @@ class Movable extends AbstractContainer * Object constructor * * @param \Zend\Memory\MemoryManager $memoryManager - * @param integer $id + * @param int $id * @param string $value */ public function __construct(Memory\MemoryManager $memoryManager, $id, $value) @@ -255,7 +255,7 @@ public function isSwapped() * Get object id * * @internal - * @return integer + * @return int */ public function getId() { diff --git a/src/MemoryManager.php b/src/MemoryManager.php index a449569..8bea6cf 100644 --- a/src/MemoryManager.php +++ b/src/MemoryManager.php @@ -33,7 +33,7 @@ class MemoryManager * Default value is 2/3 of memory_limit php.ini variable * Negative value means no limit * - * @var integer + * @var int */ private $memoryLimit = -1; @@ -42,21 +42,21 @@ class MemoryManager * Default value is 16K * Negative value means that memory objects are never swapped * - * @var integer + * @var int */ private $minSize = 16384; /** * Overall size of memory, used by values * - * @var integer + * @var int */ private $memorySize = 0; /** * Id for next Zend_Memory object * - * @var integer + * @var int */ private $nextId = 0; @@ -100,7 +100,7 @@ class MemoryManager /** * Unique memory manager id * - * @var integer + * @var int */ private $managerId; @@ -135,9 +135,9 @@ public function __construct(CacheStorage $cache = null) $this->_generateMemManagerId(); $memoryLimitStr = trim(ini_get('memory_limit')); - if ($memoryLimitStr != '' && $memoryLimitStr != -1) { - $this->memoryLimit = (integer)$memoryLimitStr; - switch (strtolower($memoryLimitStr[strlen($memoryLimitStr)-1])) { + if ($memoryLimitStr != '' && $memoryLimitStr != -1) { + $this->memoryLimit = (int) $memoryLimitStr; + switch (strtolower($memoryLimitStr[strlen($memoryLimitStr) - 1])) { case 'g': $this->memoryLimit *= 1024; // no break @@ -174,7 +174,7 @@ public function __destruct() /** * Set memory grow limit * - * @param integer $newLimit + * @param int $newLimit */ public function setMemoryLimit($newLimit) { @@ -186,7 +186,7 @@ public function setMemoryLimit($newLimit) /** * Get memory grow limit * - * @return integer + * @return int */ public function getMemoryLimit() { @@ -196,7 +196,7 @@ public function getMemoryLimit() /** * Set minimum size of values, which may be swapped * - * @param integer $newSize + * @param int $newSize */ public function setMinSize($newSize) { @@ -206,7 +206,7 @@ public function setMinSize($newSize) /** * Get minimum size of values, which may be swapped * - * @return integer + * @return int */ public function getMinSize() { @@ -274,7 +274,7 @@ private function _create($value, $locked) * * @internal * @param Container\Movable $container - * @param integer $id + * @param int $id * @return null */ public function unlink(Container\Movable $container, $id) @@ -299,7 +299,7 @@ public function unlink(Container\Movable $container, $id) * * @internal * @param \Zend\Memory\Container\Movable $container - * @param integer $id + * @param int $id */ public function processUpdate(Container\Movable $container, $id) { @@ -314,7 +314,7 @@ public function processUpdate(Container\Movable $container, $id) } // Remove just updated object from list of candidates to unload - if ( isset($this->unloadCandidates[$id])) { + if (isset($this->unloadCandidates[$id])) { unset($this->unloadCandidates[$id]); } @@ -386,7 +386,7 @@ private function _swapCheck() * if object is not changed since last swap * * @param \Zend\Memory\Container\Movable $container - * @param integer $id + * @param int $id */ private function _swap(Container\Movable $container, $id) { @@ -409,7 +409,7 @@ private function _swap(Container\Movable $container, $id) * * @internal * @param \Zend\Memory\Container\Movable $container - * @param integer $id + * @param int $id */ public function load(Container\Movable $container, $id) { diff --git a/src/Value.php b/src/Value.php index 67dcb80..0c8de61 100644 --- a/src/Value.php +++ b/src/Value.php @@ -79,19 +79,19 @@ public function count() * ArrayAccess interface method * returns true if string offset exists * - * @param integer $offset + * @param int $offset * @return bool */ public function offsetExists($offset) { - return $offset >= 0 && $offset < strlen($this->value); + return $offset >= 0 && $offset < strlen($this->value); } /** * ArrayAccess interface method * Get character at $offset position * - * @param integer $offset + * @param int $offset * @return string */ public function offsetGet($offset) @@ -103,7 +103,7 @@ public function offsetGet($offset) * ArrayAccess interface method * Set character at $offset position * - * @param integer $offset + * @param int $offset * @param string $char */ public function offsetSet($offset, $char) @@ -120,7 +120,7 @@ public function offsetSet($offset, $char) * ArrayAccess interface method * Unset character at $offset position * - * @param integer $offset + * @param int $offset */ public function offsetUnset($offset) {