Skip to content

Commit

Permalink
Add documentation for global constants
Browse files Browse the repository at this point in the history
Documentation for phpstan/phpstan-src#1163
  • Loading branch information
rvanvelzen authored and ondrejmirtes committed Apr 26, 2022
1 parent 7525b53 commit 8a65968
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions website/src/writing-php-code/phpdoc-types.md
Expand Up @@ -301,6 +301,16 @@ Constant enumerations are also supported:
* `self::SOME_*` (all constants on `self` that start with `SOME_`)
* `Foo::*` (all constants on `Foo`)

Global constants
-------------------------

<div class="text-xs inline-block border border-green-600 text-green-600 bg-green-100 rounded px-1 mb-4">Available in PHPStan 1.6</div>

Constants are supported as long as they don't contain lowercase letters and a class with the same name doesn't exist:

* `SOME_CONSTANT`
* `SOME_CONSTANT|OTHER_CONSTANT`

Callables
-------------------------

Expand Down

0 comments on commit 8a65968

Please sign in to comment.