Home
last modified time | relevance | path

Searched refs:modifier (Results 1 – 14 of 14) sorted by relevance

/PHP-Parser/lib/PhpParser/
H A DModifiers.php38 public static function toString(int $modifier): string { argument
39 if (!isset(self::TO_STRING_MAP[$modifier])) {
40 throw new \InvalidArgumentException("Unknown modifier $modifier");
42 return self::TO_STRING_MAP[$modifier];
45 private static function isValidModifier(int $modifier): bool { argument
46 $isPow2 = ($modifier & ($modifier - 1)) == 0 && $modifier != 0;
47 return $isPow2 && $modifier <= self::PRIVATE_SET;
H A DBuilderHelpers.php321 * @param int $modifier Modifier to set
325 public static function addModifier(int $modifiers, int $modifier): int { argument
326 Modifiers::verifyModifier($modifiers, $modifier);
327 return $modifiers | $modifier;
H A DParserAbstract.php1140 foreach ([Modifiers::STATIC, Modifiers::ABSTRACT, Modifiers::READONLY] as $modifier) {
1141 if ($node->flags & $modifier) {
1143 "Cannot use '" . Modifiers::toString($modifier) . "' as constant modifier",
/PHP-Parser/test/PhpParser/Node/Stmt/
H A DClassMethodTest.php14 public function testModifiers($modifier): void { argument
16 'type' => constant(Modifiers::class . '::' . strtoupper($modifier))
19 $this->assertTrue($node->{'is' . $modifier}());
50 * @param string $modifier Node type modifier
52 public function testImplicitPublic(string $modifier): void { argument
54 'type' => constant(Modifiers::class . '::' . strtoupper($modifier))
H A DClassConstTest.php11 public function testModifiers($modifier): void { argument
14 constant(Modifiers::class . '::' . strtoupper($modifier))
17 $this->assertTrue($node->{'is' . $modifier}());
H A DPropertyTest.php11 public function testModifiers($modifier): void { argument
13 constant(Modifiers::class . '::' . strtoupper($modifier)),
17 $this->assertTrue($node->{'is' . $modifier}());
/PHP-Parser/lib/PhpParser/Builder/
H A DTraitUseAdaptation.php19 protected ?int $modifier = null; variable in PhpParser\\Builder\\TraitUseAdaptation
114 protected function setModifier(int $modifier): void { argument
123 if (is_null($this->modifier)) {
124 $this->modifier = $modifier;
138 …turn new Stmt\TraitUseAdaptation\Alias($this->trait, $this->method, $this->modifier, $this->alias);
/PHP-Parser/test/PhpParser/Node/
H A DParamTest.php25 public function testModifiers(string $modifier): void { argument
27 $node->flags = constant(Modifiers::class . '::' . strtoupper($modifier));
29 $this->assertTrue($node->{'is' . $modifier}());
/PHP-Parser/test/code/parser/stmt/class/
H A DconstModifierErrors.test8 Cannot use 'static' as constant modifier from 3:5 to 3:10
46 Cannot use 'abstract' as constant modifier from 3:5 to 3:12
84 Cannot use 'readonly' as constant modifier from 3:5 to 3:12
H A Dproperty_hooks.test427 Cannot use the public modifier on a property hook from 4:9 to 4:14
429 Cannot use the public modifier on a property hook from 4:16 to 4:21
430 Cannot use the protected modifier on a property hook from 5:9 to 5:17
431 Cannot use the private modifier on a property hook from 6:9 to 6:15
432 Cannot use the abstract modifier on a property hook from 7:9 to 7:16
433 Cannot use the static modifier on a property hook from 7:18 to 7:23
434 Cannot use the readonly modifier on a property hook from 8:9 to 8:16
H A Dmodifier_error.test1 Invalid modifier combination
210 Cannot use the final modifier on an abstract class member from 1:26 to 1:30
242 Cannot use the final modifier on an abstract class from 1:16 to 1:20
/PHP-Parser/lib/PhpParser/Lexer/TokenEmulator/
H A DAsymmetricVisibilityTokenEmulator.php55 [, $modifier, $set] = $matches;
56 $modifierLen = \strlen($modifier);
58 new Token($reverseMap[$token->id], $modifier, $token->line, $token->pos),
/PHP-Parser/
H A DUPGRADE-4.0.md66 * The `ClassConst::isStatic()` method has been removed. Constants cannot have a static modifier.
H A DCHANGELOG.md814 * The `ClassConst::isStatic()` method has been removed. Constants cannot have a static modifier.
1052 holding the visibility modifier, as well as `isPublic()`, `isProtected()` and `isPrivate()`

Completed in 17 milliseconds