Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion library/Zend/Amf/Parse/Amf0/Deserializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function readTypeMarker($typeMarker = null)

// boolean
case Zend_Amf_Constants::AMF0_BOOLEAN:
return (boolean) $this->_stream->readByte();
return (bool) $this->_stream->readByte();

// string
case Zend_Amf_Constants::AMF0_STRING:
Expand Down
4 changes: 2 additions & 2 deletions library/Zend/Cloud/Infrastructure/Adapter/Rackspace.php
Original file line number Diff line number Diff line change
Expand Up @@ -421,10 +421,10 @@ public function monitorInstance($id, $metric, $options = null)
break;
case Zend_Cloud_Infrastructure_Instance::MONITOR_RAM:
if (preg_match('/(\d+)k total/', $output,$match)) {
$total = (integer) $match[1];
$total = (int) $match[1];
}
if (preg_match('/(\d+)k used/', $output,$match)) {
$used = (integer) $match[1];
$used = (int) $match[1];
}
if ($total>0) {
$usage= (float) $used/$total;
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class Zend_Config implements Countable, Iterator
*/
public function __construct(array $array, $allowModifications = false)
{
$this->_allowModifications = (boolean) $allowModifications;
$this->_allowModifications = (bool) $allowModifications;
$this->_loadedSection = null;
$this->_index = 0;
$this->_data = [];
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Db/Adapter/Mysqli.php
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ protected function _connect()
}

if (isset($this->_config['port'])) {
$port = (integer) $this->_config['port'];
$port = (int) $this->_config['port'];
} else {
$port = null;
}
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Db/Adapter/Sqlsrv.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ protected function _connect()

$serverName = $this->_config['host'];
if (isset($this->_config['port'])) {
$port = (integer) $this->_config['port'];
$port = (int) $this->_config['port'];
$serverName .= ', ' . $port;
}

Expand Down
4 changes: 2 additions & 2 deletions library/Zend/Db/Profiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public function __construct($enabled = false)
*/
public function setEnabled($enable)
{
$this->_enabled = (boolean) $enable;
$this->_enabled = (bool) $enable;

return $this;
}
Expand Down Expand Up @@ -165,7 +165,7 @@ public function setFilterElapsedSecs($minimumSeconds = null)
if (null === $minimumSeconds) {
$this->_filterElapsedSecs = null;
} else {
$this->_filterElapsedSecs = (integer) $minimumSeconds;
$this->_filterElapsedSecs = (int) $minimumSeconds;
}

return $this;
Expand Down
6 changes: 3 additions & 3 deletions library/Zend/File/Transfer.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function setAdapter($adapter, $direction = false, $options = [])
Zend_Loader::loadClass($adapter);
}

$direction = (integer) $direction;
$direction = (int) $direction;
$this->_adapter[$direction] = new $adapter($options);
if (!$this->_adapter[$direction] instanceof Zend_File_Transfer_Adapter_Abstract) {
require_once 'Zend/File/Transfer/Exception.php';
Expand All @@ -96,7 +96,7 @@ public function getAdapter($direction = null)
return $this->_adapter;
}

$direction = (integer) $direction;
$direction = (int) $direction;
return $this->_adapter[$direction];
}

Expand All @@ -110,7 +110,7 @@ public function getAdapter($direction = null)
public function __call($method, array $options)
{
if (array_key_exists('direction', $options)) {
$direction = (integer) $options['direction'];
$direction = (int) $options['direction'];
} else {
$direction = 0;
}
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/File/Transfer/Adapter/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ public function setOptions($options = [], $files = null) {
case 'ignoreNoFile' :
case 'useByteString' :
case 'detectInfos' :
$this->_files[$key]['options'][$name] = (boolean) $value;
$this->_files[$key]['options'][$name] = (bool) $value;
break;

default:
Expand Down
4 changes: 2 additions & 2 deletions library/Zend/Filter/Alnum.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function __construct($allowWhiteSpace = false)
}
}

