diff --git a/app/code/core/Mage/Core/Model/Layout.php b/app/code/core/Mage/Core/Model/Layout.php index a2a4a902672..66d150f4d12 100644 --- a/app/code/core/Mage/Core/Model/Layout.php +++ b/app/code/core/Mage/Core/Model/Layout.php @@ -190,7 +190,7 @@ public function generateXml() /** * Create layout blocks hierarchy from layout xml configuration * - * @param Mage_Core_Model_Layout_Element|null $parent + * @param Mage_Core_Model_Layout_Element|Varien_Simplexml_Element|null $parent */ public function generateBlocks($parent = null) { @@ -223,7 +223,7 @@ public function generateBlocks($parent = null) * Add block object to layout based on xml node data * * @param Varien_Simplexml_Element $node - * @param Mage_Core_Model_Layout_Element $parent + * @param Mage_Core_Model_Layout_Element|Varien_Simplexml_Element $parent * @return $this */ protected function _generateBlock($node, $parent) @@ -284,7 +284,7 @@ protected function _generateBlock($node, $parent) /** * @param Varien_Simplexml_Element $node - * @param Mage_Core_Model_Layout_Element $parent + * @param Mage_Core_Model_Layout_Element|Varien_Simplexml_Element $parent * @return $this */ protected function _generateAction($node, $parent) diff --git a/lib/Varien/Cache/Backend/Memcached.php b/lib/Varien/Cache/Backend/Memcached.php index 2e4be8f3ece..d743a64949f 100644 --- a/lib/Varien/Cache/Backend/Memcached.php +++ b/lib/Varien/Cache/Backend/Memcached.php @@ -73,7 +73,6 @@ protected function _getChunkId($id, $index) * * @param string $id ID of data's info cell * @param int $chunks Number of chunks to remove (basically, the number after '{splitted}|') - * @return null */ protected function _cleanTheMess($id, $chunks) { diff --git a/lib/Varien/Cache/Core.php b/lib/Varien/Cache/Core.php index c75775c2e68..25eb52d0464 100644 --- a/lib/Varien/Cache/Core.php +++ b/lib/Varien/Cache/Core.php @@ -63,7 +63,6 @@ protected function _getChunkId($id, $index) * * @param string $id ID of data's info cell * @param int $chunks Number of chunks to remove (basically, the number after '{splitted}|') - * @return null */ protected function _cleanTheMess($id, $chunks) { @@ -166,7 +165,7 @@ public function load($id, $doNotTestCacheValidity = false, $doNotUnserialize = f // Some chunk in chain was not found, we can not glue-up the data: // clean the mess and return nothing - $this->_cleanTheMess($id, $chunks); + $this->_cleanTheMess($id, (int)$chunks); return false; } diff --git a/lib/Varien/Data/Collection/Db.php b/lib/Varien/Data/Collection/Db.php index 6eae37ba8db..35445d26280 100644 --- a/lib/Varien/Data/Collection/Db.php +++ b/lib/Varien/Data/Collection/Db.php @@ -69,14 +69,14 @@ class Varien_Data_Collection_Db extends Varien_Data_Collection * All collection data array * Used for getData method * - * @var array + * @var array|null */ protected $_data = null; /** * Fields map for corellation names & real selected fields * - * @var array + * @var array|null */ protected $_map = null; diff --git a/lib/Varien/Data/Collection/Filesystem.php b/lib/Varien/Data/Collection/Filesystem.php index b188180bdac..811e7390308 100644 --- a/lib/Varien/Data/Collection/Filesystem.php +++ b/lib/Varien/Data/Collection/Filesystem.php @@ -39,7 +39,7 @@ class Varien_Data_Collection_Filesystem extends Varien_Data_Collection /** * Target directory * - * @var string + * @var array */ protected $_targetDirs = []; diff --git a/lib/Varien/Data/Form/Element/Abstract.php b/lib/Varien/Data/Form/Element/Abstract.php index f79a380bbc2..f4a3ff3a122 100644 --- a/lib/Varien/Data/Form/Element/Abstract.php +++ b/lib/Varien/Data/Form/Element/Abstract.php @@ -150,7 +150,7 @@ public function setType($type) } /** - * @param Varien_Data_Form $form + * @param Varien_Data_Form_Abstract $form * @return $this */ public function setForm($form) diff --git a/lib/Varien/Data/Form/Element/Date.php b/lib/Varien/Data/Form/Element/Date.php index 8ad11e59d9f..e51877eb96c 100644 --- a/lib/Varien/Data/Form/Element/Date.php +++ b/lib/Varien/Data/Form/Element/Date.php @@ -36,7 +36,7 @@ class Varien_Data_Form_Element_Date extends Varien_Data_Form_Element_Abstract { /** - * @var Zend_Date + * @var Zend_Date|string */ protected $_value; @@ -79,7 +79,7 @@ protected function _toTimestamp($value) * @param mixed $value * @param string $format * @param string $locale - * @return Varien_Data_Form_Element_Date + * @return $this */ public function setValue($value, $format = null, $locale = null) { @@ -138,7 +138,7 @@ public function getValue($format = null) /** * Get value instance, if any * - * @return Zend_Date + * @return Zend_Date|string|null */ public function getValueInstance() { diff --git a/lib/Varien/Data/Form/Element/Multiselect.php b/lib/Varien/Data/Form/Element/Multiselect.php index dec5bef73f5..a65cec45adf 100644 --- a/lib/Varien/Data/Form/Element/Multiselect.php +++ b/lib/Varien/Data/Form/Element/Multiselect.php @@ -153,7 +153,7 @@ public function getJsObjectName() /** * @param array $option - * @param string $selected + * @param array $selected * @return string */ protected function _optionToHtml($option, $selected) diff --git a/lib/Varien/Data/Form/Element/Select.php b/lib/Varien/Data/Form/Element/Select.php index 606749367e0..3857e468726 100644 --- a/lib/Varien/Data/Form/Element/Select.php +++ b/lib/Varien/Data/Form/Element/Select.php @@ -60,8 +60,9 @@ public function getElementHtml() if (!is_array($option)) { $html .= $this->_optionToHtml( [ - 'value' => $key, - 'label' => $option], + 'value' => $key, + 'label' => $option + ], $value ); } elseif (is_array($option['value'])) { @@ -83,7 +84,7 @@ public function getElementHtml() /** * @param array $option - * @param string $selected + * @param string|array $selected * @return string */ protected function _optionToHtml($option, $selected) diff --git a/lib/Varien/Db/Adapter/Pdo/Mysql.php b/lib/Varien/Db/Adapter/Pdo/Mysql.php index 1e4d218c8d3..81646100a73 100644 --- a/lib/Varien/Db/Adapter/Pdo/Mysql.php +++ b/lib/Varien/Db/Adapter/Pdo/Mysql.php @@ -923,7 +923,7 @@ public function tableColumnExists($tableName, $columnName, $schemaName = null) * @param string $columnName * @param array|string $definition string specific or universal array DB Server definition * @param string $schemaName - * @return int|boolean + * @return int|boolean|Zend_Db_Statement_Interface * @throws Zend_Db_Exception */ public function addColumn($tableName, $columnName, $definition, $schemaName = null) @@ -965,7 +965,7 @@ public function addColumn($tableName, $columnName, $definition, $schemaName = nu * @param string $tableName * @param string $columnName * @param string $schemaName - * @return bool + * @return true|Zend_Db_Statement_Interface */ public function dropColumn($tableName, $columnName, $schemaName = null) { @@ -1088,7 +1088,7 @@ public function modifyColumn($tableName, $columnName, $definition, $flushData = * * @param string $tableName * @param string $schemaName - * @return array|false + * @return bool */ public function showTableStatus($tableName, $schemaName = null) { @@ -2250,7 +2250,7 @@ public function newTable($tableName = null, $schemaName = null) * * @param Varien_Db_Ddl_Table $table * @throws Zend_Db_Exception - * @return Zend_Db_Pdo_Statement + * @return Zend_Db_Statement_Pdo */ public function createTable(Varien_Db_Ddl_Table $table) { @@ -2282,7 +2282,7 @@ public function createTable(Varien_Db_Ddl_Table $table) * * @param Varien_Db_Ddl_Table $table * @throws Zend_Db_Exception - * @return Zend_Db_Pdo_Statement + * @return Zend_Db_Statement_Pdo */ public function createTemporaryTable(Varien_Db_Ddl_Table $table) { @@ -2632,7 +2632,7 @@ public function dropTable($tableName, $schemaName = null) * * @param string $tableName * @param string $schemaName - * @return boolean + * @return $this */ public function dropTemporaryTable($tableName, $schemaName = null) { diff --git a/lib/Varien/Db/Ddl/Table.php b/lib/Varien/Db/Ddl/Table.php index fd995a7cb46..4a14a9065fe 100644 --- a/lib/Varien/Db/Ddl/Table.php +++ b/lib/Varien/Db/Ddl/Table.php @@ -83,7 +83,7 @@ class Varien_Db_Ddl_Table /** * Name of table * - * @var string + * @var string|null */ protected $_tableName; @@ -597,7 +597,7 @@ public function getForeignKeys() * * @param string $key * @param string $value - * @return string + * @return $this */ public function setOption($key, $value) { diff --git a/lib/Varien/Db/Select.php b/lib/Varien/Db/Select.php index 20e7b28e73f..dba3121a3d9 100644 --- a/lib/Varien/Db/Select.php +++ b/lib/Varien/Db/Select.php @@ -397,13 +397,7 @@ protected function _renderStraightjoin($sql) } /** - * Adds to the internal table-to-column mapping array. - * - * @param string $correlationName The table/join the columns come from. - * @param array|string $cols The list of columns; preferably as - * an array, but possibly as a string containing one column. - * @param bool|string $afterCorrelationName True if it should be prepended, a correlation name if it should be inserted - * @return void + * @inheritDoc */ protected function _tableCols($correlationName, $cols, $afterCorrelationName = null) { @@ -417,7 +411,7 @@ protected function _tableCols($correlationName, $cols, $afterCorrelationName = n } } - return parent::_tableCols($correlationName, $cols, $afterCorrelationName); + parent::_tableCols($correlationName, $cols, $afterCorrelationName); } /** diff --git a/lib/Varien/Db/Statement/Parameter.php b/lib/Varien/Db/Statement/Parameter.php index a891370ed03..87e483cb6ac 100644 --- a/lib/Varien/Db/Statement/Parameter.php +++ b/lib/Varien/Db/Statement/Parameter.php @@ -47,22 +47,22 @@ class Varien_Db_Statement_Parameter */ protected $_isBlob = false; - /* + /** * Data type to set to DB driver during parameter bind */ protected $_dataType = null; - /* + /** * Length to set to DB driver during parameter bind */ protected $_length = null; - /* + /** * Specific driver options to set to DB driver during parameter bind */ protected $_driverOptions = null; - /* + /** * Additional information to be used by DB adapter internally */ protected $_additional = null; @@ -71,13 +71,11 @@ class Varien_Db_Statement_Parameter * Inits instance * * @param mixed $value - * @return Varien_Db_Statement_Parameter */ public function __construct($value) { $this->_value = $value; $this->_additional = new Varien_Object(); - return $this; } /** diff --git a/lib/Varien/Db/Tree/Node.php b/lib/Varien/Db/Tree/Node.php index 994acd419a3..8eb147d8f5d 100644 --- a/lib/Varien/Db/Tree/Node.php +++ b/lib/Varien/Db/Tree/Node.php @@ -28,7 +28,6 @@ class Varien_Db_Tree_Node private $id; private $pid; private $level; - private $title; private $data; public $hasChild = false; @@ -61,7 +60,6 @@ public function __construct($nodeData, $keys) $this->hasChild = true; $this->numChild = ($a - 1) / 2; } - return $this; } public function getData($name) diff --git a/lib/Varien/Debug.php b/lib/Varien/Debug.php index 263c02e6685..93242d16d25 100644 --- a/lib/Varien/Debug.php +++ b/lib/Varien/Debug.php @@ -32,7 +32,7 @@ class Varien_Debug /** * Magento Root path * - * @var string + * @var string|null */ protected static $_filePath; diff --git a/lib/Varien/Event/Observer.php b/lib/Varien/Event/Observer.php index 56e1c904c3b..6d6d96c5c5d 100644 --- a/lib/Varien/Event/Observer.php +++ b/lib/Varien/Event/Observer.php @@ -97,7 +97,7 @@ public function setEventName($data) } /** - * @return string + * @return array */ public function getCallback() { diff --git a/lib/Varien/File/Transfer/Adapter/Http.php b/lib/Varien/File/Transfer/Adapter/Http.php index bfa6d20b5b2..d29699658e8 100644 --- a/lib/Varien/File/Transfer/Adapter/Http.php +++ b/lib/Varien/File/Transfer/Adapter/Http.php @@ -95,7 +95,7 @@ public function send($options = null) $response = new Zend_Controller_Response_Http(); - $response->setHeader('Content-length', filesize($filepath)); + $response->setHeader('Content-length', (string)filesize($filepath)); $response->setHeader('Content-Type', $mimeType); $response->sendHeaders(); @@ -107,7 +107,7 @@ public function send($options = null) * Internal method to detect the mime type of a file * * @param array $value File infos - * @return string Mime type of given file + * @return string|null Mime type of given file */ protected function _detectMimeType($value) { diff --git a/lib/Varien/File/Uploader.php b/lib/Varien/File/Uploader.php index b8d68f33bec..28bb2431629 100644 --- a/lib/Varien/File/Uploader.php +++ b/lib/Varien/File/Uploader.php @@ -51,7 +51,7 @@ class Varien_File_Uploader /** * Upload type. Used to right handle $_FILES array. * - * @var string Varien_File_Uploader::SINGLE_STYLE|Varien_File_Uploader::MULTIPLE_STYLE + * @var int Varien_File_Uploader::SINGLE_STYLE|Varien_File_Uploader::MULTIPLE_STYLE * @access protected */ protected $_uploadType; @@ -141,7 +141,7 @@ class Varien_File_Uploader /** * Resulting of uploaded file * - * @var array|false Array with file info keys: path, file. Result is + * @var array|bool Array with file info keys: path, file. Result is * FALSE when file not uploaded */ protected $_result; @@ -504,7 +504,10 @@ private function _setUploadFileId($fileId) } else { preg_match("/^(.*?)\[(.*?)\]$/", $fileId, $file); - if (count($file) > 0 && (count($file[0]) > 0) && (count($file[1]) > 0)) { + if (count($file) > 0 + && (count($file[0]) > 0) + && (count($file[1]) > 0) + ) { array_shift($file); $this->_uploadType = self::MULTIPLE_STYLE; diff --git a/lib/Varien/Filter/Template.php b/lib/Varien/Filter/Template.php index f16ae33fee3..ad828e10f32 100644 --- a/lib/Varien/Filter/Template.php +++ b/lib/Varien/Filter/Template.php @@ -273,7 +273,7 @@ protected function _getIncludeParameters($value) * Return variable value for var construction * * @param string $value raw parameters - * @param string $default default value + * @param string|null $default default value * @return string */ protected function _getVariable($value, $default = '{no_value_defined}') @@ -327,7 +327,7 @@ protected function _getVariable($value, $default = '{no_value_defined}') /** * Retrieve model object * - * @return Mage_Core_Model_Abstract + * @return Mage_Adminhtml_Model_Email_PathValidator */ protected function getEmailPathValidator() { diff --git a/lib/Varien/Http/Adapter/Curl.php b/lib/Varien/Http/Adapter/Curl.php index c1495437ccf..b121218dc8f 100644 --- a/lib/Varien/Http/Adapter/Curl.php +++ b/lib/Varien/Http/Adapter/Curl.php @@ -38,7 +38,7 @@ class Varien_Http_Adapter_Curl implements Zend_Http_Client_Adapter_Interface /** * Curl handle * - * @var resource + * @var resource|CurlHandle|null */ protected $_resource; @@ -230,7 +230,7 @@ public function close() /** * Returns a cURL handle on success * - * @return resource + * @return resource|CurlHandle */ protected function _getResource() { diff --git a/lib/Varien/Image.php b/lib/Varien/Image.php index b18816b8512..f0629ba07c2 100644 --- a/lib/Varien/Image.php +++ b/lib/Varien/Image.php @@ -29,7 +29,7 @@ class Varien_Image { /** - * @var Varien_Image_Adapter_Abstract|Varien_Image_Adapter_Gd2 + * @var Varien_Image_Adapter_Abstract|Varien_Image_Adapter_Gd2|null */ protected $_adapter; @@ -43,7 +43,7 @@ class Varien_Image /** * Constructor * - * @param Varien_Image_Adapter $adapter. Default value is GD2 + * @param string $adapter Default value is GD2 * @param string $fileName * @return void */ diff --git a/lib/Varien/Image/Adapter/Abstract.php b/lib/Varien/Image/Adapter/Abstract.php index 5c0fab2507f..2be36b71d6a 100644 --- a/lib/Varien/Image/Adapter/Abstract.php +++ b/lib/Varien/Image/Adapter/Abstract.php @@ -83,7 +83,7 @@ abstract class Varien_Image_Adapter_Abstract * original image, but after resize() it's already a scaled version. * * @see Varien_Image_Adapter_Gd2::open() - * @var resource + * @var resource|GdImage */ protected $_imageHandler = null; @@ -289,7 +289,7 @@ public function constrainOnly($value = null) * Get/set quality, values in percentage from 0 to 100 * * @param int $value - * @return int + * @return int|null */ public function quality($value = null) { diff --git a/lib/Varien/Io/File.php b/lib/Varien/Io/File.php index 6a56cd30cbb..088e8f13303 100644 --- a/lib/Varien/Io/File.php +++ b/lib/Varien/Io/File.php @@ -179,7 +179,7 @@ public function streamUnlock() * Binary-safe file read * * @param int $length - * @return string + * @return bool|string */ public function streamRead($length = 1024) { @@ -195,7 +195,7 @@ public function streamRead($length = 1024) /** * Gets line from file pointer and parse for CSV fields * - * @return string + * @return bool|string */ public function streamReadCsv($delimiter = ',', $enclosure = '"') { @@ -209,7 +209,7 @@ public function streamReadCsv($delimiter = ',', $enclosure = '"') * Binary-safe file write * * @param string $str - * @return bool + * @return bool|int */ public function streamWrite($str) { @@ -309,9 +309,9 @@ public function open(array $args = []) /** * Used to set {@link _allowCreateFolders} value * - * @param mixed $flag + * @param bool $flag * @access public - * @return void + * @return $this */ public function setAllowCreateFolders($flag) { @@ -555,7 +555,7 @@ protected function _checkSrcIsFile($src) * File put content wrapper * * @param string $filename - * @param srting|resource $src + * @param string|resource $src * * @return int */ @@ -612,7 +612,7 @@ public function getDestinationFolder($filepath) * Create destination folder * * @param string $path - * @return Varien_Io_File + * @return bool */ public function createDestinationDir($path) { diff --git a/lib/Varien/Io/Ftp.php b/lib/Varien/Io/Ftp.php index dc75a5d2f7a..38ff287185f 100644 --- a/lib/Varien/Io/Ftp.php +++ b/lib/Varien/Io/Ftp.php @@ -202,7 +202,7 @@ public function cd($dir) * * @param string $filename * @param string|resource|null $dest destination file name, stream, or if null will return file contents - * @return string + * @return bool|string */ public function read($filename, $dest = null) { diff --git a/lib/Varien/Object/Cache.php b/lib/Varien/Object/Cache.php index 068ae2e89c1..df6dc86ac43 100644 --- a/lib/Varien/Object/Cache.php +++ b/lib/Varien/Object/Cache.php @@ -135,7 +135,7 @@ public function load($idx, $default = null) * @param object $object * @param string $idx * @param array|string $tags - * @return string + * @return string|false */ public function save($object, $idx = null, $tags = null) { diff --git a/lib/Varien/Simplexml/Config.php b/lib/Varien/Simplexml/Config.php index bec5d8e6158..b8ffdc61ca0 100644 --- a/lib/Varien/Simplexml/Config.php +++ b/lib/Varien/Simplexml/Config.php @@ -31,7 +31,7 @@ class Varien_Simplexml_Config /** * Configuration xml * - * @var Varien_Simplexml_Element + * @var Varien_Simplexml_Element|SimpleXMLElement */ protected $_xml = null; @@ -51,7 +51,7 @@ class Varien_Simplexml_Config protected $_cacheLifetime = null; /** - * @var unknown_type + * @var string|false|null */ protected $_cacheChecksum = false; @@ -109,7 +109,7 @@ public function __construct($sourceData = null) * Sets xml for this configuration * * @param Varien_Simplexml_Element $node - * @return Varien_Simplexml_Config + * @return $this */ public function setXml(Varien_Simplexml_Element $node) { @@ -122,7 +122,7 @@ public function setXml(Varien_Simplexml_Element $node) * * @see Varien_Simplexml_Element::descend * @param string $path - * @return Varien_Simplexml_Element + * @return Varien_Simplexml_Element|false */ public function getNode($path = null) { @@ -139,7 +139,7 @@ public function getNode($path = null) * Returns nodes found by xpath expression * * @param string $xpath - * @return array + * @return Varien_Simplexml_Element[]|false */ public function getXpath($xpath) { @@ -156,7 +156,7 @@ public function getXpath($xpath) /** * @param Varien_Simplexml_Config_Cache_Abstract $cache - * @return Varien_Simplexml_Config + * @return $this */ public function setCache($cache) { @@ -174,7 +174,7 @@ public function getCache() /** * @param boolean $flag - * @return Varien_Simplexml_Config + * @return $this */ public function setCacheSaved($flag) { @@ -183,7 +183,7 @@ public function setCacheSaved($flag) } /** - * @return boolean + * @return bool */ public function getCacheSaved() { @@ -192,7 +192,7 @@ public function getCacheSaved() /** * @param string $id - * @return Varien_Simplexml_Config + * @return $this */ public function setCacheId($id) { @@ -210,7 +210,7 @@ public function getCacheId() /** * @param array $tags - * @return Varien_Simplexml_Config + * @return $this */ public function setCacheTags($tags) { @@ -228,7 +228,7 @@ public function getCacheTags() /** * @param int $lifetime - * @return Varien_Simplexml_Config + * @return $this */ public function setCacheLifetime($lifetime) { @@ -246,7 +246,7 @@ public function getCacheLifetime() /** * @param string|null $data - * @return Varien_Simplexml_Config + * @return $this */ public function setCacheChecksum($data) { @@ -261,8 +261,8 @@ public function setCacheChecksum($data) } /** - * @param string $data - * @return Varien_Simplexml_Config + * @param string|false $data + * @return $this */ public function updateCacheChecksum($data) { @@ -278,7 +278,7 @@ public function updateCacheChecksum($data) } /** - * @return string + * @return string|false|null */ public function getCacheChecksum() { @@ -294,7 +294,7 @@ public function getCacheChecksumId() } /** - * @return boolean + * @return bool */ public function fetchCacheChecksum() { @@ -302,7 +302,7 @@ public function fetchCacheChecksum() } /** - * @return boolean + * @return bool */ public function validateCacheChecksum() { @@ -318,7 +318,7 @@ public function validateCacheChecksum() } /** - * @return boolean + * @return bool */ public function loadCache() { @@ -339,7 +339,7 @@ public function loadCache() /** * @param array $tags - * @return Varien_Simplexml_Config + * @return $this */ public function saveCache($tags = null) { @@ -377,7 +377,7 @@ public function getXmlString() } /** - * @return Varien_Simplexml_Config + * @return $this */ public function removeCache() { @@ -388,7 +388,7 @@ public function removeCache() /** * @param string $id - * @return boolean + * @return bool */ protected function _loadCache($id) { @@ -400,7 +400,7 @@ protected function _loadCache($id) * @param string $id * @param array $tags * @param int|boolean $lifetime - * @return boolean + * @return bool */ protected function _saveCache($data, $id, $tags = [], $lifetime = false) { @@ -410,7 +410,7 @@ protected function _saveCache($data, $id, $tags = [], $lifetime = false) /** * @todo check this, as there are no caches that implement remove() method * @param string $id - * @return unknown + * @return mixed */ protected function _removeCache($id) { @@ -421,7 +421,7 @@ protected function _removeCache($id) * Imports XML file * * @param string $filePath - * @return boolean + * @return bool */ public function loadFile($filePath) { @@ -439,7 +439,7 @@ public function loadFile($filePath) * Imports XML string * * @param string $string - * @return boolean + * @return bool */ public function loadString($string) { @@ -460,7 +460,7 @@ public function loadString($string) * Imports DOM node * * @param DOMNode $dom - * @return Varien_Simplexml_Element + * @return bool */ public function loadDom($dom) { @@ -480,7 +480,7 @@ public function loadDom($dom) * @param string $path separated by slashes * @param string $value * @param boolean $overwrite - * @return Varien_Simplexml_Config + * @return $this */ public function setNode($path, $value, $overwrite = true) { @@ -491,7 +491,7 @@ public function setNode($path, $value, $overwrite = true) /** * Process configuration xml * - * @return Varien_Simplexml_Config + * @return $this */ public function applyExtends() { @@ -506,10 +506,7 @@ public function applyExtends() foreach ($sources as $source) { $target->extend($source); } - } else { - #echo "Not found extend: ".(string)$target['extends']; } - #unset($target['extends']); } return $this; } @@ -528,7 +525,7 @@ public function processFileData($text) /** * @param Varien_Simplexml_Config $config * @param boolean $overwrite - * @return Varien_Simplexml_Config + * @return $this */ public function extend(Varien_Simplexml_Config $config, $overwrite = true) { diff --git a/lib/Varien/Simplexml/Config/Cache/File.php b/lib/Varien/Simplexml/Config/Cache/File.php index b76be777439..823aa6c2e8f 100644 --- a/lib/Varien/Simplexml/Config/Cache/File.php +++ b/lib/Varien/Simplexml/Config/Cache/File.php @@ -32,7 +32,7 @@ class Varien_Simplexml_Config_Cache_File extends Varien_Simplexml_Config_Cache_A * Initialize variables that depend on the cache key * * @param string $key - * @return string + * @return $this */ public function setKey($key) { diff --git a/lib/Varien/Simplexml/Element.php b/lib/Varien/Simplexml/Element.php index a3503d7c8b3..b3edd767380 100644 --- a/lib/Varien/Simplexml/Element.php +++ b/lib/Varien/Simplexml/Element.php @@ -299,6 +299,7 @@ public function innerXml($level = 0) { $out = ''; foreach ($this->children() as $child) { + /** @var Varien_Simplexml_Element $child */ $out .= $child->asNiceXml($level); } return $out; @@ -449,16 +450,6 @@ public function setNode($path, $value, $overwrite = true) $node = $this; foreach ($arr as $i => $nodeName) { if ($last === $i) { - /* - if (isset($xml->$nodeName)) { - if ($overwrite) { - unset($xml->$nodeName); - } else { - continue; - } - } - $xml->addChild($nodeName, $xml->xmlentities($value)); - */ if (!isset($node->$nodeName) || $overwrite) { $node->$nodeName = $value; } @@ -472,138 +463,4 @@ public function setNode($path, $value, $overwrite = true) } return $this; } - - /* - public function extendChildByNode($source, $overwrite=false, $mergeBy='name') - { - // this will be our new target node - $targetChild = null; - - // name of the source node - $sourceName = $source->getName(); - - // here we have children of our source node - $sourceChildren = $source->children(); - - if (!$sourceChildren) { - // handle string node - if (isset($this->$sourceName)) { - if ($overwrite) { - unset($this->$sourceName); - } else { - return $this; - } - } - $targetChild = $this->addChild($sourceName, (string)$source); - foreach ($source->attributes() as $key=>$value) { - $targetChild->addAttribute($key, $value); - } - return $this; - } - - if (isset($this->$sourceName)) { - // search for target child with same name subnode as node's name - if (isset($source->$mergeBy)) { - foreach ($this->$sourceName as $targetNode) { - if (!isset($targetNode->$mergeBy)) { - Zend::exception("Can't merge identified node with non identified"); - } - if ((string)$source->$mergeBy==(string)$targetNode->$mergeBy) { - $targetChild = $targetNode; - break; - } - } - } else { - $existsWithId = false; - foreach ($this->$sourceName as $targetNode) { - if (isset($targetNode->$mergeBy)) { - Zend::exception("Can't merge identified node with non identified"); - } - } - $targetChild = $this->$sourceName; - } - } - - if (is_null($targetChild)) { - // if child target is not found create new and descend - $targetChild = $this->addChild($sourceName); - foreach ($source->attributes() as $key=>$value) { - $targetChild->addAttribute($key, $value); - } - } - - // finally add our source node children to resulting new target node - foreach ($sourceChildren as $childKey=>$childNode) { - $targetChild->extendChildByNode($childNode, $overwrite, $mergeBy); - } - - return $this; - } - - public function extendChildByAttribute($source, $overwrite=false, $mergeBy='name') - { - // this will be our new target node - $targetChild = null; - - // name of the source node - $sourceName = $source->getName(); - - // here we have children of our source node - $sourceChildren = $source->children(); - - if (!$sourceChildren) { - // handle string node - if (isset($this->$sourceName)) { - if ($overwrite) { - unset($this->$sourceName); - } else { - return $this; - } - } - $targetChild = $this->addChild($sourceName, (string)$source); - foreach ($source->attributes() as $key=>$value) { - $targetChild->addAttribute($key, $value); - } - return $this; - } - - if (isset($this->$sourceName)) { - // search for target child with same name subnode as node's name - if (isset($source[$mergeBy])) { - foreach ($this->$sourceName as $targetNode) { - if (!isset($targetNode[$mergeBy])) { - Zend::exception("Can't merge identified node with non identified"); - } - if ((string)$source[$mergeBy]==(string)$targetNode[$mergeBy]) { - $targetChild = $targetNode; - break; - } - } - } else { - $existsWithId = false; - foreach ($this->$sourceName as $targetNode) { - if (isset($targetNode[$mergeBy])) { - Zend::exception("Can't merge identified node with non identified"); - } - } - $targetChild = $this->$sourceName; - } - } - - if (is_null($targetChild)) { - // if child target is not found create new and descend - $targetChild = $this->addChild($sourceName); - foreach ($source->attributes() as $key=>$value) { - $targetChild->addAttribute($key, $value); - } - } - - // finally add our source node children to resulting new target node - foreach ($sourceChildren as $childKey=>$childNode) { - $targetChild->extendChildByAttribute($childNode, $overwrite, $mergeBy); - } - - return $this; - } - */ } diff --git a/phpstan.dist.baseline.neon b/phpstan.dist.baseline.neon index 6931f57a490..48dc16c4946 100644 --- a/phpstan.dist.baseline.neon +++ b/phpstan.dist.baseline.neon @@ -1805,11 +1805,6 @@ parameters: count: 1 path: app/code/core/Mage/Adminhtml/Model/Config.php - - - message: "#^Property Varien_Simplexml_Config\\:\\:\\$_cacheChecksum \\(unknown_type\\) does not accept null\\.$#" - count: 1 - path: app/code/core/Mage/Adminhtml/Model/Config.php - - message: "#^Call to an undefined method Mage_Adminhtml_Model_Config_Data\\:\\:__\\(\\)\\.$#" count: 1 @@ -2925,6 +2920,11 @@ parameters: count: 1 path: app/code/core/Mage/Backup/Model/Observer.php + - + message: "#^Argument of an invalid type true supplied for foreach, only iterables are supported\\.$#" + count: 1 + path: app/code/core/Mage/Backup/Model/Resource/Db.php + - message: "#^Property Mage_Backup_Model_Resource_Db\\:\\:\\$_write \\(Varien_Db_Adapter_Pdo_Mysql\\) does not accept Varien_Db_Adapter_Interface\\|false\\.$#" count: 1 @@ -3991,7 +3991,7 @@ parameters: path: app/code/core/Mage/Catalog/Model/Convert/Adapter/Product.php - - message: "#^Property Mage_Catalog_Model_Convert_Adapter_Product\\:\\:\\$_productModel \\(Mage_Catalog_Model_Product\\) does not accept string\\.$#" + message: "#^Property Mage_Catalog_Model_Convert_Adapter_Product\\:\\:\\$_productModel \\(Mage_Catalog_Model_Product\\) does not accept string\\|false\\.$#" count: 1 path: app/code/core/Mage/Catalog/Model/Convert/Adapter/Product.php @@ -6985,11 +6985,6 @@ parameters: count: 1 path: app/code/core/Mage/Core/Model/Config.php - - - message: "#^Property Varien_Simplexml_Config\\:\\:\\$_cacheChecksum \\(unknown_type\\) does not accept null\\.$#" - count: 1 - path: app/code/core/Mage/Core/Model/Config.php - - message: "#^Return type \\(Mage_Core_Model_App\\) of method Mage_Core_Model_Config\\:\\:_saveCache\\(\\) should be compatible with return type \\(bool\\) of method Varien_Simplexml_Config\\:\\:_saveCache\\(\\)$#" count: 1 @@ -7060,11 +7055,6 @@ parameters: count: 1 path: app/code/core/Mage/Core/Model/Design/Config.php - - - message: "#^Property Varien_Simplexml_Config\\:\\:\\$_cacheChecksum \\(unknown_type\\) does not accept null\\.$#" - count: 1 - path: app/code/core/Mage/Core/Model/Design/Config.php - - message: "#^Property Mage_Core_Model_Design_Fallback\\:\\:\\$_store \\(Mage_Core_Model_Store\\) on left side of \\?\\? is not nullable\\.$#" count: 1 @@ -7250,6 +7240,11 @@ parameters: count: 1 path: app/code/core/Mage/Core/Model/Layout.php + - + message: "#^Call to an undefined method Varien_Simplexml_Element\\:\\:getBlockName\\(\\)\\.$#" + count: 2 + path: app/code/core/Mage/Core/Model/Layout.php + - message: "#^Cannot unset offset '@attributes' on \\(array\\{\\}\\|array\\{\\000\\*\\000_parent\\: Varien_Simplexml_Element\\}\\)\\.$#" count: 1 @@ -7285,26 +7280,11 @@ parameters: count: 1 path: app/code/core/Mage/Core/Model/Layout.php - - - message: "#^Parameter \\#1 \\$parent of method Mage_Core_Model_Layout\\:\\:generateBlocks\\(\\) expects Mage_Core_Model_Layout_Element\\|null, Varien_Simplexml_Element given\\.$#" - count: 2 - path: app/code/core/Mage/Core/Model/Layout.php - - message: "#^Parameter \\#1 \\$sourceData of method Varien_Simplexml_Config\\:\\:__construct\\(\\) expects string\\|Varien_Simplexml_Element\\|null, array given\\.$#" count: 1 path: app/code/core/Mage/Core/Model/Layout.php - - - message: "#^Parameter \\#2 \\$parent of method Mage_Core_Model_Layout\\:\\:_generateAction\\(\\) expects Mage_Core_Model_Layout_Element, Varien_Simplexml_Element given\\.$#" - count: 1 - path: app/code/core/Mage/Core/Model/Layout.php - - - - message: "#^Parameter \\#2 \\$parent of method Mage_Core_Model_Layout\\:\\:_generateBlock\\(\\) expects Mage_Core_Model_Layout_Element, Varien_Simplexml_Element given\\.$#" - count: 1 - path: app/code/core/Mage/Core/Model/Layout.php - - message: "#^Parameter \\#2 \\$value of method SimpleXMLElement\\:\\:addAttribute\\(\\) expects string, true given\\.$#" count: 1 @@ -8141,7 +8121,7 @@ parameters: path: app/code/core/Mage/Customer/Model/Convert/Adapter/Customer.php - - message: "#^Property Mage_Customer_Model_Convert_Adapter_Customer\\:\\:\\$_customerModel \\(Mage_Customer_Model_Customer\\) does not accept string\\.$#" + message: "#^Property Mage_Customer_Model_Convert_Adapter_Customer\\:\\:\\$_customerModel \\(Mage_Customer_Model_Customer\\) does not accept string\\|false\\.$#" count: 1 path: app/code/core/Mage/Customer/Model/Convert/Adapter/Customer.php @@ -8351,12 +8331,12 @@ parameters: path: app/code/core/Mage/Dataflow/Model/Batch.php - - message: "#^Property Mage_Dataflow_Model_Batch\\:\\:\\$_batchExport \\(Mage_Dataflow_Model_Batch_Export\\) does not accept string\\.$#" + message: "#^Property Mage_Dataflow_Model_Batch\\:\\:\\$_batchExport \\(Mage_Dataflow_Model_Batch_Export\\) does not accept string\\|false\\.$#" count: 1 path: app/code/core/Mage/Dataflow/Model/Batch.php - - message: "#^Property Mage_Dataflow_Model_Batch\\:\\:\\$_batchImport \\(Mage_Dataflow_Model_Batch_Import\\) does not accept string\\.$#" + message: "#^Property Mage_Dataflow_Model_Batch\\:\\:\\$_batchImport \\(Mage_Dataflow_Model_Batch_Import\\) does not accept string\\|false\\.$#" count: 1 path: app/code/core/Mage/Dataflow/Model/Batch.php @@ -8471,12 +8451,12 @@ parameters: path: app/code/core/Mage/Dataflow/Model/Convert/Mapper/Column.php - - message: "#^Property Mage_Dataflow_Model_Convert_Mapper_Column\\:\\:\\$_batchExport \\(Mage_Dataflow_Model_Batch_Export\\) does not accept string\\.$#" + message: "#^Property Mage_Dataflow_Model_Convert_Mapper_Column\\:\\:\\$_batchExport \\(Mage_Dataflow_Model_Batch_Export\\) does not accept string\\|false\\.$#" count: 1 path: app/code/core/Mage/Dataflow/Model/Convert/Mapper/Column.php - - message: "#^Property Mage_Dataflow_Model_Convert_Mapper_Column\\:\\:\\$_batchImport \\(Mage_Dataflow_Model_Batch_Import\\) does not accept string\\.$#" + message: "#^Property Mage_Dataflow_Model_Convert_Mapper_Column\\:\\:\\$_batchImport \\(Mage_Dataflow_Model_Batch_Import\\) does not accept string\\|false\\.$#" count: 1 path: app/code/core/Mage/Dataflow/Model/Convert/Mapper/Column.php @@ -8496,12 +8476,12 @@ parameters: path: app/code/core/Mage/Dataflow/Model/Convert/Parser/Abstract.php - - message: "#^Property Mage_Dataflow_Model_Convert_Parser_Abstract\\:\\:\\$_batchExport \\(Mage_Dataflow_Model_Batch_Export\\) does not accept string\\.$#" + message: "#^Property Mage_Dataflow_Model_Convert_Parser_Abstract\\:\\:\\$_batchExport \\(Mage_Dataflow_Model_Batch_Export\\) does not accept string\\|false\\.$#" count: 1 path: app/code/core/Mage/Dataflow/Model/Convert/Parser/Abstract.php - - message: "#^Property Mage_Dataflow_Model_Convert_Parser_Abstract\\:\\:\\$_batchImport \\(Mage_Dataflow_Model_Batch_Import\\) does not accept string\\.$#" + message: "#^Property Mage_Dataflow_Model_Convert_Parser_Abstract\\:\\:\\$_batchImport \\(Mage_Dataflow_Model_Batch_Import\\) does not accept string\\|false\\.$#" count: 1 path: app/code/core/Mage/Dataflow/Model/Convert/Parser/Abstract.php @@ -8740,11 +8720,6 @@ parameters: count: 2 path: app/code/core/Mage/Downloadable/Model/Link/Api/Uploader.php - - - message: "#^Property Varien_File_Uploader\\:\\:\\$_uploadType \\(string\\) does not accept int\\.$#" - count: 1 - path: app/code/core/Mage/Downloadable/Model/Link/Api/Uploader.php - - message: "#^Parameter \\#2 \\$resource \\(object\\) of method Mage_Downloadable_Model_Link_Api_V2\\:\\:add\\(\\) should be compatible with parameter \\$resource \\(array\\) of method Mage_Downloadable_Model_Link_Api\\:\\:add\\(\\)$#" count: 1 @@ -9920,11 +9895,6 @@ parameters: count: 2 path: app/code/core/Mage/ImportExport/Model/Import/Uploader.php - - - message: "#^Property Varien_File_Uploader\\:\\:\\$_uploadType \\(string\\) does not accept int\\.$#" - count: 1 - path: app/code/core/Mage/ImportExport/Model/Import/Uploader.php - - message: "#^Else branch is unreachable because previous condition is always true\\.$#" count: 1 @@ -10020,11 +9990,6 @@ parameters: count: 1 path: app/code/core/Mage/Index/Model/Resource/Event/Collection.php - - - message: "#^Property Varien_Data_Collection_Db\\:\\:\\$_data \\(array\\) does not accept null\\.$#" - count: 1 - path: app/code/core/Mage/Index/Model/Resource/Event/Collection.php - - message: "#^Parameter \\#1 \\$adapter of method Varien_Db_Adapter_Interface\\:\\:setCacheAdapter\\(\\) expects Zend_Cache_Backend_Interface, Zend_Cache_Core given\\.$#" count: 2 @@ -10061,7 +10026,7 @@ parameters: path: app/code/core/Mage/Install/Controller/Action.php - - message: "#^Offset 'path' does not exist on array\\{\\000\\*\\000_parent\\: Varien_Simplexml_Element\\}\\.$#" + message: "#^Offset 'path' does not exist on array\\{\\000\\*\\000_parent\\: Varien_Simplexml_Element\\}\\|array\\{false\\}\\.$#" count: 1 path: app/code/core/Mage/Install/Model/Config.php @@ -14136,28 +14101,28 @@ parameters: path: app/code/core/Mage/Shipping/Model/Resource/Carrier/Tablerate.php - - message: "#^Parameter \\#1 \\$row of method Mage_Shipping_Model_Resource_Carrier_Tablerate\\:\\:_getImportRow\\(\\) expects array, string given\\.$#" + message: "#^If condition is always false\\.$#" count: 1 path: app/code/core/Mage/Shipping/Model/Resource/Carrier/Tablerate.php - - message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, string given\\.$#" + message: "#^Parameter \\#1 \\$row of method Mage_Shipping_Model_Resource_Carrier_Tablerate\\:\\:_getImportRow\\(\\) expects array, string\\|true given\\.$#" count: 1 path: app/code/core/Mage/Shipping/Model/Resource/Carrier/Tablerate.php - - message: "#^Result of && is always true\\.$#" + message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, string\\|true given\\.$#" count: 1 path: app/code/core/Mage/Shipping/Model/Resource/Carrier/Tablerate.php - - message: "#^Strict comparison using \\=\\=\\= between string and false will always evaluate to false\\.$#" + message: "#^Result of && is always true\\.$#" count: 1 path: app/code/core/Mage/Shipping/Model/Resource/Carrier/Tablerate.php - message: "#^Unreachable statement \\- code above always terminates\\.$#" - count: 4 + count: 2 path: app/code/core/Mage/Shipping/Model/Resource/Carrier/Tablerate.php - @@ -15705,11 +15670,6 @@ parameters: count: 1 path: lib/Varien/Cache/Backend/Database.php - - - message: "#^Method Varien_Cache_Backend_Memcached\\:\\:_cleanTheMess\\(\\) should return null but return statement is missing\\.$#" - count: 1 - path: lib/Varien/Cache/Backend/Memcached.php - - message: "#^Parameter \\#2 \\$chunks of method Varien_Cache_Backend_Memcached\\:\\:_cleanTheMess\\(\\) expects int, string given\\.$#" count: 1 @@ -15730,16 +15690,6 @@ parameters: count: 2 path: lib/Varien/Cache/Backend/Memcached.php - - - message: "#^Method Varien_Cache_Core\\:\\:_cleanTheMess\\(\\) should return null but return statement is missing\\.$#" - count: 1 - path: lib/Varien/Cache/Core.php - - - - message: "#^Parameter \\#2 \\$chunks of method Varien_Cache_Core\\:\\:_cleanTheMess\\(\\) expects int, string given\\.$#" - count: 1 - path: lib/Varien/Cache/Core.php - - message: "#^Call to an undefined method Varien_Convert_Action\\:\\:getData\\(\\)\\.$#" count: 1 @@ -15825,11 +15775,6 @@ parameters: count: 1 path: lib/Varien/Data/Collection/Db.php - - - message: "#^Call to function is_null\\(\\) with array will always evaluate to false\\.$#" - count: 1 - path: lib/Varien/Data/Collection/Db.php - - message: "#^Call to function is_null\\(\\) with int will always evaluate to false\\.$#" count: 1 @@ -15845,46 +15790,21 @@ parameters: count: 1 path: lib/Varien/Data/Collection/Db.php - - - message: "#^Property Varien_Data_Collection_Db\\:\\:\\$_data \\(array\\) does not accept null\\.$#" - count: 2 - path: lib/Varien/Data/Collection/Db.php - - message: "#^Property Varien_Data_Collection_Db\\:\\:\\$_fetchStmt \\(Zend_Db_Statement_Pdo\\) does not accept Zend_Db_Statement_Interface\\.$#" count: 1 path: lib/Varien/Data/Collection/Db.php - - - message: "#^Property Varien_Data_Collection_Db\\:\\:\\$_map \\(array\\) in isset\\(\\) is not nullable\\.$#" - count: 1 - path: lib/Varien/Data/Collection/Db.php - - message: "#^Property Varien_Data_Collection_Db\\:\\:\\$_select \\(Varien_Db_Select\\) does not accept Zend_Db_Select\\.$#" count: 1 path: lib/Varien/Data/Collection/Db.php - - - message: "#^Cannot assign offset string to string\\.$#" - count: 1 - path: lib/Varien/Data/Collection/Filesystem.php - - message: "#^Empty array passed to foreach\\.$#" count: 1 path: lib/Varien/Data/Collection/Filesystem.php - - - message: "#^Property Varien_Data_Collection_Filesystem\\:\\:\\$_targetDirs \\(string\\) does not accept default value of type array\\.$#" - count: 1 - path: lib/Varien/Data/Collection/Filesystem.php - - - - message: "#^Parameter \\#1 \\$form of method Varien_Data_Form_Element_Abstract\\:\\:setForm\\(\\) expects Varien_Data_Form, \\$this\\(Varien_Data_Form_Abstract\\) given\\.$#" - count: 2 - path: lib/Varien/Data/Form/Abstract.php - - message: "#^Property Varien_Data_Form_Abstract\\:\\:\\$_elements \\(Varien_Data_Form_Element_Collection\\) in empty\\(\\) is not falsy\\.$#" count: 1 @@ -15895,21 +15815,6 @@ parameters: count: 2 path: lib/Varien/Data/Form/Element/Abstract.php - - - message: "#^Method Varien_Data_Form_Element_Date\\:\\:getValueInstance\\(\\) should return Zend_Date but returns null\\.$#" - count: 1 - path: lib/Varien/Data/Form/Element/Date.php - - - - message: "#^Property Varien_Data_Form_Element_Date\\:\\:\\$_value \\(Zend_Date\\) does not accept string\\.$#" - count: 2 - path: lib/Varien/Data/Form/Element/Date.php - - - - message: "#^Property Varien_Data_Form_Element_Date\\:\\:\\$_value \\(Zend_Date\\) in empty\\(\\) is not falsy\\.$#" - count: 2 - path: lib/Varien/Data/Form/Element/Date.php - - message: "#^Access to an undefined property Varien_Data_Form_Element_Fieldset\\:\\:\\$_sortDirection\\.$#" count: 1 @@ -15935,26 +15840,6 @@ parameters: count: 1 path: lib/Varien/Data/Form/Element/Multiline.php - - - message: "#^Parameter \\#2 \\$haystack of function in_array expects array, string given\\.$#" - count: 1 - path: lib/Varien/Data/Form/Element/Multiselect.php - - - - message: "#^Parameter \\#2 \\$selected of method Varien_Data_Form_Element_Multiselect\\:\\:_optionToHtml\\(\\) expects string, array given\\.$#" - count: 2 - path: lib/Varien/Data/Form/Element/Multiselect.php - - - - message: "#^Parameter \\#2 \\$haystack of function in_array expects array, string given\\.$#" - count: 1 - path: lib/Varien/Data/Form/Element/Select.php - - - - message: "#^Parameter \\#2 \\$selected of method Varien_Data_Form_Element_Select\\:\\:_optionToHtml\\(\\) expects string, array given\\.$#" - count: 3 - path: lib/Varien/Data/Form/Element/Select.php - - message: "#^Parameter \\#1 \\$string of function str_pad expects string, int\\<0, 23\\> given\\.$#" count: 1 @@ -16075,6 +15960,11 @@ parameters: count: 1 path: lib/Varien/Db/Adapter/Mysqli.php + - + message: "#^Cannot access offset 'Engine' on bool\\.$#" + count: 1 + path: lib/Varien/Db/Adapter/Pdo/Mysql.php + - message: "#^Cannot call method query\\(\\) on object\\|resource\\.$#" count: 1 @@ -16095,46 +15985,6 @@ parameters: count: 1 path: lib/Varien/Db/Adapter/Pdo/Mysql.php - - - message: "#^Method Varien_Db_Adapter_Pdo_Mysql\\:\\:addColumn\\(\\) should return bool\\|int but returns Zend_Db_Statement_Interface\\.$#" - count: 1 - path: lib/Varien/Db/Adapter/Pdo/Mysql.php - - - - message: "#^Method Varien_Db_Adapter_Pdo_Mysql\\:\\:createTable\\(\\) has invalid return type Zend_Db_Pdo_Statement\\.$#" - count: 1 - path: lib/Varien/Db/Adapter/Pdo/Mysql.php - - - - message: "#^Method Varien_Db_Adapter_Pdo_Mysql\\:\\:createTable\\(\\) should return Zend_Db_Pdo_Statement but returns Zend_Db_Statement_Pdo\\.$#" - count: 1 - path: lib/Varien/Db/Adapter/Pdo/Mysql.php - - - - message: "#^Method Varien_Db_Adapter_Pdo_Mysql\\:\\:createTemporaryTable\\(\\) has invalid return type Zend_Db_Pdo_Statement\\.$#" - count: 1 - path: lib/Varien/Db/Adapter/Pdo/Mysql.php - - - - message: "#^Method Varien_Db_Adapter_Pdo_Mysql\\:\\:createTemporaryTable\\(\\) should return Zend_Db_Pdo_Statement but returns Zend_Db_Statement_Pdo\\.$#" - count: 1 - path: lib/Varien/Db/Adapter/Pdo/Mysql.php - - - - message: "#^Method Varien_Db_Adapter_Pdo_Mysql\\:\\:dropColumn\\(\\) should return bool but returns Zend_Db_Statement_Interface\\.$#" - count: 1 - path: lib/Varien/Db/Adapter/Pdo/Mysql.php - - - - message: "#^Method Varien_Db_Adapter_Pdo_Mysql\\:\\:dropTemporaryTable\\(\\) should return bool but returns \\$this\\(Varien_Db_Adapter_Pdo_Mysql\\)\\.$#" - count: 1 - path: lib/Varien/Db/Adapter/Pdo/Mysql.php - - - - message: "#^Method Varien_Db_Adapter_Pdo_Mysql\\:\\:showTableStatus\\(\\) should return array\\|false but returns bool\\.$#" - count: 1 - path: lib/Varien/Db/Adapter/Pdo/Mysql.php - - message: "#^Negated boolean expression is always false\\.$#" count: 2 @@ -16151,12 +16001,12 @@ parameters: path: lib/Varien/Db/Adapter/Pdo/Mysql.php - - message: "#^Return type \\(array\\) of method Varien_Db_Adapter_Pdo_Mysql\\:\\:multiQuery\\(\\) should be compatible with return type \\(Varien_Db_Adapter_Interface\\) of method Varien_Db_Adapter_Interface\\:\\:multiQuery\\(\\)$#" + message: "#^Return type \\(\\$this\\(Varien_Db_Adapter_Pdo_Mysql\\)\\) of method Varien_Db_Adapter_Pdo_Mysql\\:\\:dropTemporaryTable\\(\\) should be compatible with return type \\(bool\\) of method Varien_Db_Adapter_Interface\\:\\:dropTemporaryTable\\(\\)$#" count: 1 path: lib/Varien/Db/Adapter/Pdo/Mysql.php - - message: "#^Return type \\(bool\\|int\\) of method Varien_Db_Adapter_Pdo_Mysql\\:\\:addColumn\\(\\) should be compatible with return type \\(Varien_Db_Adapter_Interface\\) of method Varien_Db_Adapter_Interface\\:\\:addColumn\\(\\)$#" + message: "#^Return type \\(array\\) of method Varien_Db_Adapter_Pdo_Mysql\\:\\:multiQuery\\(\\) should be compatible with return type \\(Varien_Db_Adapter_Interface\\) of method Varien_Db_Adapter_Interface\\:\\:multiQuery\\(\\)$#" count: 1 path: lib/Varien/Db/Adapter/Pdo/Mysql.php @@ -16170,31 +16020,6 @@ parameters: count: 4 path: lib/Varien/Db/Adapter/Pdo/Mysql.php - - - message: "#^Call to function is_null\\(\\) with string will always evaluate to false\\.$#" - count: 1 - path: lib/Varien/Db/Ddl/Table.php - - - - message: "#^Method Varien_Db_Ddl_Table\\:\\:setOption\\(\\) should return string but returns \\$this\\(Varien_Db_Ddl_Table\\)\\.$#" - count: 1 - path: lib/Varien/Db/Ddl/Table.php - - - - message: "#^Method Varien_Db_Select\\:\\:_tableCols\\(\\) with return type void returns void but should not return anything\\.$#" - count: 1 - path: lib/Varien/Db/Select.php - - - - message: "#^Result of method Zend_Db_Select\\:\\:_tableCols\\(\\) \\(void\\) is used\\.$#" - count: 1 - path: lib/Varien/Db/Select.php - - - - message: "#^Method Varien_Db_Statement_Parameter\\:\\:__construct\\(\\) with return type void returns \\$this\\(Varien_Db_Statement_Parameter\\) but should not return anything\\.$#" - count: 1 - path: lib/Varien/Db/Statement/Parameter.php - - message: "#^Cannot call method bindParam\\(\\) on object\\|resource\\.$#" count: 1 @@ -16235,16 +16060,6 @@ parameters: count: 2 path: lib/Varien/Db/Tree.php - - - message: "#^Method Varien_Db_Tree_Node\\:\\:__construct\\(\\) with return type void returns \\$this\\(Varien_Db_Tree_Node\\) but should not return anything\\.$#" - count: 1 - path: lib/Varien/Db/Tree/Node.php - - - - message: "#^Property Varien_Db_Tree_Node\\:\\:\\$title is unused\\.$#" - count: 1 - path: lib/Varien/Db/Tree/Node.php - - message: "#^Method Varien_Db_Tree_NodeSet\\:\\:next\\(\\) with return type void returns false but should not return anything\\.$#" count: 1 @@ -16260,61 +16075,21 @@ parameters: count: 1 path: lib/Varien/Debug.php - - - message: "#^Call to function is_null\\(\\) with string will always evaluate to false\\.$#" - count: 1 - path: lib/Varien/Debug.php - - message: "#^Variable \\$methodName might not be defined\\.$#" count: 2 path: lib/Varien/Debug.php - - - message: "#^Call to function is_object\\(\\) with string will always evaluate to false\\.$#" - count: 1 - path: lib/Varien/Event/Observer.php - - - - message: "#^Method Varien_File_Transfer_Adapter_Http\\:\\:_detectMimeType\\(\\) should return string but returns null\\.$#" - count: 1 - path: lib/Varien/File/Transfer/Adapter/Http.php - - - - message: "#^Parameter \\#2 \\$value of method Zend_Controller_Response_Abstract\\:\\:setHeader\\(\\) expects string, int\\<0, max\\>\\|false given\\.$#" - count: 1 - path: lib/Varien/File/Transfer/Adapter/Http.php - - message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, string given\\.$#" count: 2 path: lib/Varien/File/Uploader.php - - - message: "#^Property Varien_File_Uploader\\:\\:\\$_result \\(array\\|false\\) does not accept bool\\.$#" - count: 1 - path: lib/Varien/File/Uploader.php - - - - message: "#^Property Varien_File_Uploader\\:\\:\\$_uploadType \\(string\\) does not accept int\\.$#" - count: 3 - path: lib/Varien/File/Uploader.php - - message: "#^Call to an undefined method Varien_File_Uploader_Image\\:\\:newUploader\\(\\)\\.$#" count: 1 path: lib/Varien/File/Uploader/Image.php - - - message: "#^Method Varien_Filter_Template\\:\\:getEmailPathValidator\\(\\) should return Mage_Core_Model_Abstract but returns Mage_Adminhtml_Model_Email_PathValidator\\.$#" - count: 1 - path: lib/Varien/Filter/Template.php - - - - message: "#^Parameter \\#2 \\$default of method Varien_Filter_Template\\:\\:_getVariable\\(\\) expects string, null given\\.$#" - count: 1 - path: lib/Varien/Filter/Template.php - - message: "#^Right side of && is always false\\.$#" count: 1 @@ -16325,71 +16100,6 @@ parameters: count: 1 path: lib/Varien/Filter/Template/Tokenizer/Variable.php - - - message: "#^Call to function is_null\\(\\) with resource will always evaluate to false\\.$#" - count: 1 - path: lib/Varien/Http/Adapter/Curl.php - - - - message: "#^Parameter \\#1 \\$handle of function curl_close expects CurlHandle, resource given\\.$#" - count: 1 - path: lib/Varien/Http/Adapter/Curl.php - - - - message: "#^Parameter \\#1 \\$handle of function curl_errno expects CurlHandle, resource given\\.$#" - count: 1 - path: lib/Varien/Http/Adapter/Curl.php - - - - message: "#^Parameter \\#1 \\$handle of function curl_error expects CurlHandle, resource given\\.$#" - count: 1 - path: lib/Varien/Http/Adapter/Curl.php - - - - message: "#^Parameter \\#1 \\$handle of function curl_exec expects CurlHandle, resource given\\.$#" - count: 1 - path: lib/Varien/Http/Adapter/Curl.php - - - - message: "#^Parameter \\#1 \\$handle of function curl_getinfo expects CurlHandle, resource given\\.$#" - count: 2 - path: lib/Varien/Http/Adapter/Curl.php - - - - message: "#^Parameter \\#1 \\$handle of function curl_setopt expects CurlHandle, resource given\\.$#" - count: 3 - path: lib/Varien/Http/Adapter/Curl.php - - - - message: "#^Parameter \\#1 \\$handle of function curl_setopt_array expects CurlHandle, resource given\\.$#" - count: 2 - path: lib/Varien/Http/Adapter/Curl.php - - - - message: "#^Property Varien_Http_Adapter_Curl\\:\\:\\$_resource \\(resource\\) does not accept CurlHandle\\.$#" - count: 1 - path: lib/Varien/Http/Adapter/Curl.php - - - - message: "#^Property Varien_Http_Adapter_Curl\\:\\:\\$_resource \\(resource\\) does not accept null\\.$#" - count: 1 - path: lib/Varien/Http/Adapter/Curl.php - - - - message: "#^Default value of the parameter \\#2 \\$adapter \\(string\\) of method Varien_Image\\:\\:__construct\\(\\) is incompatible with type Varien_Image_Adapter\\.$#" - count: 1 - path: lib/Varien/Image.php - - - - message: "#^Parameter \\#1 \\$adapter of method Varien_Image\\:\\:_getAdapter\\(\\) expects string\\|null, Varien_Image_Adapter given\\.$#" - count: 1 - path: lib/Varien/Image.php - - - - message: "#^Property Varien_Image\\:\\:\\$_adapter \\(Varien_Image_Adapter_Abstract\\) in isset\\(\\) is not nullable\\.$#" - count: 1 - path: lib/Varien/Image.php - - message: "#^Method Varien_Image_Adapter_Abstract\\:\\:backgroundColor\\(\\) should return array but empty return statement found\\.$#" count: 2 @@ -16400,76 +16110,16 @@ parameters: count: 1 path: lib/Varien/Image/Adapter/Gd2.php - - - message: "#^Call to function is_null\\(\\) with int will always evaluate to false\\.$#" - count: 2 - path: lib/Varien/Image/Adapter/Gd2.php - - - - message: "#^Instanceof between \\*NEVER\\* and GdImage will always evaluate to false\\.$#" - count: 1 - path: lib/Varien/Image/Adapter/Gd2.php - - - - message: "#^Parameter \\#1 \\$dst_image of function imagecopymerge expects GdImage, resource given\\.$#" - count: 7 - path: lib/Varien/Image/Adapter/Gd2.php - - - - message: "#^Parameter \\#1 \\$image of function imagecolorsforindex expects GdImage, resource given\\.$#" - count: 1 - path: lib/Varien/Image/Adapter/Gd2.php - - - - message: "#^Parameter \\#1 \\$image of function imagecolorstotal expects GdImage, resource given\\.$#" - count: 1 - path: lib/Varien/Image/Adapter/Gd2.php - - - - message: "#^Parameter \\#1 \\$image of function imagedestroy expects GdImage, resource given\\.$#" - count: 1 - path: lib/Varien/Image/Adapter/Gd2.php - - - - message: "#^Parameter \\#1 \\$image of function imageinterlace expects GdImage, resource given\\.$#" - count: 1 - path: lib/Varien/Image/Adapter/Gd2.php - - - - message: "#^Parameter \\#1 \\$image of function imagerotate expects GdImage, resource given\\.$#" - count: 1 - path: lib/Varien/Image/Adapter/Gd2.php - - - - message: "#^Parameter \\#1 \\$image of function imagesx expects GdImage, resource given\\.$#" - count: 2 - path: lib/Varien/Image/Adapter/Gd2.php - - - - message: "#^Parameter \\#1 \\$image of function imagesy expects GdImage, resource given\\.$#" - count: 2 - path: lib/Varien/Image/Adapter/Gd2.php - - message: "#^Parameter \\#2 \\$enable of function imageinterlace expects bool\\|null, int given\\.$#" count: 1 path: lib/Varien/Image/Adapter/Gd2.php - - message: "#^Parameter \\#2 \\$src_image of function imagecopy expects GdImage, resource given\\.$#" + message: "#^Result of \\|\\| is always true\\.$#" count: 1 path: lib/Varien/Image/Adapter/Gd2.php - - - message: "#^Parameter \\#2 \\$src_image of function imagecopyresampled expects GdImage, resource given\\.$#" - count: 2 - path: lib/Varien/Image/Adapter/Gd2.php - - - - message: "#^Property Varien_Image_Adapter_Abstract\\:\\:\\$_imageHandler \\(resource\\) does not accept GdImage\\|false\\.$#" - count: 2 - path: lib/Varien/Image/Adapter/Gd2.php - - message: "#^Offset 0 on array\\{\\} in isset\\(\\) does not exist\\.$#" count: 1 @@ -16485,36 +16135,6 @@ parameters: count: 1 path: lib/Varien/Io/File.php - - - message: "#^Method Varien_Io_File\\:\\:createDestinationDir\\(\\) should return Varien_Io_File but returns bool\\.$#" - count: 1 - path: lib/Varien/Io/File.php - - - - message: "#^Method Varien_Io_File\\:\\:createDestinationDir\\(\\) should return Varien_Io_File but returns false\\.$#" - count: 1 - path: lib/Varien/Io/File.php - - - - message: "#^Method Varien_Io_File\\:\\:setAllowCreateFolders\\(\\) with return type void returns \\$this\\(Varien_Io_File\\) but should not return anything\\.$#" - count: 1 - path: lib/Varien/Io/File.php - - - - message: "#^Method Varien_Io_File\\:\\:streamRead\\(\\) should return string but returns false\\.$#" - count: 2 - path: lib/Varien/Io/File.php - - - - message: "#^Method Varien_Io_File\\:\\:streamReadCsv\\(\\) should return string but returns array\\|false\\.$#" - count: 1 - path: lib/Varien/Io/File.php - - - - message: "#^Method Varien_Io_File\\:\\:streamReadCsv\\(\\) should return string but returns false\\.$#" - count: 1 - path: lib/Varien/Io/File.php - - message: "#^Negated boolean expression is always false\\.$#" count: 8 @@ -16535,21 +16155,6 @@ parameters: count: 1 path: lib/Varien/Io/File.php - - - message: "#^Parameter \\$src of method Varien_Io_File\\:\\:filePutContent\\(\\) has invalid type srting\\.$#" - count: 1 - path: lib/Varien/Io/File.php - - - - message: "#^Return type \\(void\\) of method Varien_Io_File\\:\\:setAllowCreateFolders\\(\\) should be compatible with return type \\(Varien_Io_Abstract\\) of method Varien_Io_Abstract\\:\\:setAllowCreateFolders\\(\\)$#" - count: 1 - path: lib/Varien/Io/File.php - - - - message: "#^Method Varien_Io_Ftp\\:\\:read\\(\\) should return string but returns false\\.$#" - count: 1 - path: lib/Varien/Io/Ftp.php - - message: "#^Parameter \\#1 \\$prefix of function uniqid expects string, int\\<0, max\\> given\\.$#" count: 1 @@ -16570,11 +16175,6 @@ parameters: count: 1 path: lib/Varien/Object/Cache.php - - - message: "#^Method Varien_Object_Cache\\:\\:save\\(\\) should return string but returns false\\.$#" - count: 1 - path: lib/Varien/Object/Cache.php - - message: "#^Negated boolean expression is always false\\.$#" count: 1 @@ -16601,52 +16201,27 @@ parameters: path: lib/Varien/Object/Mapper.php - - message: "#^Call to an undefined method Varien_Simplexml_Config_Cache_Abstract\\:\\:load\\(\\)\\.$#" - count: 2 - path: lib/Varien/Simplexml/Config.php - - - - message: "#^Call to an undefined method Varien_Simplexml_Config_Cache_Abstract\\:\\:remove\\(\\)\\.$#" + message: "#^Call to an undefined method SimpleXMLElement\\:\\:setNode\\(\\)\\.$#" count: 1 path: lib/Varien/Simplexml/Config.php - - message: "#^Call to an undefined method Varien_Simplexml_Config_Cache_Abstract\\:\\:save\\(\\)\\.$#" - count: 1 - path: lib/Varien/Simplexml/Config.php - - - - message: "#^Call to function is_null\\(\\) with string will always evaluate to false\\.$#" - count: 1 - path: lib/Varien/Simplexml/Config.php - - - - message: "#^Method Varien_Simplexml_Config\\:\\:_removeCache\\(\\) has invalid return type unknown\\.$#" - count: 1 - path: lib/Varien/Simplexml/Config.php - - - - message: "#^Method Varien_Simplexml_Config\\:\\:getCacheChecksum\\(\\) should return string but returns unknown_type\\.$#" - count: 1 + message: "#^Call to an undefined method Varien_Simplexml_Config_Cache_Abstract\\:\\:load\\(\\)\\.$#" + count: 2 path: lib/Varien/Simplexml/Config.php - - message: "#^Method Varien_Simplexml_Config\\:\\:getNode\\(\\) should return Varien_Simplexml_Element but returns false\\.$#" + message: "#^Call to an undefined method Varien_Simplexml_Config_Cache_Abstract\\:\\:remove\\(\\)\\.$#" count: 1 path: lib/Varien/Simplexml/Config.php - - message: "#^Method Varien_Simplexml_Config\\:\\:getXpath\\(\\) should return array but returns false\\.$#" - count: 2 - path: lib/Varien/Simplexml/Config.php - - - - message: "#^Method Varien_Simplexml_Config\\:\\:loadDom\\(\\) should return Varien_Simplexml_Element but returns false\\.$#" + message: "#^Call to an undefined method Varien_Simplexml_Config_Cache_Abstract\\:\\:save\\(\\)\\.$#" count: 1 path: lib/Varien/Simplexml/Config.php - - message: "#^Method Varien_Simplexml_Config\\:\\:loadDom\\(\\) should return Varien_Simplexml_Element but returns true\\.$#" + message: "#^Method Varien_Simplexml_Config\\:\\:getXpath\\(\\) should return array\\\\|false but returns non\\-empty\\-array\\\\.$#" count: 1 path: lib/Varien/Simplexml/Config.php @@ -16660,56 +16235,16 @@ parameters: count: 1 path: lib/Varien/Simplexml/Config.php - - - message: "#^Property Varien_Simplexml_Config\\:\\:\\$_cacheChecksum \\(unknown_type\\) does not accept default value of type false\\.$#" - count: 1 - path: lib/Varien/Simplexml/Config.php - - - - message: "#^Property Varien_Simplexml_Config\\:\\:\\$_cacheChecksum \\(unknown_type\\) does not accept false\\.$#" - count: 2 - path: lib/Varien/Simplexml/Config.php - - - - message: "#^Property Varien_Simplexml_Config\\:\\:\\$_cacheChecksum \\(unknown_type\\) does not accept null\\.$#" - count: 1 - path: lib/Varien/Simplexml/Config.php - - - - message: "#^Property Varien_Simplexml_Config\\:\\:\\$_cacheChecksum \\(unknown_type\\) does not accept string\\.$#" - count: 1 - path: lib/Varien/Simplexml/Config.php - - - - message: "#^Property Varien_Simplexml_Config\\:\\:\\$_cacheChecksum has unknown class unknown_type as its type\\.$#" - count: 1 - path: lib/Varien/Simplexml/Config.php - - - - message: "#^Property Varien_Simplexml_Config\\:\\:\\$_xml \\(Varien_Simplexml_Element\\) does not accept SimpleXMLElement\\.$#" - count: 2 - path: lib/Varien/Simplexml/Config.php - - message: "#^Result of && is always false\\.$#" count: 1 path: lib/Varien/Simplexml/Config.php - - - message: "#^Strict comparison using \\=\\=\\= between false and string will always evaluate to false\\.$#" - count: 3 - path: lib/Varien/Simplexml/Config.php - - message: "#^Strict comparison using \\=\\=\\= between string and false will always evaluate to false\\.$#" count: 1 path: lib/Varien/Simplexml/Config.php - - - message: "#^Method Varien_Simplexml_Config_Cache_File\\:\\:setKey\\(\\) should return string but returns \\$this\\(Varien_Simplexml_Config_Cache_File\\)\\.$#" - count: 1 - path: lib/Varien/Simplexml/Config/Cache/File.php - - message: "#^Parameter \\#1 \\$filename of method Varien_Simplexml_Element\\:\\:asNiceXml\\(\\) expects string, int given\\.$#" count: 1