function TraitUseAdaptation::setModifier
3 calls to TraitUseAdaptation::setModifier()
- TraitUseAdaptation::makePrivate in vendor/
nikic/ php-parser/ lib/ PhpParser/ Builder/ TraitUseAdaptation.php - Sets adapted method private.
- TraitUseAdaptation::makeProtected in vendor/
nikic/ php-parser/ lib/ PhpParser/ Builder/ TraitUseAdaptation.php - Sets adapted method protected.
- TraitUseAdaptation::makePublic in vendor/
nikic/ php-parser/ lib/ PhpParser/ Builder/ TraitUseAdaptation.php - Sets adapted method public.
File
-
vendor/
nikic/ php-parser/ lib/ PhpParser/ Builder/ TraitUseAdaptation.php, line 114
Class
Namespace
PhpParser\BuilderCode
protected function setModifier(int $modifier) : void {
if ($this->type === self::TYPE_UNDEFINED) {
$this->type = self::TYPE_ALIAS;
}
if ($this->type !== self::TYPE_ALIAS) {
throw new \LogicException('Cannot set access modifier for not alias adaptation buider');
}
if (is_null($this->modifier)) {
$this->modifier = $modifier;
}
else {
throw new \LogicException('Multiple access type modifiers are not allowed');
}
}