@@ -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 | ); |
@@ -97,8 +97,8 @@ discard block |
||
97 | 97 | 'password' => null, |
98 | 98 | ); |
99 | 99 | |
100 | - $config = ((array) $resources->default_setup->connection) + $config; |
|
101 | - $config['prefix'] = (string) $resources->db->table_prefix; |
|
100 | + $config = ((array)$resources->default_setup->connection) + $config; |
|
101 | + $config['prefix'] = (string)$resources->db->table_prefix; |
|
102 | 102 | |
103 | 103 | // known parameters: host, port, unix_socket, dbname, username, password, options, charset, persistent, |
104 | 104 | // driver_options |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | |
109 | 109 | /* @see Varien_Db_Adapter_Pdo_Mysql::_connect */ |
110 | 110 | if (strpos($config['host'], '/') !== false) { |
111 | - $config['unix_socket'] = (string) $config['host']; |
|
111 | + $config['unix_socket'] = (string)$config['host']; |
|
112 | 112 | $config['host'] = null; |
113 | 113 | $config['port'] = null; |
114 | 114 | } elseif (strpos($config['host'], ':') !== false) { |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | if (null === $type) { |
171 | 171 | $type = "@@"; |
172 | 172 | } else { |
173 | - $type = (string) $type; |
|
173 | + $type = (string)$type; |
|
174 | 174 | } |
175 | 175 | |
176 | 176 | if (!in_array($type, array("@@", "@"), true)) { |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | */ |
303 | 303 | public function getTables($withoutPrefix = null) |
304 | 304 | { |
305 | - $withoutPrefix = (bool) $withoutPrefix; |
|
305 | + $withoutPrefix = (bool)$withoutPrefix; |
|
306 | 306 | |
307 | 307 | $db = $this->getConnection(); |
308 | 308 | $prefix = $this->dbSettings['prefix']; |