Completed
Push — 1.x ( 257780...f31d1d )
by Mikaël
42:33 queued 33:38
created
src/DomHandler/Wsdl/Tag/TagHeader.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
     const OPTIONAL_HEADER = 'optional';
13 13
     const ATTRIBUTE_REQUIRED = 'wsdl:required';
14 14
     /**
15
-     * @return TagInput|null
15
+     * @return \WsdlToPhp\PackageGenerator\DomHandler\AbstractNodeHandler|null
16 16
      */
17 17
     public function getParentInput()
18 18
     {
Please login to merge, or discard this patch.
src/Model/AbstractModel.php 2 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -189,8 +189,8 @@  discard block
 block discarded – undo
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)
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
     /**
319 319
      * Allows to define from which class the curent model extends
320 320
      * @param bool $short
321
-     * @return string|null
321
+     * @return string
322 322
      */
323 323
     public function getExtends($short = false)
324 324
     {
@@ -425,8 +425,8 @@  discard block
 block discarded – undo
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)
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -398,15 +398,15 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Command/GeneratePackageCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
             $this->writeLn("  Generation not launched, use \"--force\" option to force generation");
111 111
             $this->writeLn(sprintf("  Generator's option file used: %s", $this->resolveGeneratorOptionsConfigPath()));
112 112
             $this->writeLn("  Used generator's options:");
113
-            $this->writeLn("    " . implode(PHP_EOL . '    ', $this->formatArrayForConsole($this->generatorOptions->toArray())));
113
+            $this->writeLn("    ".implode(PHP_EOL.'    ', $this->formatArrayForConsole($this->generatorOptions->toArray())));
114 114
         }
115 115
 
116 116
         $end = new \DateTime();
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
      */
191 191
     private function formatArrayForConsole($array)
