Nikita Popov
ab51e9d35a
Remove superfluous phpdoc tags
...
These just specify a type that is already specified as a real PHP
type.
2023-09-17 18:24:05 +02:00
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
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
fc6b4890ef
Specify more types
2022-09-17 16:45:25 +02:00
Nikita Popov
032b102146
Remove deprecated Error constructor
...
And use this chance to provide accurate position information for
namespace errors.
2022-09-11 22:05:47 +02:00
Nikita Popov
40c89cf924
Specify some more types
2022-09-11 21:54:39 +02:00
Nikita Popov
a099803d01
Use array<string, mixed> type for $attributes
...
Slightly more accurate, and stops PHPStan from complaining about
the missing array type information.
2022-09-11 20:51:31 +02:00
Nikita Popov
48f470eac7
Add missing return types
2022-09-11 18:17:05 +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
Gabriel Caruso
ee870e3464
Fixes from PHPStan ( #502 )
2018-05-19 11:12:24 +02:00
Gabriel Caruso
14454326e9
Fix misspellings
2018-02-06 14:47:39 +01:00
Gabriel Caruso
a8968caa5b
[CS] Remove extra lines
2018-01-13 16:03:53 +01:00
Gabriel Caruso
3bc31488ce
Combine issets ( #460 )
2018-01-04 13:36:01 +01:00
TomasVotruba
e2e99f269b
Add strict_types to lib code
2017-08-18 23:00:13 +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
Nikita Popov
a32e3797d4
Generate PHP 7 type annotations
2017-04-28 21:40:59 +02:00
Nikita Popov
fba61390d8
Use null-coalesce operator
2017-04-24 22:32:40 +02:00
Nikita Popov
bfea338d36
Update doc comments after previous comment
...
Make some of the type annotations more accurate, and complete the
generated doc-comments to be complete (with description and
parameter annotations.)
2017-01-26 00:16:54 +01:00
Matthew Brown
e3b87f40aa
Add non-void return types
2017-01-25 23:32:50 +01:00
Nikita Popov
caa5c0cc76
Graceful handling for "special" errors
...
Nearly all special errors are now handled gracefully, i.e. the
parser will be able to continue after encountering them. In some
cases the associated error range has been improved using the new
end attribute stack.
To achieve this the error handling code has been moved out of the
node constructors and into special methods in the parser.
2016-10-09 12:38:18 +02:00
Nikita Popov
9e5d3bbe25
Remove Error::(get|set)RawLine()
...
These have been superseded by Error::(get|set)StartLine().
2016-09-30 18:30:01 +02:00
Nikita Popov
f3c7dc9d89
Add Error::getMessageWithColumnInfo()
2016-09-30 18:24:43 +02:00
Nikita Popov
a35c2a2067
Add column info to EOF errors
...
EOF errors are now located one past the end of the file.
2015-04-27 15:37:41 +02:00
Nikita Popov
c8454271e1
Make column info 1-based
2015-04-18 21:20:45 +02:00
Nikita Popov
4defbc2174
Make Error column info attribute based
2015-04-18 12:51:26 +02:00
Gerrit Addiks
33a39fae06
added column-numbers to syntax errors
2015-04-18 10:14:49 +02:00
nikic
f82862ec9c
Port library to use namespaces, with BC for old names
2014-02-06 20:29:35 +01:00