Parameter.php 533 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace Knuckles\Camel\Output;
  3. class Parameter extends \Knuckles\Camel\Extraction\Parameter
  4. {
  5. public string $name;
  6. public ?string $description = null;
  7. public bool $required = false;
  8. public $example = null;
  9. public string $type = 'string';
  10. public array $__fields = [];
  11. public array $custom = [];
  12. public function toArray(): array
  13. {
  14. if (empty($this->exceptKeys)) {
  15. return $this->except('__fields')->toArray();
  16. }
  17. return parent::toArray();
  18. }
  19. }