192 192
     {
193
-        array_walk($array, function (&$value, $index) {
193
+        array_walk($array, function(&$value, $index) {
194 194
             $value = sprintf("%s: %s", $index, !is_array($value) ? $value : implode(', ', $value));
195 195
         });
196 196
         return $array;
Please login to merge, or discard this patch.
src/Generator/Utils.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -151,11 +151,11 @@  discard block
 block discarded – undo
151 151
 
152 152
             $fileParts = pathinfo($origin);
153 153
             $fileBasename = (is_array($fileParts) && array_key_exists('basename', $fileParts)) ? $fileParts['basename'] : '';
154
-            $parts = parse_url(str_replace('/' . $fileBasename, '', $origin));
154
+            $parts = parse_url(str_replace('/'.$fileBasename, '', $origin));
155 155
             $scheme = (is_array($parts) && array_key_exists('scheme', $parts)) ? $parts['scheme'] : '';
156 156
             $host = (is_array($parts) && array_key_exists('host', $parts)) ? $parts['host'] : '';
157 157
             $path = (is_array($parts) && array_key_exists('path', $parts)) ? $parts['path'] : '';
158
-            $path = str_replace('/' . $fileBasename, '', $path);
158
+            $path = str_replace('/'.$fileBasename, '', $path);
159 159
             $pathParts = explode('/', $path);
160 160
             $finalPath = implode('/', $pathParts);
161 161
 
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
                 if ($locationPart == '..') {
164 164
                     $finalPath = substr($finalPath, 0, strrpos($finalPath, '/', 0));
165 165
                 } else {
166
-                    $finalPath .= '/' . $locationPart;
166
+                    $finalPath .= '/'.$locationPart;
167 167
                 }
168 168
             }
169 169
 
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
              * Remote file
173 173
              */
174 174
             if (!empty($scheme) && !empty($host)) {
175
-                $resolvedPath = str_replace('urn', 'http', $scheme) . '://' . $host . (!empty($port) ? ':' . $port : '') . str_replace('//', '/', $finalPath);
175
+                $resolvedPath = str_replace('urn', 'http', $scheme).'://'.$host.(!empty($port) ? ':'.$port : '').str_replace('//', '/', $finalPath);
176 176
             } elseif (empty($scheme) && empty($host) && count($pathParts)) {
177 177
                 /**
178 178
                  * Local file
Please login to merge, or discard this patch.
src/Generator/Generator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -601,7 +601,7 @@  discard block
 block discarded – undo
601 601
     {
602 602
         $destination = $this->options->getDestination();
603 603
         if (!empty($destination)) {
604
-            $destination = realpath($this->options->getDestination()) . DIRECTORY_SEPARATOR;
604
+            $destination = realpath($this->options->getDestination()).DIRECTORY_SEPARATOR;
605 605
         }
606 606
         return $destination;
607 607
     }
@@ -613,7 +613,7 @@  discard block
 block discarded – undo
613 613
     public function setOptionDestination($optionDestination)
614 614
     {
615 615
         if (!empty($optionDestination)) {
616
-            $this->options->setDestination(realpath($optionDestination) . DIRECTORY_SEPARATOR);
616
+            $this->options->setDestination(realpath($optionDestination).DIRECTORY_SEPARATOR);
617 617
         } else {
618 618
             throw new \InvalidArgumentException('Package\'s destination can\'t be empty', __LINE__);
619 619
         }
Please login to merge, or discard this patch.
src/Parser/Wsdl/AbstractParser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
      */
132 132
     private function setSchemaAsParsed(Wsdl $wsdl, Schema $schema)
133 133
     {
134
-        $key = $wsdl->getName() . $schema->getName();
134
+        $key = $wsdl->getName().$schema->getName();
135 135
         if (!array_key_exists($key, $this->parsedSchemas)) {
136 136
             $this->parsedSchemas[$key] = array();
137 137
         }
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
      */
146 146
     public function isSchemaParsed(Wsdl $wsdl, Schema $schema)
147 147
     {
148
-        $key = $wsdl->getName() . $schema->getName();
148
+        $key = $wsdl->getName().$schema->getName();
149 149
         return
150 150
             array_key_exists($key, $this->parsedSchemas) &&
151 151
             is_array($this->parsedSchemas[$key]) &&
Please login to merge, or discard this patch.
src/DomHandler/Wsdl/Tag/AbstractTag.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
         if ($this->getParent() instanceof AbstractNodeHandler) {
29 29
             $parentTags = $strict ? $additionalTags : $this->getSuitableParentTags($additionalTags);
30 30
             $parentNode = $this->getParent()->getNode();
31
-            while ($maxDeep-- > 0 && ($parentNode instanceof \DOMElement) && !empty($parentNode->nodeName) && (!preg_match('/' . implode('|', $parentTags) . '/i', $parentNode->nodeName) || ($checkName && preg_match('/' . implode('|', $parentTags) . '/i', $parentNode->nodeName) && (!$parentNode->hasAttribute('name') || $parentNode->getAttribute('name') === '')))) {
31
+            while ($maxDeep-- > 0 && ($parentNode instanceof \DOMElement) && !empty($parentNode->nodeName) && (!preg_match('/'.implode('|', $parentTags).'/i', $parentNode->nodeName) || ($checkName && preg_match('/'.implode('|', $parentTags).'/i', $parentNode->nodeName) && (!$parentNode->hasAttribute('name') || $parentNode->getAttribute('name') === '')))) {
32 32
                 $parentNode = $parentNode->parentNode;
33 33
             }
34 34
             if ($parentNode instanceof \DOMElement) {
Please login to merge, or discard this patch.
src/ConfigurationReader/StructArrayReservedMethod.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,6 +26,6 @@
 block discarded – undo
26 26
      */
27 27
     public static function getDefaultArrayConfigurationPath()
28 28
     {
29
-        return dirname(__FILE__) . '/../resources/config/struct_array_reserved_keywords.yml';
29
+        return dirname(__FILE__).'/../resources/config/struct_array_reserved_keywords.yml';
30 30
     }
31 31
 }
Please login to merge, or discard this patch.
src/ConfigurationReader/StructReservedMethod.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,6 +18,6 @@
 block discarded – undo
18 18
      */
19 19
     public static function getDefaultConfigurationPath()
20 20
     {
21
-        return dirname(__FILE__) . '/../resources/config/struct_reserved_keywords.yml';
21
+        return dirname(__FILE__).'/../resources/config/struct_reserved_keywords.yml';
22 22
     }
23 23
 }
Please login to merge, or discard this patch.