@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | */ |
| 46 | 46 | public static function instance($filename = null) |
| 47 | 47 | { |
| 48 | - return parent::instance(empty($filename) ? dirname(__FILE__) . '/../resources/config/xsd_types.yml' : $filename); |
|
| 48 | + return parent::instance(empty($filename) ? dirname(__FILE__).'/../resources/config/xsd_types.yml' : $filename); |
|
| 49 | 49 | } |
| 50 | 50 | /** |
| 51 | 51 | * @param string $xsdType |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | */ |
| 62 | 62 | public static function isAnonymous($xsdType) |
| 63 | 63 | { |
| 64 | - return (bool) preg_match(self::ANONYMOUS_TYPE, $xsdType); |
|
| 64 | + return (bool)preg_match(self::ANONYMOUS_TYPE, $xsdType); |
|
| 65 | 65 | } |
| 66 | 66 | /** |
| 67 | 67 | * @param string $xsdType |
@@ -119,7 +119,7 @@ |
||
| 119 | 119 | */ |
| 120 | 120 | public static function getDefaultConfigurationPath() |
| 121 | 121 | { |
| 122 | - return dirname(__FILE__) . '/../resources/config/generator_options.yml'; |
|
| 122 | + return dirname(__FILE__).'/../resources/config/generator_options.yml'; |
|
| 123 | 123 | } |
| 124 | 124 | /** |
| 125 | 125 | * Get category option value |
@@ -398,15 +398,15 @@ discard block |
||
| 398 | 398 | { |
| 399 | 399 | if (PhpReservedKeyword::instance()->is($keyword)) { |
| 400 | 400 | if ($context !== null) { |
| 401 | - $keywordKey = $keyword . '_' . $context; |
|
| 401 | + $keywordKey = $keyword.'_'.$context; |
|
| 402 | 402 | if (!array_key_exists($keywordKey, self::$replacedPhpReservedKeywords)) { |
| 403 | 403 | self::$replacedPhpReservedKeywords[$keywordKey] = 0; |
| 404 | 404 | } else { |
| 405 | 405 | self::$replacedPhpReservedKeywords[$keywordKey]++; |
| 406 | 406 | } |
| 407 | - return '_' . $keyword . (self::$replacedPhpReservedKeywords[$keywordKey] ? '_' . self::$replacedPhpReservedKeywords[$keywordKey] : ''); |
|
| 407 | + return '_'.$keyword.(self::$replacedPhpReservedKeywords[$keywordKey] ? '_'.self::$replacedPhpReservedKeywords[$keywordKey] : ''); |
|
| 408 | 408 | } else { |
| 409 | - return '_' . $keyword; |
|
| 409 | + return '_'.$keyword; |
|
| 410 | 410 | } |
| 411 | 411 | } else { |
| 412 | 412 | return $keyword; |
@@ -433,15 +433,15 @@ discard block |
||
| 433 | 433 | { |
| 434 | 434 | if ($this->getReservedMethodsInstance()->is($methodName)) { |
| 435 | 435 | if ($context !== null) { |
| 436 | - $methodKey = $methodName . '_' . $context; |
|
| 436 | + $methodKey = $methodName.'_'.$context; |
|
| 437 | 437 | if (!array_key_exists($methodKey, $this->replacedReservedMethods)) { |
| 438 | 438 | $this->replacedReservedMethods[$methodKey] = 0; |
| 439 | 439 | } else { |
| 440 | 440 | $this->replacedReservedMethods[$methodKey]++; |
| 441 | 441 | } |
| 442 | - return '_' . $methodName . ($this->replacedReservedMethods[$methodKey] ? '_' . $this->replacedReservedMethods[$methodKey] : ''); |
|
| 442 | + return '_'.$methodName.($this->replacedReservedMethods[$methodKey] ? '_'.$this->replacedReservedMethods[$methodKey] : ''); |
|
| 443 | 443 | } else { |
| 444 | - return '_' . $methodName; |
|
| 444 | + return '_'.$methodName; |
|
| 445 | 445 | } |
| 446 | 446 | } else { |
| 447 | 447 | return $methodName; |
@@ -456,8 +456,8 @@ discard block |
||
| 456 | 456 | */ |
| 457 | 457 | protected static function uniqueName($name, $context) |
| 458 | 458 | { |
| 459 | - $insensitiveKey = strtolower($name . '_' . $context); |
|
| 460 | - $sensitiveKey = $name . '_' . $context; |
|
| 459 | + $insensitiveKey = strtolower($name.'_'.$context); |
|
| 460 | + $sensitiveKey = $name.'_'.$context; |
|
| 461 | 461 | if (array_key_exists($sensitiveKey, self::$uniqueNames)) { |
| 462 | 462 | return self::$uniqueNames[$sensitiveKey]; |
| 463 | 463 | } elseif (!array_key_exists($insensitiveKey, self::$uniqueNames)) { |
@@ -465,7 +465,7 @@ discard block |
||
| 465 | 465 | } else { |
| 466 | 466 | self::$uniqueNames[$insensitiveKey]++; |
| 467 | 467 | } |
| 468 | - $uniqueName = $name . (self::$uniqueNames[$insensitiveKey] ? '_' . self::$uniqueNames[$insensitiveKey] : ''); |
|
| 468 | + $uniqueName = $name.(self::$uniqueNames[$insensitiveKey] ? '_'.self::$uniqueNames[$insensitiveKey] : ''); |
|
| 469 | 469 | self::$uniqueNames[$sensitiveKey] = $uniqueName; |
| 470 | 470 | return $uniqueName; |
| 471 | 471 | } |
@@ -189,8 +189,8 @@ discard block |
||
| 189 | 189 | } |
| 190 | 190 | /** |
| 191 | 191 | * Returns the value of the first meta value assigned to the name |
| 192 | - * @param array $names the meta names to check |
|
| 193 | - * @param mixed $fallback the fallback value if anyone is set |
|
| 192 | + * @param string[] $names the meta names to check |
|
| 193 | + * @param boolean $fallback the fallback value if anyone is set |
|
| 194 | 194 | * @return mixed the meta information value |
| 195 | 195 | */ |
| 196 | 196 | public function getMetaValueFirstSet(array $names, $fallback = null) |
@@ -425,8 +425,8 @@ discard block |
||
| 425 | 425 | * Returns a usable method for a original method |
| 426 | 426 | * @uses PhpReservedKeywords::instance() |
| 427 | 427 | * @uses PhpReservedKeywords::is() |
| 428 | - * @param string $keyword the keyword |
|
| 429 | 428 | * @param string $context the context |
| 429 | + * @param string $methodName |
|
| 430 | 430 | * @return string |
| 431 | 431 | */ |
| 432 | 432 | public function replaceReservedMethod($methodName, $context = null) |
@@ -82,7 +82,7 @@ |
||
| 82 | 82 | if (is_string($this->getParameterType())) { |
| 83 | 83 | $methodName .= ucfirst($this->getParameterType()); |
| 84 | 84 | } else { |
| 85 | - $methodName .= '_' . md5(var_export($this->getParameterType(), true)); |
|
| 85 | + $methodName .= '_'.md5(var_export($this->getParameterType(), true)); |
|
| 86 | 86 | } |
| 87 | 87 | } |
| 88 | 88 | $context = $this->getOwner()->getPackagedName(); |
@@ -61,11 +61,11 @@ discard block |
||
| 61 | 61 | public function getCleanName($keepMultipleUnderscores = false) |
| 62 | 62 | { |
| 63 | 63 | if ($this->getGenerator()->getOptionGenericConstantsNames()) { |
| 64 | - return 'ENUM_VALUE_' . $this->getIndex(); |
|
| 64 | + return 'ENUM_VALUE_'.$this->getIndex(); |
|
| 65 | 65 | } else { |
| 66 | 66 | $nameWithSeparatedWords = $this->getNameWithSeparatedWords($keepMultipleUnderscores); |
| 67 | 67 | $key = self::constantSuffix($this->getOwner()->getName(), $nameWithSeparatedWords, $this->getIndex()); |
| 68 | - return 'VALUE_' . strtoupper($nameWithSeparatedWords . ($key ? '_' . $key : '')); |
|
| 68 | + return 'VALUE_'.strtoupper($nameWithSeparatedWords.($key ? '_'.$key : '')); |
|
| 69 | 69 | } |
| 70 | 70 | } |
| 71 | 71 | /** |
@@ -118,8 +118,8 @@ discard block |
||
| 118 | 118 | */ |
| 119 | 119 | private static function constantSuffix($structName, $value, $index) |
| 120 | 120 | { |
| 121 | - $key = strtoupper($structName . '_' . $value); |
|
| 122 | - $indexedKey = $key . '_' . $index; |
|
| 121 | + $key = strtoupper($structName.'_'.$value); |
|
| 122 | + $indexedKey = $key.'_'.$index; |
|
| 123 | 123 | if (array_key_exists($indexedKey, self::$uniqueConstants)) { |
| 124 | 124 | return self::$uniqueConstants[$indexedKey]; |
| 125 | 125 | } elseif (!array_key_exists($key, self::$uniqueConstants)) { |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | class Operation extends AbstractOperation |
| 9 | 9 | { |
| 10 | 10 | /** |
| 11 | - * @return Operation |
|
| 11 | + * @return PhpMethod |
|
| 12 | 12 | */ |
| 13 | 13 | public function getMainMethod() |
| 14 | 14 | { |