Skip to content

Commit 2a32d77

Browse files
Girgiasnicolas-grekas
authored andcommitted
Fix various bool-type coercions
1 parent acd9ded commit 2a32d77

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Resource/ReflectionClassResource.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ private function generateSignature(\ReflectionClass $class): iterable
123123
yield print_r($attributes, true);
124124
$attributes = [];
125125

126-
yield $class->getDocComment();
126+
yield $class->getDocComment() ?: '';
127127
yield (int) $class->isFinal();
128128
yield (int) $class->isAbstract();
129129

@@ -145,7 +145,7 @@ private function generateSignature(\ReflectionClass $class): iterable
145145
yield print_r($attributes, true);
146146
$attributes = [];
147147

148-
yield $p->getDocComment();
148+
yield $p->getDocComment() ?: '';
149149
yield $p->isDefault() ? '<default>' : '';
150150
yield $p->isPublic() ? 'public' : 'protected';
151151
yield $p->isStatic() ? 'static' : '';

Tests/Builder/GeneratedConfigTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,8 @@ private function assertDirectorySame($expected, $current)
198198
}
199199
$currentFiles[substr($file->getPathname(), \strlen($current))] = $file->getPathname();
200200
}
201+
ksort($expectedFiles);
202+
ksort($currentFiles);
201203

202204
$this->assertSame(array_keys($expectedFiles), array_keys($currentFiles));
203205
foreach ($expectedFiles as $fileName => $filePath) {

0 commit comments

Comments
 (0)