@@ -48,10 +48,10 @@ discard block |
||
48 | 48 | */ |
49 | 49 | private $description; |
50 | 50 | |
51 | - /** |
|
52 | - * Whether property is read only |
|
53 | - * @var bool |
|
54 | - */ |
|
51 | + /** |
|
52 | + * Whether property is read only |
|
53 | + * @var bool |
|
54 | + */ |
|
55 | 55 | private $readOnly; |
56 | 56 | |
57 | 57 | /** |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | * @param \SwaggerGen\Swagger\AbstractObject $parent |
66 | 66 | * @param string $definition Either a built-in type or a definition name |
67 | 67 | * @param string $description description of the property |
68 | - * @param bool $readOnly Whether the property is read only |
|
68 | + * @param bool $readOnly Whether the property is read only |
|
69 | 69 | * @throws \SwaggerGen\Exception |
70 | 70 | */ |
71 | 71 | public function __construct(\SwaggerGen\Swagger\AbstractObject $parent, $definition, $description = null, $readOnly = null) |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | { |
110 | 110 | return self::arrayFilterNull(array_merge($this->Type->toArray(), array( |
111 | 111 | 'description' => empty($this->description) ? null : $this->description, |
112 | - 'readOnly' => $this->readOnly |
|
112 | + 'readOnly' => $this->readOnly |
|
113 | 113 | ), parent::toArray())); |
114 | 114 | } |
115 | 115 |
@@ -58,8 +58,8 @@ discard block |
||
58 | 58 | if (preg_match(self::REGEX_PROP_START . self::REGEX_PROP_NAME . self::REGEX_PROP_REQUIRED . self::REGEX_PROP_ASSIGN . self::REGEX_PROP_DEFINITION . self::REGEX_PROP_END, $property, $prop_match) !== 1) { |
59 | 59 | throw new \SwaggerGen\Exception("Unparseable property definition: '{$property}'"); |
60 | 60 | } |
61 | - $this->properties[$prop_match[1]] = new Property($this, $prop_match[3]); |
|
62 | - if ($prop_match[2] !== '!' && $prop_match[2] !== '?') { |
|
61 | + $this->properties[$prop_match[1]] = new Property($this, $prop_match[3]); |
|
62 | + if ($prop_match[2] !== '!' && $prop_match[2] !== '?') { |
|
63 | 63 | $this->required[$prop_match[1]] = true; |
64 | 64 | } |
65 | 65 | } |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | // type name description... |
99 | 99 | case 'property': |
100 | 100 | case 'property?': |
101 | - case 'property!': |
|
101 | + case 'property!': |
|
102 | 102 | $definition = self::wordShift($data); |
103 | 103 | if (empty($definition)) { |
104 | 104 | throw new \SwaggerGen\Exception("Missing property definition"); |
@@ -111,17 +111,17 @@ discard block |
||
111 | 111 | |
112 | 112 | |
113 | 113 | |
114 | - unset($this->required[$name]); |
|
114 | + unset($this->required[$name]); |
|
115 | 115 | $readOnly = null; |
116 | - $propertySuffix = substr($command, -1); |
|
117 | - if ($propertySuffix === '!') { |
|
118 | - $readOnly = true; |
|
119 | - } |
|
116 | + $propertySuffix = substr($command, -1); |
|
117 | + if ($propertySuffix === '!') { |
|
118 | + $readOnly = true; |
|
119 | + } |
|
120 | 120 | else if ($propertySuffix !== '?') { |
121 | 121 | $this->required[$name] = true; |
122 | 122 | } |
123 | 123 | |
124 | - $this->properties[$name] = new Property($this, $definition, $data, $readOnly); |
|
124 | + $this->properties[$name] = new Property($this, $definition, $data, $readOnly); |
|
125 | 125 | |
126 | 126 | return $this; |
127 | 127 |