Nikita Popov
2d3dd4e23e
Don't align phpdoc tags
...
I did this to start with, but then alignment kept being broken
during refactorings, and at some point I switched to not aligning,
and now we have a big mess.
Add a php-cs-fixer rule to consistently not align phpdoc tags.
2023-09-17 16:00:10 +02:00
Markus Staab
263fa80b81
Use more precise Use_::TYPE_* types ( #945 )
...
For better static analysis support in consuming projects.
2023-09-14 10:03:42 +02:00
Nikita Popov
502b090900
Add property types
...
Types omitted in two places where we violate them currently:
Namespace_::$stmts can be null during parsing, and Enum_::$scalarType
can be a complex type for invalid programs.
2023-08-16 21:37:02 +02:00
Nikita Popov
f98341f688
Specify more types
2022-09-17 18:48:56 +02:00
Nikita Popov
48f470eac7
Add missing return types
2022-09-11 18:17:05 +02:00
Nikita Popov
b9fe3449e8
Add missing parameter types
2022-09-11 15:22:23 +02:00
Nikita Popov
dd63ddbc24
Add php-cs-fixer config and reformat
...
The formatting in this project has become something of a mess,
because it changed over time. Add a CS fixer config and reformat
to the desired style, which is PSR-12, but with sane brace placement.
2022-08-28 22:57:06 +02:00
MathiasReker
653757bec6
Nullable type declaration for default null value
...
Adds ? before type declarations for parameters with a default null value
2022-07-04 20:34:31 +02:00
Nikita Popov
9c5eb3ccba
Add some missing type annotations
2022-06-04 12:48:12 +02:00
Gabriel Caruso
68d07c4662
[CS] New line in the end of file
2018-01-13 16:08:26 +01:00
Gabriel Caruso
7f72c84122
[CS] Open class brackets in new line
2018-01-13 16:03:55 +01:00
Nikita Popov
68e9b91e9c
Use fully-qualified names for global constant references
2017-11-10 23:33:12 +01:00
TomasVotruba
e2e99f269b
Add strict_types to lib code
2017-08-18 23:00:13 +02:00
Nikita Popov
7b36ca3b6c
Add isSpecialClassName() method to Identifier and Name
2017-08-15 22:59:52 +02:00
Nikita Popov
d97cc3d96e
Add toLowerString() method to Name and Identifier
...
Avoids patterns like strtolower((string) $name) when using
strict types.
2017-08-15 22:49:16 +02:00
TomasVotruba
ec535ea14e
[cs] use PHP 5.4 short array, since PHP 7.0 is min version
2017-08-13 21:14:28 +02:00
TomasVotruba
58bf92e4f7
[cs] remove unused imports
2017-08-13 21:14:28 +02:00
Nikita Popov
19dde1363e
Treat special names correctly in getShortName()
...
Also change the API to accept a string rather than a FullyQualified
name instance, as this is not appropriate for symbols like "self".
2017-06-13 19:51:22 +02:00
Nikita Popov
a32e3797d4
Generate PHP 7 type annotations
2017-04-28 21:40:59 +02:00
Nikita Popov
7f6477ed83
Combine class/non-class name resolution into single method
2017-04-28 17:18:13 +02:00
Nikita Popov
56b810e91d
Add getShortName() API
...
PHP's name resolution rules are f'ing complicated.
2017-04-28 17:10:30 +02:00
Nikita Popov
6168abd9a0
Extract name resolution logic into NameContext
...
All the generic name resolution logic is now available as a separate
class with a public API.
2017-04-27 21:06:07 +02:00