$this->allowWhiteSpace = (boolean) $allowWhiteSpace;
$this->allowWhiteSpace = (bool) $allowWhiteSpace;
if (null === self::$_unicodeEnabled) {
self::$_unicodeEnabled = (@preg_match('/\pL/u', 'a')) ? true : false;
}
Expand Down Expand Up @@ -115,7 +115,7 @@ public function getAllowWhiteSpace()
*/
public function setAllowWhiteSpace($allowWhiteSpace)
{
$this->allowWhiteSpace = (boolean) $allowWhiteSpace;
$this->allowWhiteSpace = (bool) $allowWhiteSpace;
return $this;
}

Expand Down
4 changes: 2 additions & 2 deletions library/Zend/Filter/Alpha.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function __construct($allowWhiteSpace = false)
}
}

$this->allowWhiteSpace = (boolean) $allowWhiteSpace;
$this->allowWhiteSpace = (bool) $allowWhiteSpace;
if (null === self::$_unicodeEnabled) {
self::$_unicodeEnabled = (@preg_match('/\pL/u', 'a')) ? true : false;
}
Expand Down Expand Up @@ -115,7 +115,7 @@ public function getAllowWhiteSpace()
*/
public function setAllowWhiteSpace($allowWhiteSpace)
{
$this->allowWhiteSpace = (boolean) $allowWhiteSpace;
$this->allowWhiteSpace = (bool) $allowWhiteSpace;
return $this;
}

Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Filter/Boolean.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ public function getCasting()
*/
public function setCasting($casting = true)
{
$this->_casting = (boolean) $casting;
$this->_casting = (bool) $casting;
return $this;
}

Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Filter/Encrypt/Openssl.php
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ public function getPackage()
*/
public function setPackage($package)
{
$this->_package = (boolean) $package;
$this->_package = (bool) $package;
return $this;
}

Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Filter/File/Rename.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ protected function _convertOptions($options) {
break;

case 'overwrite' :
$files['overwrite'] = (boolean) $value;
$files['overwrite'] = (bool) $value;
break;

default:
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Filter/HtmlEntities.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public function getDoubleQuote()
*/
public function setDoubleQuote($doubleQuote)
{
$this->_doubleQuote = (boolean) $doubleQuote;
$this->_doubleQuote = (bool) $doubleQuote;
return $this;
}

Expand Down
4 changes: 2 additions & 2 deletions library/Zend/Filter/RealPath.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ public function setExists($exists)

if (is_array($exists)) {
if (isset($exists['exists'])) {
$exists = (boolean) $exists['exists'];
$exists = (bool) $exists['exists'];
}
}

$this->_exists = (boolean) $exists;
$this->_exists = (bool) $exists;
return $this;
}

Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Filter/StripTags.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public function getCommentsAllowed()
*/
public function setCommentsAllowed($commentsAllowed)
{
$this->commentsAllowed = (boolean) $commentsAllowed;
$this->commentsAllowed = (bool) $commentsAllowed;
return $this;
}

Expand Down
6 changes: 3 additions & 3 deletions library/Zend/Form/Element/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -562,12 +562,12 @@ public function getFileInfo($value = null)
*/
public function setMultiFile($count)
{
if ((integer) $count < 2) {
if ((int) $count < 2) {
$this->setIsArray(false);
$this->_counter = 1;
} else {
$this->setIsArray(true);
$this->_counter = (integer) $count;
$this->_counter = (int) $count;
}

return $this;
Expand Down Expand Up @@ -663,7 +663,7 @@ private function _convertIniToInteger($setting)
}
}

return (integer) $setting;
return (int) $setting;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Locale/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -1576,7 +1576,7 @@ public static function clearCache()
*/
public static function disableCache($flag)
{
self::$_cacheDisabled = (boolean) $flag;
self::$_cacheDisabled = (bool) $flag;
}

