Skip to content

Commit db8a42c

Browse files
committed
fixes
1 parent 22027f1 commit db8a42c

8 files changed

Lines changed: 19 additions & 13 deletions

File tree

.php-cs-fixer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
'@PhpCsFixer' => true,
1212
'phpdoc_separation' => false,
1313
'single_line_empty_body' => false,
14+
'phpdoc_align' => false,
1415
))
1516
->setFinder($finder);

src/Container/AbstractObjectContainer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function add(object $object): self
104104
}
105105

106106
/**
107-
* @param mixed $value
107+
* @param mixed $value
108108
* @throws \InvalidArgumentException
109109
*/
110110
public function get($value)

src/File/AbstractModelFile.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ public function getStructAttributeTypeAsPhpType(?StructAttributeModel $fromAttri
198198
* Also see http://www.w3schools.com/schema/schema_dtypes_numeric.asp.
199199
*
200200
* @param mixed $type
201-
* @param null $xsdTypesPath
201+
* @param null $xsdTypesPath
202202
* @param mixed $fallback
203203
*
204204
* @return mixed
@@ -213,7 +213,7 @@ public static function getValidType($type, $xsdTypesPath = null, $fallback = nul
213213
* Also see http://www.w3schools.com/schema/schema_dtypes_numeric.asp.
214214
*
215215
* @param mixed $type
216-
* @param null $xsdTypesPath
216+
* @param null $xsdTypesPath
217217
* @param mixed $fallback
218218
*
219219
* @return mixed

src/File/Composer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ protected function getComposerFileContent(): array
120120
$content = [];
121121
$composerFilePath = $this->getComposerFilePath();
122122
if (!empty($composerFilePath)) {
123-
$content = json_decode(file_get_contents($composerFilePath), true, 512, JSON_THROW_ON_ERROR);
123+
$content = json_decode(file_get_contents($composerFilePath), true);
124124
}
125125

126126
return $content;

src/Generator/Generator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ public function __construct(GeneratorOptions $options)
101101
}
102102

103103
/**
104-
* @param mixed $name
105-
* @param mixed $arguments
104+
* @param mixed $name
105+
* @param mixed $arguments
106106
* @throws \BadMethodCallException
107107
*/
108108
public function __call($name, $arguments)

src/Generator/Utils.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ public static function cleanComment($comment, string $glueSeparator = ',', bool
181181
* - \p{N} for any valid number
182182
* - /u for supporting unicode.
183183
*
184-
* @param string $string the string to clean
185-
* @param bool $keepMultipleUnderscores optional, allows to keep the multiple consecutive underscores
184+
* @param string $string the string to clean
185+
* @param bool $keepMultipleUnderscores optional, allows to keep the multiple consecutive underscores
186186
*/
187187
public static function cleanString(string $string, bool $keepMultipleUnderscores = true): string
188188
{

src/Model/AbstractModel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public function setMeta(array $meta = []): self
113113
}
114114

115115
/**
116-
* @param mixed $metaValue
116+
* @param mixed $metaValue
117117
* @throws \InvalidArgumentException
118118
*/
119119
public function addMeta(string $metaName, $metaValue): self
@@ -433,7 +433,7 @@ protected function mergeMeta(): array
433433
* Static method which returns a unique name case sensitively
434434
* Useful to name methods case sensitively distinct, see http://the-echoplex.net/log/php-case-sensitivity.
435435
*
436-
* @param string $name the original name
436+
* @param string $name the original name
437437
* @param string $context the context where the name is needed unique
438438
*/
439439
protected static function uniqueName(string $name, string $context): string

src/Parser/Wsdl/AbstractTagInputOutputParser.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,21 @@ public function parseInputOutput(AbstractTagOperationElement $tag): void
3535
}
3636

3737
$parts = $tag->getParts();
38-
$multipleParts = count((array) $parts);
39-
if (is_array($parts) && $multipleParts > 1) {
38+
39+
if (null === $parts) {
40+
return;
41+
}
42+
43+
$multipleParts = count($parts);
44+
if (1 < count($parts)) {
4045
$types = [];
4146
foreach ($parts as $part) {
4247
if (!empty($type = $this->getTypeFromPart($part))) {
4348
$types[$part->getAttributeName()] = $type;
4449
}
4550
}
4651
$this->setKnownType($method, $types);
47-
} elseif (is_array($parts) && $multipleParts > 0) {
52+
} else {
4853
$part = array_shift($parts);
4954
if ($part instanceof TagPart && !empty($type = $this->getTypeFromPart($part))) {
5055
$this->setKnownType($method, $type);

0 commit comments

Comments
 (0)