Secure.php 429 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace EasySwoole\DoctrineAnnotation\Tests\Fixtures\Annotation;
  3. use function is_string;
  4. /** @Annotation */
  5. class Secure
  6. {
  7. /** @var mixed */
  8. public $roles;
  9. /**
  10. * @param mixed[] $values
  11. */
  12. public function __construct(array $values)
  13. {
  14. if (is_string($values['value'])) {
  15. $values['value'] = [$values['value']];
  16. }
  17. $this->roles = $values['value'];
  18. }
  19. }