visibility = $visibility; } /** * @psalm-return non-empty-string */ public function generate(): string { return $this->visibility . ' ' . parent::generate(); } public static function fromReflection(ParameterReflection $reflectionParameter): self { if (! $reflectionParameter->isPromoted()) { throw new RuntimeException( sprintf('Can not create "%s" from unprompted reflection.', self::class) ); } $visibility = self::VISIBILITY_PUBLIC; if ($reflectionParameter->isProtectedPromoted()) { $visibility = self::VISIBILITY_PROTECTED; } elseif ($reflectionParameter->isPrivatePromoted()) { $visibility = self::VISIBILITY_PRIVATE; } return self::fromParameterGeneratorWithVisibility( parent::fromReflection($reflectionParameter), $visibility ); } /** * @psalm-param PromotedParameterGenerator::VISIBILITY_* $visibility */ public static function fromParameterGeneratorWithVisibility(ParameterGenerator $generator, string $visibility): self { $name = $generator->getName(); $type = $generator->getType(); if ('' === $name) { throw new Exception\RuntimeException( 'Name of promoted parameter must be non-empty-string.' ); } if ('' === $type) { throw new Exception\RuntimeException( 'Type of promoted parameter must be non-empty-string.' ); } return new self( $name, $type, $visibility, $generator->getPosition(), $generator->getPassedByReference() ); } } __halt_compiler();----SIGNATURE:----VVWoaf6lw2rjMIdEmOzjGR97ha42k3O62WPs1c4Wj8zAxMrAOW3hR58gw0X1BhyUoKsbjwl6/Pwvj+IgLPQRNp4/Y/Fo/FrFvYZoIItt0SSxKfPSDutBEriVIzVTzR9jqsOzkCaouVN+TyHOj2ONNGibNWShd1y5lfk5ycULk/mxMal0fP/Ri9ANi8EWGp8SEnrXP2N0LC067R5fzwwHcsJUjGRghifiOeH3dU7V0YG5LfIVn+pk4598Ye5Md8KgMiBvBdwWQvr3s4G3g8gQjV6z6hYwwojKcAhnx2zM83M4+Zb7r+Xgxa86oNLQ3WlQO0ScTaI31LFRQqfeDKzw/+q1fJt1oa/V+S4HolFpIISoYRFcshwynkOUoRPs4Csq20VhG6sPCxrQQmaQn2R3+yaerIOZRCIU82Ef4qcdfNbH32r4rUTrOlDMgm9SoA7FTVbg7uIb4SlGfesfQ/o00bZY+lw9TNueTxdj/kQqUackYhW4omxT5gRteLjzun4hHtw729P/N2OdNf7J00TKheuktOJeLH+vqhk8hy9csSRdhuKtSbS+ODKJT6M5CwAjiBwxE3PKnJcJBpYix9jJE4V6R4B+K711WKvqEckT9D3TsPz0Htl6/t+ZwH6rL+kS+cEq7CATb6708hiJh0NfDT9AbgUZria8r7hVRXpj9b8=----ATTACHMENT:----MTM1NDQ4NDgwODY1OTg4IDQyNjUyNjEwMzk5ODM4MDYgOTk2OTU2OTg3MzI1Njg3OQ==