@@ -64,7 +64,7 @@ |
||
64 | 64 | $runConfig = $jobConfig->run; |
65 | 65 | |
66 | 66 | if ($runConfig->model) { |
67 | - if (!preg_match(self::REGEX_RUN_MODEL, (string) $runConfig->model, $run)) { |
|
67 | + if (!preg_match(self::REGEX_RUN_MODEL, (string)$runConfig->model, $run)) { |
|
68 | 68 | throw new RuntimeException('Invalid model/method definition, expecting "model/class::method".'); |
69 | 69 | } |
70 | 70 | $model = \Mage::getModel($run[1]); |
@@ -63,7 +63,7 @@ |
||
63 | 63 | |
64 | 64 | $store = $this->getHelper('parameter')->askStore($input, $output, 'store', true); |
65 | 65 | if ($store->getId() == \Mage_Core_Model_App::ADMIN_STORE_ID) { |
66 | - $adminFrontName = (string) \Mage::getConfig()->getNode('admin/routers/adminhtml/args/frontName'); |
|
66 | + $adminFrontName = (string)\Mage::getConfig()->getNode('admin/routers/adminhtml/args/frontName'); |
|
67 | 67 | $url = rtrim($store->getBaseUrl(\Mage_Core_Model_Store::URL_TYPE_WEB), '/') . '/' . $adminFrontName; |
68 | 68 | } else { |
69 | 69 | $url = $store->getBaseUrl(\Mage_Core_Model_Store::URL_TYPE_LINK) . '?___store=' . $store->getCode(); |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | str_ireplace( |
54 | 54 | $searchString, |
55 | 55 | '<info>' . $searchString . '</info>', |
56 | - (string) $match->node->comment |
|
56 | + (string)$match->node->comment |
|
57 | 57 | ) |
58 | 58 | ); |
59 | 59 | } |
@@ -119,14 +119,14 @@ discard block |
||
119 | 119 | { |
120 | 120 | $match = new \stdClass; |
121 | 121 | $match->type = $this->_getNodeType($node); |
122 | - if (stristr((string) $node->label, $searchString)) { |
|
122 | + if (stristr((string)$node->label, $searchString)) { |
|
123 | 123 | $match->match_type = 'label'; |
124 | 124 | $match->node = $node; |
125 | 125 | |
126 | 126 | return $match; |
127 | 127 | } |
128 | 128 | |
129 | - if (stristr((string) $node->comment, $searchString)) { |
|
129 | + if (stristr((string)$node->comment, $searchString)) { |
|
130 | 130 | $match->match_type = 'comment'; |
131 | 131 | $match->node = $node; |
132 | 132 | |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | { |
209 | 209 | switch ($match->type) { |
210 | 210 | case 'section': |
211 | - return (string) $match->node->label . ' -> ... -> ...'; |
|
211 | + return (string)$match->node->label . ' -> ... -> ...'; |
|
212 | 212 | |
213 | 213 | case 'field': |
214 | 214 | $parent = current($match->node->xpath('parent::*')); |
@@ -121,7 +121,7 @@ |
||
121 | 121 | $dialog->ask( |
122 | 122 | $output, |
123 | 123 | sprintf('<question>%s%s:</question>', $messagePrefix, $options['prompt']), |
124 | - (string) $options['default'] |
|
124 | + (string)$options['default'] |
|
125 | 125 | ) |
126 | 126 | ); |
127 | 127 | } else { |
@@ -209,7 +209,7 @@ |
||
209 | 209 | array( |
210 | 210 | 'table' => $tableName, |
211 | 211 | 'operation' => 'ENGINE ' . $engine, |
212 | - 'type' => sprintf('%15s rows', (string) $affectedRows), |
|
212 | + 'type' => sprintf('%15s rows', (string)$affectedRows), |
|
213 | 213 | 'status' => sprintf('%.3f secs', microtime(true) - $start), |
214 | 214 | ), |
215 | 215 | ); |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | |
249 | 249 | if ($input->getOption('magentoVersion')) { |
250 | 250 | $type = $input->getOption('magentoVersion'); |
251 | - if ($type !== (string) (int) $type) { |
|
251 | + if ($type !== (string)(int)$type) { |
|
252 | 252 | $type = $this->getPackageNumberByName($type); |
253 | 253 | } |
254 | 254 | } elseif ($input->getOption('magentoVersionByName')) { |
@@ -284,8 +284,8 @@ discard block |
||
284 | 284 | private function getPackageNumberByName($name) |
285 | 285 | { |
286 | 286 | // directly filter integer strings |
287 | - if ($name === (string) (int) $name) { |
|
288 | - return (int) $name; |
|
287 | + if ($name === (string)(int)$name) { |
|
288 | + return (int)$name; |
|
289 | 289 | } |
290 | 290 | |
291 | 291 | $magentoPackages = $this->commandConfig['magento-packages']; |
@@ -65,11 +65,11 @@ |
||
65 | 65 | $errorCounter = 0; |
66 | 66 | $table = array(); |
67 | 67 | foreach ($setups as $setupName => $setup) { |
68 | - $moduleName = (string) $setup->setup->module; |
|
69 | - $moduleVersion = (string) $modules->{$moduleName}->version; |
|
70 | - $dbVersion = (string) $resourceModel->getDbVersion($setupName); |
|
68 | + $moduleName = (string)$setup->setup->module; |
|
69 | + $moduleVersion = (string)$modules->{$moduleName}->version; |
|
70 | + $dbVersion = (string)$resourceModel->getDbVersion($setupName); |
|
71 | 71 | if (!$ignoreDataUpdate) { |
72 | - $dataVersion = (string) $resourceModel->getDataVersion($setupName); |
|
72 | + $dataVersion = (string)$resourceModel->getDataVersion($setupName); |
|
73 | 73 | } |
74 | 74 | $ok = $dbVersion == $moduleVersion; |
75 | 75 | if ($ok && !$ignoreDataUpdate) { |
@@ -260,8 +260,8 @@ discard block |
||
260 | 260 | $config_ver = $this->_getConfiguredVersionFromResourceObject($setupResource); |
261 | 261 | |
262 | 262 | if ( |
263 | - (string) $config_ver == (string) $db_ver && //structure |
|
264 | - (string) $config_ver == (string) $db_data_ver //data |
|
263 | + (string)$config_ver == (string)$db_ver && //structure |
|
264 | + (string)$config_ver == (string)$db_data_ver //data |
|
265 | 265 | ) { |
266 | 266 | continue; |
267 | 267 | } |
@@ -321,8 +321,8 @@ discard block |
||
321 | 321 | |
322 | 322 | $args = array( |
323 | 323 | '', |
324 | - (string) $dbVersion, |
|
325 | - (string) $configVersion, |
|
324 | + (string)$dbVersion, |
|
325 | + (string)$configVersion, |
|
326 | 326 | ); |
327 | 327 | |
328 | 328 | $args[0] = $dbVersion |
@@ -110,13 +110,13 @@ |
||
110 | 110 | } |
111 | 111 | |
112 | 112 | $this->invalidScopeId( |
113 | - $scopeId !== (string) (int) $scopeId, |
|
113 | + $scopeId !== (string)(int)$scopeId, |
|
114 | 114 | "Invalid scope parameter, %s is not an integer value", |
115 | 115 | $scopeId |
116 | 116 | ); |
117 | 117 | |
118 | 118 | $this->invalidScopeId( |
119 | - 0 - (bool) $allowZeroScope >= (int) $scopeId, |
|
119 | + 0 - (bool)$allowZeroScope >= (int)$scopeId, |
|
120 | 120 | "Invalid scope parameter, %s is not a positive integer value", |
121 | 121 | $scopeId |
122 | 122 | ); |