Skip to content

Commit

Permalink
finfo, despite being lowercase, is a class
Browse files Browse the repository at this point in the history
grepping for "all the return typehints in `generated/`", it appears that this and `stdClass` are the only lowercase classes:

```
sl grep '^function' | cut -d: -f3 | sort | uniq
```
  • Loading branch information
shish committed Feb 11, 2025
1 parent 7251e30 commit 1b99e64
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 21 deletions.
8 changes: 4 additions & 4 deletions generated/8.1/fileinfo.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions generated/8.2/fileinfo.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions generated/8.3/fileinfo.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions generated/8.4/fileinfo.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions generated/8.5/fileinfo.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion generator/src/XmlDocParser/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ private static function isClass(string $type): bool
if ($type === '') {
return false;
}
if ($type === 'stdClass') {

// Non-standard lowercase classes
if (in_array($type, ['stdClass', 'finfo'])) {
return true;
}

// Classes start with uppercase letters. Otherwise, it's most likely a scalar.
if ($type[0] === strtoupper($type[0])) {
return true;
Expand Down

0 comments on commit 1b99e64

Please sign in to comment.