Skip to content

Commit 1f7196d

Browse files
committed
fixed 8959ed
1 parent 80f158a commit 1f7196d

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/PhpGenerator/Helpers.php

-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,6 @@ public static function createObject(string $class, array $props): object
170170

171171
public static function validateType(?string $type, bool &$nullable): ?string
172172
{
173-
$nullable = false;
174173
if ($type === '' || $type === null) {
175174
return null;
176175
}

tests/PhpGenerator/ClassType.phpt

+2-2
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ $method->addParameter('res', null)
131131
->setType(Type::union(Type::Array, 'null'));
132132

133133
$method->addParameter('bar', null)
134-
->setType('stdClass|string')
135-
->setNullable(true);
134+
->setNullable(true)
135+
->setType('stdClass|string');
136136

137137
$class->addTrait('foo');
138138
$class->removeTrait('foo');

0 commit comments

Comments
 (0)