/**
Expand Down
10 changes: 5 additions & 5 deletions library/Zend/Paginator.php
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ public function getCurrentPageNumber()
*/
public function setCurrentPageNumber($pageNumber)
{
$this->_currentPageNumber = (integer) $pageNumber;
$this->_currentPageNumber = (int) $pageNumber;
$this->_currentItems = null;
$this->_currentItemCount = null;

Expand Down Expand Up @@ -744,7 +744,7 @@ public function getItemCountPerPage()
*/
public function setItemCountPerPage($itemCountPerPage = -1)
{
$this->_itemCountPerPage = (integer) $itemCountPerPage;
$this->_itemCountPerPage = (int) $itemCountPerPage;
if ($this->_itemCountPerPage < 1) {
$this->_itemCountPerPage = $this->getTotalItemCount();
}
Expand Down Expand Up @@ -844,7 +844,7 @@ public function getPageRange()
*/
public function setPageRange($pageRange)
{
$this->_pageRange = (integer) $pageRange;
$this->_pageRange = (int) $pageRange;

return $this;
}
Expand Down Expand Up @@ -948,7 +948,7 @@ public function setView(?Zend_View_Interface $view = null)
*/
public function normalizeItemNumber($itemNumber)
{
$itemNumber = (integer) $itemNumber;
$itemNumber = (int) $itemNumber;

if ($itemNumber < 1) {
$itemNumber = 1;
Expand All @@ -969,7 +969,7 @@ public function normalizeItemNumber($itemNumber)
*/
public function normalizePageNumber($pageNumber)
{
$pageNumber = (integer) $pageNumber;
$pageNumber = (int) $pageNumber;

if ($pageNumber < 1) {
$pageNumber = 1;
Expand Down
26 changes: 13 additions & 13 deletions library/Zend/Service/LiveDocx/MailMerge.php
Original file line number Diff line number Diff line change
Expand Up @@ -393,12 +393,12 @@ public function getMetafiles($fromPage, $toPage)

$ret = [];
$result = $this->getSoapClient()->GetMetafiles([
'fromPage' => (integer) $fromPage,
'toPage' => (integer) $toPage,
'fromPage' => (int) $fromPage,
'toPage' => (int) $toPage,
]);

if (isset($result->GetMetafilesResult->string)) {
$pageCounter = (integer) $fromPage;
$pageCounter = (int) $fromPage;
if (is_array($result->GetMetafilesResult->string)) {
foreach ($result->GetMetafilesResult->string as $string) {
$ret[$pageCounter] = base64_decode($string);
Expand Down Expand Up @@ -459,14 +459,14 @@ public function getBitmaps($fromPage, $toPage, $zoomFactor, $format)
$ret = [];

$result = $this->getSoapClient()->GetBitmaps([
'fromPage' => (integer) $fromPage,
'toPage' => (integer) $toPage,
'zoomFactor' => (integer) $zoomFactor,
'fromPage' => (int) $fromPage,
'toPage' => (int) $toPage,
'zoomFactor' => (int) $zoomFactor,
'format' => (string) $format,
]);

if (isset($result->GetBitmapsResult->string)) {
$pageCounter = (integer) $fromPage;
$pageCounter = (int) $fromPage;
if (is_array($result->GetBitmapsResult->string)) {
foreach ($result->GetBitmapsResult->string as $string) {
$ret[$pageCounter] = base64_decode($string);
Expand Down Expand Up @@ -495,7 +495,7 @@ public function getAllBitmaps($zoomFactor, $format)

$ret = [];
$result = $this->getSoapClient()->GetAllBitmaps([
'zoomFactor' => (integer) $zoomFactor,
'zoomFactor' => (int) $zoomFactor,
'format' => (string) $format,
]);

Expand Down Expand Up @@ -692,7 +692,7 @@ public function templateExists($filename)
'filename' => basename($filename),
]);

return (boolean) $result->TemplateExistsResult;
return (bool) $result->TemplateExistsResult;
}

/**
Expand Down Expand Up @@ -1054,7 +1054,7 @@ public function imageExists($filename)
'filename' => basename($filename),
]);

return (boolean) $result->ImageExistsResult;
return (bool) $result->ImageExistsResult;
}

/**
Expand Down Expand Up @@ -1085,9 +1085,9 @@ protected function _backendListArrayToMultiAssocArray($list)

$ret[] = [
'filename' => $o->string[0],
'fileSize' => (integer) $o->string[2],
'createTime' => (integer) $date1->get(Zend_Date::TIMESTAMP),
'modifyTime' => (integer) $date2->get(Zend_Date::TIMESTAMP),
'fileSize' => (int) $o->string[2],
'createTime' => (int) $date1->get(Zend_Date::TIMESTAMP),
'modifyTime' => (int) $date2->get(Zend_Date::TIMESTAMP),
];
}
}
Expand Down
Loading
Loading