• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

PHPCSStandards / PHPCSUtils / 139
97%
develop: 100%

Build:
Build:
LAST BUILD BRANCH: dependabot/github_actions/action-runners-c4b2a15d30
DEFAULT BRANCH: develop
Ran 22 Jan 2020 05:48PM UTC
Jobs 4
Files 11
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
139

Pull #37

travis-ci-com

web-flow
Util\FunctionDeclarations: add new reserved name related utility methods

Add three new properties related to PHP reserved function names:
* `$magicFunctions`
* `$magicMethods`
* `$methodsDoubleUnderscore`

Also adds eight new utility methods using these properties, for convenience:
* `isMagicFunction()` - to check if the function declared on a `T_FUNCTION` token is a PHP magic function. Returns true/false.
* `isMagicFunctionName()` - to check if a given function name is the name of a PHP magic function. Returns true/false.
* `isMagicMethod()` - to check if the function declared on a `T_FUNCTION` token is a PHP magic method. Returns true/false.
* `isMagicMethodName()` - to check if a given function name is the name of a PHP magic method. Returns true/false.
* `isPHPDoubleUnderscoreMethod()` - to check if the function declared on a `T_FUNCTION` token is a PHP native double underscore method. Returns true/false.
* `isPHPDoubleUnderscoreMethodName()` - to check if a given function name is the name of a PHP native double underscore method. Returns true/false.
* `isSpecialMethod()` - to check if the function declared on a `T_FUNCTION` token is a PHP magic method or a PHP native double underscore method. Returns true/false.
* `isSpecialMethodName()` - to check if a given function name is the name of a PHP magic method or PHP native double underscore method. Returns true/false.

The `Name` methods only check a given name, the non-`Name` method also check if the function is a method or global function.

Includes dedicated unit tests for the new methods.
Pull Request #37: Util\FunctionDeclarations: add new reserved name related utility methods

36 of 36 new or added lines in 1 file covered. (100.0%)

1097 of 1136 relevant lines covered (96.57%)

56.96 hits per line

Jobs
ID Job ID Ran Files Coverage
29 139.29 (LINT=1 PHPCS_VERSION="dev-master" COVERALLS_VERSION="^2.0") 22 Jan 2020 05:48PM UTC 0
93.64
Travis Job 139.29
30 139.30 (PHPCS_VERSION="2.9.2" COVERALLS_VERSION="^2.0") 22 Jan 2020 05:47PM UTC 0
94.07
Travis Job 139.30
31 139.31 (LINT=1 PHPCS_VERSION="dev-master" COVERALLS_VERSION="^1.0") 22 Jan 2020 05:48PM UTC 0
92.51
Travis Job 139.31
32 139.32 (PHPCS_VERSION="2.6.0" COVERALLS_VERSION="^1.0") 22 Jan 2020 05:49PM UTC 0
92.43
Travis Job 139.32
Source Files on build 139
Detailed source file information is not available for this build.
  • Back to Repo
  • Build #139
  • Pull Request #37
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc