History log of /PHP-Parser/lib/PhpParser/Node/Name.php (Results 1 – 25 of 42)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# c5ee33df 19-Apr-2024 Markus Staab

Declare more precise phpdoc types (#993)


# 2d3dd4e2 17-Sep-2023 Nikita Popov

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.

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.

show more ...


# 502b0909 16-Aug-2023 Nikita Popov

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 invali

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.

show more ...


# 23647573 21-May-2023 Nikita Popov

Represent names using string rather than array of parts

In most circumstances we are interested in the whole string, not
the parts split by namespace separator. As names are common, this

Represent names using string rather than array of parts

In most circumstances we are interested in the whole string, not
the parts split by namespace separator. As names are common, this
representation measurably improves memory usage and performance.

show more ...


# df3a7057 21-May-2023 Nikita Popov

Add Name::getParts(), deprecate Name::$parts

In preparation for switching this to a plain string in
PHP-Parser 5, deprecate direct access to the property and
provide an API that will

Add Name::getParts(), deprecate Name::$parts

In preparation for switching this to a plain string in
PHP-Parser 5, deprecate direct access to the property and
provide an API that will work on both versions.

(cherry picked from commit c9e5a13d68486e9fd75f9be1b4639644e54e7f4f)

show more ...


# f98341f6 17-Sep-2022 Nikita Popov

Specify more types


# a099803d 11-Sep-2022 Nikita Popov

Use array<string, mixed> type for $attributes

Slightly more accurate, and stops PHPStan from complaining about
the missing array type information.


# f59f226f 11-Sep-2022 Nikita Popov

Fix some phpstan warnings


# dd63ddbc 28-Aug-2022 Nikita Popov

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 st

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.

show more ...


# 53b907d4 28-Aug-2022 Nikita Popov

Fix length bounds check in Name::slice()

The length check did not take into account that there may be a
non-zero offset at this point.

Fixes #875.


# 4021a63c 04-Jul-2022 MathiasReker

No superfluous elseif

Replaces superfluous elseif with if.


# 653757be 04-Jul-2022 MathiasReker

Nullable type declaration for default null value

Adds ? before type declarations for parameters with a default null value


# 56356e4a 22-Aug-2020 Viktor Szépe

Remove repeated word from PHPDoc in Name


Revision tags: v4.3.0, v4.2.5, v4.2.4, v4.2.3, v4.2.2
# 993f2990 12-May-2019 Nikita Popov

Avoid parent constructor call during node construction

Instead explicitly assign the attributes. This is a minor
performance improvement.


# f3b19c19 09-May-2019 Tomáš Votruba

[PHP 7.4] Add support for arrow functions (#602)

Per RFC https://wiki.php.net/rfc/arrow_functions_v2.


Revision tags: v4.2.1, v4.2.0, v4.1.1, v4.1.0, v4.0.4
# 16c5d107 18-Sep-2018 Nikita Popov

Revert "Add check for leading backslash in Name ctor"

This reverts commit 2f67429ec93857b8a3ae5a15165818e5eda8fb56.

Reverting this to avoid a BC break in a patch release, will
r

Revert "Add check for leading backslash in Name ctor"

This reverts commit 2f67429ec93857b8a3ae5a15165818e5eda8fb56.

Reverting this to avoid a BC break in a patch release, will
reapply for the next major version.

show more ...


# 2f67429e 21-Jul-2018 Nikita Popov

Add check for leading backslash in Name ctor

Fixes #523.


Revision tags: v4.0.3, v4.0.2, v4.0.1, v4.0.0, v3.1.5, v4.0.0beta1, v3.1.4
# 5285df8f 13-Jan-2018 Nikita Popov

[CS] Use elseif instead of else if

Conflicts:
lib/PhpParser/TokenStream.php


# 248b29ec 10-Jan-2018 Gabriel Caruso

Add public visibility to getType method (#463)


Revision tags: v4.0.0alpha3, v3.1.3
# b507fa43 01-Dec-2017 Nikita Popov

Ensure names are not empty


# 1c11626f 12-Nov-2017 Nikita Popov

Add explicit getType() methods

Rather than automatically deriving getType() from the class name.


Revision tags: v4.0.0alpha2, v3.1.2, v4.0.0alpha1, v3.1.1
# e2e99f26 18-Aug-2017 TomasVotruba

Add strict_types to lib code


# 7b36ca3b 15-Aug-2017 Nikita Popov

Add isSpecialClassName() method to Identifier and Name


# d97cc3d9 15-Aug-2017 Nikita Popov

Add toLowerString() method to Name and Identifier

Avoids patterns like strtolower((string) $name) when using
strict types.


# 05e6725b 13-Aug-2017 TomasVotruba

[cs] use strict comparison where allowed


12