@@ -14,131 +14,131 @@ |
||
14 | 14 | |
15 | 15 | class Operation extends AbstractModel implements Arrayable |
16 | 16 | { |
17 | - use ConsumesPart; |
|
18 | - use ProducesPart; |
|
19 | - use TagsPart; |
|
20 | - use ParametersPart; |
|
21 | - use ResponsesPart; |
|
22 | - use ExternalDocsPart; |
|
23 | - use ExtensionPart; |
|
24 | - |
|
25 | - /** @var string */ |
|
26 | - private $summary; |
|
27 | - |
|
28 | - /** @var string */ |
|
29 | - private $description; |
|
30 | - |
|
31 | - /** @var string */ |
|
32 | - private $operationId; |
|
33 | - |
|
34 | - /** @var bool */ |
|
35 | - private $deprecated = false; |
|
36 | - |
|
37 | - public function __construct($contents = []) |
|
38 | - { |
|
39 | - $this->parse($contents); |
|
40 | - } |
|
41 | - |
|
42 | - private function parse($contents = []) |
|
43 | - { |
|
44 | - $data = CollectionUtils::toMap($contents); |
|
45 | - |
|
46 | - $this->summary = $data->get('summary'); |
|
47 | - $this->description = $data->get('description'); |
|
48 | - $this->operationId = $data->get('operationId'); |
|
49 | - $this->deprecated = $data->has('deprecated') && $data->get('deprecated'); |
|
50 | - |
|
51 | - // parts |
|
52 | - $this->parseConsumes($data); |
|
53 | - $this->parseProduces($data); |
|
54 | - $this->parseTags($data); |
|
55 | - $this->parseParameters($data); |
|
56 | - $this->parseResponses($data); |
|
57 | - $this->parseExternalDocs($data); |
|
58 | - $this->parseExtensions($data); |
|
59 | - } |
|
60 | - |
|
61 | - public function toArray() |
|
62 | - { |
|
63 | - return $this->export('summary', 'description', 'operationId', 'deprecated', |
|
64 | - 'consumes', 'produces', 'parameters', 'responses', 'tags', 'externalDocs'); |
|
65 | - } |
|
66 | - |
|
67 | - /** |
|
68 | - * @return the string |
|
69 | - */ |
|
70 | - public function getSummary() |
|
71 | - { |
|
72 | - return $this->summary; |
|
73 | - } |
|
74 | - |
|
75 | - /** |
|
76 | - * @param string $summary |
|
77 | - * |
|
78 | - * @return $this |
|
79 | - */ |
|
80 | - public function setSummary($summary) |
|
81 | - { |
|
82 | - $this->summary = $summary; |
|
83 | - |
|
84 | - return $this; |
|
85 | - } |
|
86 | - |
|
87 | - /** |
|
88 | - * @return string |
|
89 | - */ |
|
90 | - public function getDescription() |
|
91 | - { |
|
92 | - return $this->description; |
|
93 | - } |
|
94 | - |
|
95 | - /** |
|
96 | - * @param string $description |
|
97 | - */ |
|
98 | - public function setDescription($description) |
|
99 | - { |
|
100 | - $this->description = $description; |
|
101 | - |
|
102 | - return $this; |
|
103 | - } |
|
104 | - |
|
105 | - /** |
|
106 | - * @return string |
|
107 | - */ |
|
108 | - public function getOperationId() |
|
109 | - { |
|
110 | - return $this->operationId; |
|
111 | - } |
|
112 | - |
|
113 | - /** |
|
114 | - * @param string $operationId |
|
115 | - * |
|
116 | - * @return $this |
|
117 | - */ |
|
118 | - public function setOperationId($operationId) |
|
119 | - { |
|
120 | - $this->operationId = $operationId; |
|
121 | - |
|
122 | - return $this; |
|
123 | - } |
|
124 | - |
|
125 | - /** |
|
126 | - * @return bool |
|
127 | - */ |
|
128 | - public function getDeprecated() |
|
129 | - { |
|
130 | - return $this->deprecated; |
|
131 | - } |
|
132 | - |
|
133 | - /** |
|
134 | - * @param bool $deprecated |
|
135 | - * |
|
136 | - * @return $this |
|
137 | - */ |
|
138 | - public function setDeprecated($deprecated) |
|
139 | - { |
|
140 | - $this->deprecated = $deprecated; |
|
141 | - |
|
142 | - return $this; |
|
143 | - } |
|
17 | + use ConsumesPart; |
|
18 | + use ProducesPart; |
|
19 | + use TagsPart; |
|
20 | + use ParametersPart; |
|
21 | + use ResponsesPart; |
|
22 | + use ExternalDocsPart; |
|
23 | + use ExtensionPart; |
|
24 | + |
|
25 | + /** @var string */ |
|
26 | + private $summary; |
|
27 | + |
|
28 | + /** @var string */ |
|
29 | + private $description; |
|
30 | + |
|
31 | + /** @var string */ |
|
32 | + private $operationId; |
|
33 | + |
|
34 | + /** @var bool */ |
|
35 | + private $deprecated = false; |
|
36 | + |
|
37 | + public function __construct($contents = []) |
|
38 | + { |
|
39 | + $this->parse($contents); |
|
40 | + } |
|
41 | + |
|
42 | + private function parse($contents = []) |
|
43 | + { |
|
44 | + $data = CollectionUtils::toMap($contents); |
|
45 | + |
|
46 | + $this->summary = $data->get('summary'); |
|
47 | + $this->description = $data->get('description'); |
|
48 | + $this->operationId = $data->get('operationId'); |
|
49 | + $this->deprecated = $data->has('deprecated') && $data->get('deprecated'); |
|
50 | + |
|
51 | + // parts |
|
52 | + $this->parseConsumes($data); |
|
53 | + $this->parseProduces($data); |
|
54 | + $this->parseTags($data); |
|
55 | + $this->parseParameters($data); |
|
56 | + $this->parseResponses($data); |
|
57 | + $this->parseExternalDocs($data); |
|
58 | + $this->parseExtensions($data); |
|
59 | + } |
|
60 | + |
|
61 | + public function toArray() |
|
62 | + { |
|
63 | + return $this->export('summary', 'description', 'operationId', 'deprecated', |
|
64 | + 'consumes', 'produces', 'parameters', 'responses', 'tags', 'externalDocs'); |
|
65 | + } |
|
66 | + |
|
67 | + /** |
|
68 | + * @return the string |
|
69 | + */ |
|
70 | + public function getSummary() |
|
71 | + { |
|
72 | + return $this->summary; |
|
73 | + } |
|
74 | + |
|
75 | + /** |
|
76 | + * @param string $summary |
|
77 | + * |
|
78 | + * @return $this |
|
79 | + */ |
|
80 | + public function setSummary($summary) |
|
81 | + { |
|
82 | + $this->summary = $summary; |
|
83 | + |
|
84 | + return $this; |
|
85 | + } |
|
86 | + |
|
87 | + /** |
|
88 | + * @return string |
|
89 | + */ |
|
90 | + public function getDescription() |
|
91 | + { |
|
92 | + return $this->description; |
|
93 | + } |
|
94 | + |
|
95 | + /** |
|
96 | + * @param string $description |
|
97 | + */ |
|
98 | + public function setDescription($description) |
|
99 | + { |
|
100 | + $this->description = $description; |
|
101 | + |
|
102 | + return $this; |
|
103 | + } |
|
104 | + |
|
105 | + /** |
|
106 | + * @return string |
|
107 | + */ |
|
108 | + public function getOperationId() |
|
109 | + { |
|
110 | + return $this->operationId; |
|
111 | + } |
|
112 | + |
|
113 | + /** |
|
114 | + * @param string $operationId |
|
115 | + * |
|
116 | + * @return $this |
|
117 | + */ |
|
118 | + public function setOperationId($operationId) |
|
119 | + { |
|
120 | + $this->operationId = $operationId; |
|
121 | + |
|
122 | + return $this; |
|
123 | + } |
|
124 | + |
|
125 | + /** |
|
126 | + * @return bool |
|
127 | + */ |
|
128 | + public function getDeprecated() |
|
129 | + { |
|
130 | + return $this->deprecated; |
|
131 | + } |
|
132 | + |
|
133 | + /** |
|
134 | + * @param bool $deprecated |
|
135 | + * |
|
136 | + * @return $this |
|
137 | + */ |
|
138 | + public function setDeprecated($deprecated) |
|
139 | + { |
|
140 | + $this->deprecated = $deprecated; |
|
141 | + |
|
142 | + return $this; |
|
143 | + } |
|
144 | 144 | } |
@@ -12,8 +12,7 @@ discard block |
||
12 | 12 | use phootwork\collection\CollectionUtils; |
13 | 13 | use phootwork\lang\Arrayable; |
14 | 14 | |
15 | -class Operation extends AbstractModel implements Arrayable |
|
16 | -{ |
|
15 | +class Operation extends AbstractModel implements Arrayable { |
|
17 | 16 | use ConsumesPart; |
18 | 17 | use ProducesPart; |
19 | 18 | use TagsPart; |
@@ -34,13 +33,11 @@ discard block |
||
34 | 33 | /** @var bool */ |
35 | 34 | private $deprecated = false; |
36 | 35 | |
37 | - public function __construct($contents = []) |
|
38 | - { |
|
36 | + public function __construct($contents = []) { |
|
39 | 37 | $this->parse($contents); |
40 | 38 | } |
41 | 39 | |
42 | - private function parse($contents = []) |
|
43 | - { |
|
40 | + private function parse($contents = []) { |
|
44 | 41 | $data = CollectionUtils::toMap($contents); |
45 | 42 | |
46 | 43 | $this->summary = $data->get('summary'); |
@@ -58,8 +55,7 @@ discard block |
||
58 | 55 | $this->parseExtensions($data); |
59 | 56 | } |
60 | 57 | |
61 | - public function toArray() |
|
62 | - { |
|
58 | + public function toArray() { |
|
63 | 59 | return $this->export('summary', 'description', 'operationId', 'deprecated', |
64 | 60 | 'consumes', 'produces', 'parameters', 'responses', 'tags', 'externalDocs'); |
65 | 61 | } |
@@ -67,8 +63,7 @@ discard block |
||
67 | 63 | /** |
68 | 64 | * @return the string |
69 | 65 | */ |
70 | - public function getSummary() |
|
71 | - { |
|
66 | + public function getSummary() { |
|
72 | 67 | return $this->summary; |
73 | 68 | } |
74 | 69 | |
@@ -77,8 +72,7 @@ discard block |
||
77 | 72 | * |
78 | 73 | * @return $this |
79 | 74 | */ |
80 | - public function setSummary($summary) |
|
81 | - { |
|
75 | + public function setSummary($summary) { |
|
82 | 76 | $this->summary = $summary; |
83 | 77 | |
84 | 78 | return $this; |
@@ -87,16 +81,14 @@ discard block |
||
87 | 81 | /** |
88 | 82 | * @return string |
89 | 83 | */ |
90 | - public function getDescription() |
|
91 | - { |
|
84 | + public function getDescription() { |
|
92 | 85 | return $this->description; |
93 | 86 | } |
94 | 87 | |
95 | 88 | /** |
96 | 89 | * @param string $description |
97 | 90 | */ |
98 | - public function setDescription($description) |
|
99 | - { |
|
91 | + public function setDescription($description) { |
|
100 | 92 | $this->description = $description; |
101 | 93 | |
102 | 94 | return $this; |
@@ -105,8 +97,7 @@ discard block |
||
105 | 97 | /** |
106 | 98 | * @return string |
107 | 99 | */ |
108 | - public function getOperationId() |
|
109 | - { |
|
100 | + public function getOperationId() { |
|
110 | 101 | return $this->operationId; |
111 | 102 | } |
112 | 103 | |
@@ -115,8 +106,7 @@ discard block |
||
115 | 106 | * |
116 | 107 | * @return $this |
117 | 108 | */ |
118 | - public function setOperationId($operationId) |
|
119 | - { |
|
109 | + public function setOperationId($operationId) { |
|
120 | 110 | $this->operationId = $operationId; |
121 | 111 | |
122 | 112 | return $this; |
@@ -125,8 +115,7 @@ discard block |
||
125 | 115 | /** |
126 | 116 | * @return bool |
127 | 117 | */ |
128 | - public function getDeprecated() |
|
129 | - { |
|
118 | + public function getDeprecated() { |
|
130 | 119 | return $this->deprecated; |
131 | 120 | } |
132 | 121 | |
@@ -135,8 +124,7 @@ discard block |
||
135 | 124 | * |
136 | 125 | * @return $this |
137 | 126 | */ |
138 | - public function setDeprecated($deprecated) |
|
139 | - { |
|
127 | + public function setDeprecated($deprecated) { |
|
140 | 128 | $this->deprecated = $deprecated; |
141 | 129 | |
142 | 130 | return $this; |
@@ -4,16 +4,16 @@ |
||
4 | 4 | |
5 | 5 | class SecurityScheme |
6 | 6 | { |
7 | - /** @var string */ |
|
8 | - private $name; |
|
7 | + /** @var string */ |
|
8 | + private $name; |
|
9 | 9 | |
10 | - public function __construct($name, $contents = []) |
|
11 | - { |
|
12 | - $this->name = $name; |
|
13 | - $this->parse($contents); |
|
14 | - } |
|
10 | + public function __construct($name, $contents = []) |
|
11 | + { |
|
12 | + $this->name = $name; |
|
13 | + $this->parse($contents); |
|
14 | + } |
|
15 | 15 | |
16 | - private function parse($contents = []) |
|
17 | - { |
|
18 | - } |
|
16 | + private function parse($contents = []) |
|
17 | + { |
|
18 | + } |
|
19 | 19 | } |
@@ -2,18 +2,15 @@ |
||
2 | 2 | |
3 | 3 | namespace gossi\swagger; |
4 | 4 | |
5 | -class SecurityScheme |
|
6 | -{ |
|
5 | +class SecurityScheme { |
|
7 | 6 | /** @var string */ |
8 | 7 | private $name; |
9 | 8 | |
10 | - public function __construct($name, $contents = []) |
|
11 | - { |
|
9 | + public function __construct($name, $contents = []) { |
|
12 | 10 | $this->name = $name; |
13 | 11 | $this->parse($contents); |
14 | 12 | } |
15 | 13 | |
16 | - private function parse($contents = []) |
|
17 | - { |
|
14 | + private function parse($contents = []) { |
|
18 | 15 | } |
19 | 16 | } |
@@ -8,96 +8,96 @@ |
||
8 | 8 | |
9 | 9 | class Contact extends AbstractModel implements Arrayable |
10 | 10 | { |
11 | - use ExtensionPart; |
|
12 | - |
|
13 | - /** @var string */ |
|
14 | - private $name; |
|
15 | - |
|
16 | - /** @var string */ |
|
17 | - private $url; |
|
18 | - |
|
19 | - /** @var string */ |
|
20 | - private $email; |
|
21 | - |
|
22 | - public function __construct($contents = []) |
|
23 | - { |
|
24 | - $this->parse($contents); |
|
25 | - } |
|
26 | - |
|
27 | - private function parse($contents = []) |
|
28 | - { |
|
29 | - $data = CollectionUtils::toMap($contents); |
|
30 | - |
|
31 | - $this->name = $data->get('name'); |
|
32 | - $this->url = $data->get('url'); |
|
33 | - $this->email = $data->get('email'); |
|
34 | - |
|
35 | - // extensions |
|
36 | - $this->parseExtensions($data); |
|
37 | - } |
|
38 | - |
|
39 | - public function toArray() |
|
40 | - { |
|
41 | - return $this->export('name', 'url', 'email'); |
|
42 | - } |
|
43 | - |
|
44 | - /** |
|
45 | - * @return string |
|
46 | - */ |
|
47 | - public function getName() |
|
48 | - { |
|
49 | - return $this->name; |
|
50 | - } |
|
51 | - |
|
52 | - /** |
|
53 | - * @param string $name |
|
54 | - * |
|
55 | - * @return $this |
|
56 | - */ |
|
57 | - public function setName($name) |
|
58 | - { |
|
59 | - $this->name = $name; |
|
60 | - |
|
61 | - return $this; |
|
62 | - } |
|
63 | - |
|
64 | - /** |
|
65 | - * @return string |
|
66 | - */ |
|
67 | - public function getUrl() |
|
68 | - { |
|
69 | - return $this->url; |
|
70 | - } |
|
71 | - |
|
72 | - /** |
|
73 | - * @param string $url |
|
74 | - * |
|
75 | - * @return $this |
|
76 | - */ |
|
77 | - public function setUrl($url) |
|
78 | - { |
|
79 | - $this->url = $url; |
|
80 | - |
|
81 | - return $this; |
|
82 | - } |
|
83 | - |
|
84 | - /** |
|
85 | - * @return string |
|
86 | - */ |
|
87 | - public function getEmail() |
|
88 | - { |
|
89 | - return $this->email; |
|
90 | - } |
|
91 | - |
|
92 | - /** |
|
93 | - * @param string $email |
|
94 | - * |
|
95 | - * @return $this |
|
96 | - */ |
|
97 | - public function setEmail($email) |
|
98 | - { |
|
99 | - $this->email = $email; |
|
100 | - |
|
101 | - return $this; |
|
102 | - } |
|
11 | + use ExtensionPart; |
|
12 | + |
|
13 | + /** @var string */ |
|
14 | + private $name; |
|
15 | + |
|
16 | + /** @var string */ |
|
17 | + private $url; |
|
18 | + |
|
19 | + /** @var string */ |
|
20 | + private $email; |
|
21 | + |
|
22 | + public function __construct($contents = []) |
|
23 | + { |
|
24 | + $this->parse($contents); |
|
25 | + } |
|
26 | + |
|
27 | + private function parse($contents = []) |
|
28 | + { |
|
29 | + $data = CollectionUtils::toMap($contents); |
|
30 | + |
|
31 | + $this->name = $data->get('name'); |
|
32 | + $this->url = $data->get('url'); |
|
33 | + $this->email = $data->get('email'); |
|
34 | + |
|
35 | + // extensions |
|
36 | + $this->parseExtensions($data); |
|
37 | + } |
|
38 | + |
|
39 | + public function toArray() |
|
40 | + { |
|
41 | + return $this->export('name', 'url', 'email'); |
|
42 | + } |
|
43 | + |
|
44 | + /** |
|
45 | + * @return string |
|
46 | + */ |
|
47 | + public function getName() |
|
48 | + { |
|
49 | + return $this->name; |
|
50 | + } |
|
51 | + |
|
52 | + /** |
|
53 | + * @param string $name |
|
54 | + * |
|
55 | + * @return $this |
|
56 | + */ |
|
57 | + public function setName($name) |
|
58 | + { |
|
59 | + $this->name = $name; |
|
60 | + |
|
61 | + return $this; |
|
62 | + } |
|
63 | + |
|
64 | + /** |
|
65 | + * @return string |
|
66 | + */ |
|
67 | + public function getUrl() |
|
68 | + { |
|
69 | + return $this->url; |
|
70 | + } |
|
71 | + |
|
72 | + /** |
|
73 | + * @param string $url |
|
74 | + * |
|
75 | + * @return $this |
|
76 | + */ |
|
77 | + public function setUrl($url) |
|
78 | + { |
|
79 | + $this->url = $url; |
|
80 | + |
|
81 | + return $this; |
|
82 | + } |
|
83 | + |
|
84 | + /** |
|
85 | + * @return string |
|
86 | + */ |
|
87 | + public function getEmail() |
|
88 | + { |
|
89 | + return $this->email; |
|
90 | + } |
|
91 | + |
|
92 | + /** |
|
93 | + * @param string $email |
|
94 | + * |
|
95 | + * @return $this |
|
96 | + */ |
|
97 | + public function setEmail($email) |
|
98 | + { |
|
99 | + $this->email = $email; |
|
100 | + |
|
101 | + return $this; |
|
102 | + } |
|
103 | 103 | } |
@@ -6,8 +6,7 @@ discard block |
||
6 | 6 | use phootwork\collection\CollectionUtils; |
7 | 7 | use phootwork\lang\Arrayable; |
8 | 8 | |
9 | -class Contact extends AbstractModel implements Arrayable |
|
10 | -{ |
|
9 | +class Contact extends AbstractModel implements Arrayable { |
|
11 | 10 | use ExtensionPart; |
12 | 11 | |
13 | 12 | /** @var string */ |
@@ -19,13 +18,11 @@ discard block |
||
19 | 18 | /** @var string */ |
20 | 19 | private $email; |
21 | 20 | |
22 | - public function __construct($contents = []) |
|
23 | - { |
|
21 | + public function __construct($contents = []) { |
|
24 | 22 | $this->parse($contents); |
25 | 23 | } |
26 | 24 | |
27 | - private function parse($contents = []) |
|
28 | - { |
|
25 | + private function parse($contents = []) { |
|
29 | 26 | $data = CollectionUtils::toMap($contents); |
30 | 27 | |
31 | 28 | $this->name = $data->get('name'); |
@@ -36,16 +33,14 @@ discard block |
||
36 | 33 | $this->parseExtensions($data); |
37 | 34 | } |
38 | 35 | |
39 | - public function toArray() |
|
40 | - { |
|
36 | + public function toArray() { |
|
41 | 37 | return $this->export('name', 'url', 'email'); |
42 | 38 | } |
43 | 39 | |
44 | 40 | /** |
45 | 41 | * @return string |
46 | 42 | */ |
47 | - public function getName() |
|
48 | - { |
|
43 | + public function getName() { |
|
49 | 44 | return $this->name; |
50 | 45 | } |
51 | 46 | |
@@ -54,8 +49,7 @@ discard block |
||
54 | 49 | * |
55 | 50 | * @return $this |
56 | 51 | */ |
57 | - public function setName($name) |
|
58 | - { |
|
52 | + public function setName($name) { |
|
59 | 53 | $this->name = $name; |
60 | 54 | |
61 | 55 | return $this; |
@@ -64,8 +58,7 @@ discard block |
||
64 | 58 | /** |
65 | 59 | * @return string |
66 | 60 | */ |
67 | - public function getUrl() |
|
68 | - { |
|
61 | + public function getUrl() { |
|
69 | 62 | return $this->url; |
70 | 63 | } |
71 | 64 | |
@@ -74,8 +67,7 @@ discard block |
||
74 | 67 | * |
75 | 68 | * @return $this |
76 | 69 | */ |
77 | - public function setUrl($url) |
|
78 | - { |
|
70 | + public function setUrl($url) { |
|
79 | 71 | $this->url = $url; |
80 | 72 | |
81 | 73 | return $this; |
@@ -84,8 +76,7 @@ discard block |
||
84 | 76 | /** |
85 | 77 | * @return string |
86 | 78 | */ |
87 | - public function getEmail() |
|
88 | - { |
|
79 | + public function getEmail() { |
|
89 | 80 | return $this->email; |
90 | 81 | } |
91 | 82 | |
@@ -94,8 +85,7 @@ discard block |
||
94 | 85 | * |
95 | 86 | * @return $this |
96 | 87 | */ |
97 | - public function setEmail($email) |
|
98 | - { |
|
88 | + public function setEmail($email) { |
|
99 | 89 | $this->email = $email; |
100 | 90 | |
101 | 91 | return $this; |
@@ -13,70 +13,70 @@ |
||
13 | 13 | |
14 | 14 | class Response extends AbstractModel implements Arrayable |
15 | 15 | { |
16 | - use RefPart; |
|
17 | - use DescriptionPart; |
|
18 | - use SchemaPart; |
|
19 | - use ExtensionPart; |
|
16 | + use RefPart; |
|
17 | + use DescriptionPart; |
|
18 | + use SchemaPart; |
|
19 | + use ExtensionPart; |
|
20 | 20 | |
21 | - /** @var string */ |
|
22 | - private $code; |
|
21 | + /** @var string */ |
|
22 | + private $code; |
|
23 | 23 | |
24 | - /** @var Map */ |
|
25 | - private $examples; |
|
24 | + /** @var Map */ |
|
25 | + private $examples; |
|
26 | 26 | |
27 | - /** @var Headers */ |
|
28 | - private $headers; |
|
27 | + /** @var Headers */ |
|
28 | + private $headers; |
|
29 | 29 | |
30 | - public function __construct($code, $contents = []) |
|
31 | - { |
|
32 | - $this->code = $code; |
|
33 | - $this->parse($contents); |
|
34 | - } |
|
30 | + public function __construct($code, $contents = []) |
|
31 | + { |
|
32 | + $this->code = $code; |
|
33 | + $this->parse($contents); |
|
34 | + } |
|
35 | 35 | |
36 | - private function parse($contents) |
|
37 | - { |
|
38 | - $data = CollectionUtils::toMap($contents); |
|
36 | + private function parse($contents) |
|
37 | + { |
|
38 | + $data = CollectionUtils::toMap($contents); |
|
39 | 39 | |
40 | - $this->examples = $data->get('examples', new Map()); |
|
41 | - $this->headers = new Headers($data->get('headers')); |
|
40 | + $this->examples = $data->get('examples', new Map()); |
|
41 | + $this->headers = new Headers($data->get('headers')); |
|
42 | 42 | |
43 | - // parts |
|
44 | - $this->parseRef($data); |
|
45 | - $this->parseDescription($data); |
|
46 | - $this->parseSchema($data); |
|
47 | - $this->parseExtensions($data); |
|
48 | - } |
|
43 | + // parts |
|
44 | + $this->parseRef($data); |
|
45 | + $this->parseDescription($data); |
|
46 | + $this->parseSchema($data); |
|
47 | + $this->parseExtensions($data); |
|
48 | + } |
|
49 | 49 | |
50 | - public function toArray() |
|
51 | - { |
|
52 | - return $this->export('description', 'schema', 'headers', 'examples'); |
|
53 | - } |
|
50 | + public function toArray() |
|
51 | + { |
|
52 | + return $this->export('description', 'schema', 'headers', 'examples'); |
|
53 | + } |
|
54 | 54 | |
55 | - /** |
|
56 | - * Returns the responses code. |
|
57 | - * |
|
58 | - * @return string |
|
59 | - */ |
|
60 | - public function getCode() |
|
61 | - { |
|
62 | - return $this->code; |
|
63 | - } |
|
55 | + /** |
|
56 | + * Returns the responses code. |
|
57 | + * |
|
58 | + * @return string |
|
59 | + */ |
|
60 | + public function getCode() |
|
61 | + { |
|
62 | + return $this->code; |
|
63 | + } |
|
64 | 64 | |
65 | - /** |
|
66 | - * @return Map |
|
67 | - */ |
|
68 | - public function getExamples() |
|
69 | - { |
|
70 | - return $this->examples; |
|
71 | - } |
|
65 | + /** |
|
66 | + * @return Map |
|
67 | + */ |
|
68 | + public function getExamples() |
|
69 | + { |
|
70 | + return $this->examples; |
|
71 | + } |
|
72 | 72 | |
73 | - /** |
|
74 | - * Returns headers for this response. |
|
75 | - * |
|
76 | - * @return Headers |
|
77 | - */ |
|
78 | - public function getHeaders() |
|
79 | - { |
|
80 | - return $this->headers; |
|
81 | - } |
|
73 | + /** |
|
74 | + * Returns headers for this response. |
|
75 | + * |
|
76 | + * @return Headers |
|
77 | + */ |
|
78 | + public function getHeaders() |
|
79 | + { |
|
80 | + return $this->headers; |
|
81 | + } |
|
82 | 82 | } |
@@ -11,8 +11,7 @@ discard block |
||
11 | 11 | use phootwork\lang\Arrayable; |
12 | 12 | use gossi\swagger\collections\Headers; |
13 | 13 | |
14 | -class Response extends AbstractModel implements Arrayable |
|
15 | -{ |
|
14 | +class Response extends AbstractModel implements Arrayable { |
|
16 | 15 | use RefPart; |
17 | 16 | use DescriptionPart; |
18 | 17 | use SchemaPart; |
@@ -27,14 +26,12 @@ discard block |
||
27 | 26 | /** @var Headers */ |
28 | 27 | private $headers; |
29 | 28 | |
30 | - public function __construct($code, $contents = []) |
|
31 | - { |
|
29 | + public function __construct($code, $contents = []) { |
|
32 | 30 | $this->code = $code; |
33 | 31 | $this->parse($contents); |
34 | 32 | } |
35 | 33 | |
36 | - private function parse($contents) |
|
37 | - { |
|
34 | + private function parse($contents) { |
|
38 | 35 | $data = CollectionUtils::toMap($contents); |
39 | 36 | |
40 | 37 | $this->examples = $data->get('examples', new Map()); |
@@ -47,8 +44,7 @@ discard block |
||
47 | 44 | $this->parseExtensions($data); |
48 | 45 | } |
49 | 46 | |
50 | - public function toArray() |
|
51 | - { |
|
47 | + public function toArray() { |
|
52 | 48 | return $this->export('description', 'schema', 'headers', 'examples'); |
53 | 49 | } |
54 | 50 | |
@@ -57,16 +53,14 @@ discard block |
||
57 | 53 | * |
58 | 54 | * @return string |
59 | 55 | */ |
60 | - public function getCode() |
|
61 | - { |
|
56 | + public function getCode() { |
|
62 | 57 | return $this->code; |
63 | 58 | } |
64 | 59 | |
65 | 60 | /** |
66 | 61 | * @return Map |
67 | 62 | */ |
68 | - public function getExamples() |
|
69 | - { |
|
63 | + public function getExamples() { |
|
70 | 64 | return $this->examples; |
71 | 65 | } |
72 | 66 | |
@@ -75,8 +69,7 @@ discard block |
||
75 | 69 | * |
76 | 70 | * @return Headers |
77 | 71 | */ |
78 | - public function getHeaders() |
|
79 | - { |
|
72 | + public function getHeaders() { |
|
80 | 73 | return $this->headers; |
81 | 74 | } |
82 | 75 | } |
@@ -10,122 +10,122 @@ |
||
10 | 10 | |
11 | 11 | class Info extends AbstractModel implements Arrayable |
12 | 12 | { |
13 | - use DescriptionPart; |
|
14 | - use ExtensionPart; |
|
15 | - |
|
16 | - /** @var string */ |
|
17 | - private $title; |
|
18 | - |
|
19 | - /** @var string */ |
|
20 | - private $termsOfService; |
|
21 | - |
|
22 | - /** @var Contact */ |
|
23 | - private $contact; |
|
24 | - |
|
25 | - /** @var License */ |
|
26 | - private $license; |
|
27 | - |
|
28 | - /** @var string */ |
|
29 | - private $version; |
|
30 | - |
|
31 | - public function __construct($contents = []) |
|
32 | - { |
|
33 | - $this->parse($contents); |
|
34 | - } |
|
35 | - |
|
36 | - private function parse($contents = []) |
|
37 | - { |
|
38 | - $data = CollectionUtils::toMap($contents); |
|
39 | - |
|
40 | - $this->title = $data->get('title'); |
|
41 | - $this->termsOfService = $data->get('termsOfService'); |
|
42 | - $this->contact = new Contact($data->get('contact', new Map())); |
|
43 | - $this->license = new License($data->get('license', new Map())); |
|
44 | - $this->version = $data->get('version'); |
|
45 | - |
|
46 | - // extensions |
|
47 | - $this->parseDescription($data); |
|
48 | - $this->parseExtensions($data); |
|
49 | - } |
|
50 | - |
|
51 | - public function toArray() |
|
52 | - { |
|
53 | - return $this->export('version', 'title', 'description', 'termsOfService', 'contact', 'license'); |
|
54 | - } |
|
55 | - |
|
56 | - /** |
|
57 | - * @return string |
|
58 | - */ |
|
59 | - public function getTitle() |
|
60 | - { |
|
61 | - return $this->title; |
|
62 | - } |
|
63 | - |
|
64 | - /** |
|
65 | - * @param string $title |
|
66 | - * |
|
67 | - * @return $this |
|
68 | - */ |
|
69 | - public function setTitle($title) |
|
70 | - { |
|
71 | - $this->title = $title; |
|
72 | - |
|
73 | - return $this; |
|
74 | - } |
|
75 | - |
|
76 | - /** |
|
77 | - * @return string |
|
78 | - */ |
|
79 | - public function getTerms() |
|
80 | - { |
|
81 | - return $this->termsOfService; |
|
82 | - } |
|
83 | - |
|
84 | - /** |
|
85 | - * @param string $terms |
|
86 | - * |
|
87 | - * @return $this |
|
88 | - */ |
|
89 | - public function setTerms($terms) |
|
90 | - { |
|
91 | - $this->termsOfService = $terms; |
|
92 | - |
|
93 | - return $this; |
|
94 | - } |
|
95 | - |
|
96 | - /** |
|
97 | - * @return Contact |
|
98 | - */ |
|
99 | - public function getContact() |
|
100 | - { |
|
101 | - return $this->contact; |
|
102 | - } |
|
103 | - |
|
104 | - /** |
|
105 | - * @return License |
|
106 | - */ |
|
107 | - public function getLicense() |
|
108 | - { |
|
109 | - return $this->license; |
|
110 | - } |
|
111 | - |
|
112 | - /** |
|
113 | - * @return string |
|
114 | - */ |
|
115 | - public function getVersion() |
|
116 | - { |
|
117 | - return $this->version; |
|
118 | - } |
|
119 | - |
|
120 | - /** |
|
121 | - * @param string $version |
|
122 | - * |
|
123 | - * @return $this |
|
124 | - */ |
|
125 | - public function setVersion($version) |
|
126 | - { |
|
127 | - $this->version = $version; |
|
128 | - |
|
129 | - return $this; |
|
130 | - } |
|
13 | + use DescriptionPart; |
|
14 | + use ExtensionPart; |
|
15 | + |
|
16 | + /** @var string */ |
|
17 | + private $title; |
|
18 | + |
|
19 | + /** @var string */ |
|
20 | + private $termsOfService; |
|
21 | + |
|
22 | + /** @var Contact */ |
|
23 | + private $contact; |
|
24 | + |
|
25 | + /** @var License */ |
|
26 | + private $license; |
|
27 | + |
|
28 | + /** @var string */ |
|
29 | + private $version; |
|
30 | + |
|
31 | + public function __construct($contents = []) |
|
32 | + { |
|
33 | + $this->parse($contents); |
|
34 | + } |
|
35 | + |
|
36 | + private function parse($contents = []) |
|
37 | + { |
|
38 | + $data = CollectionUtils::toMap($contents); |
|
39 | + |
|
40 | + $this->title = $data->get('title'); |
|
41 | + $this->termsOfService = $data->get('termsOfService'); |
|
42 | + $this->contact = new Contact($data->get('contact', new Map())); |
|
43 | + $this->license = new License($data->get('license', new Map())); |
|
44 | + $this->version = $data->get('version'); |
|
45 | + |
|
46 | + // extensions |
|
47 | + $this->parseDescription($data); |
|
48 | + $this->parseExtensions($data); |
|
49 | + } |
|
50 | + |
|
51 | + public function toArray() |
|
52 | + { |
|
53 | + return $this->export('version', 'title', 'description', 'termsOfService', 'contact', 'license'); |
|
54 | + } |
|
55 | + |
|
56 | + /** |
|
57 | + * @return string |
|
58 | + */ |
|
59 | + public function getTitle() |
|
60 | + { |
|
61 | + return $this->title; |
|
62 | + } |
|
63 | + |
|
64 | + /** |
|
65 | + * @param string $title |
|
66 | + * |
|
67 | + * @return $this |
|
68 | + */ |
|
69 | + public function setTitle($title) |
|
70 | + { |
|
71 | + $this->title = $title; |
|
72 | + |
|
73 | + return $this; |
|
74 | + } |
|
75 | + |
|
76 | + /** |
|
77 | + * @return string |
|
78 | + */ |
|
79 | + public function getTerms() |
|
80 | + { |
|
81 | + return $this->termsOfService; |
|
82 | + } |
|
83 | + |
|
84 | + /** |
|
85 | + * @param string $terms |
|
86 | + * |
|
87 | + * @return $this |
|
88 | + */ |
|
89 | + public function setTerms($terms) |
|
90 | + { |
|
91 | + $this->termsOfService = $terms; |
|
92 | + |
|
93 | + return $this; |
|
94 | + } |
|
95 | + |
|
96 | + /** |
|
97 | + * @return Contact |
|
98 | + */ |
|
99 | + public function getContact() |
|
100 | + { |
|
101 | + return $this->contact; |
|
102 | + } |
|
103 | + |
|
104 | + /** |
|
105 | + * @return License |
|
106 | + */ |
|
107 | + public function getLicense() |
|
108 | + { |
|
109 | + return $this->license; |
|
110 | + } |
|
111 | + |
|
112 | + /** |
|
113 | + * @return string |
|
114 | + */ |
|
115 | + public function getVersion() |
|
116 | + { |
|
117 | + return $this->version; |
|
118 | + } |
|
119 | + |
|
120 | + /** |
|
121 | + * @param string $version |
|
122 | + * |
|
123 | + * @return $this |
|
124 | + */ |
|
125 | + public function setVersion($version) |
|
126 | + { |
|
127 | + $this->version = $version; |
|
128 | + |
|
129 | + return $this; |
|
130 | + } |
|
131 | 131 | } |
@@ -8,8 +8,7 @@ discard block |
||
8 | 8 | use phootwork\lang\Arrayable; |
9 | 9 | use gossi\swagger\parts\DescriptionPart; |
10 | 10 | |
11 | -class Info extends AbstractModel implements Arrayable |
|
12 | -{ |
|
11 | +class Info extends AbstractModel implements Arrayable { |
|
13 | 12 | use DescriptionPart; |
14 | 13 | use ExtensionPart; |
15 | 14 | |
@@ -28,13 +27,11 @@ discard block |
||
28 | 27 | /** @var string */ |
29 | 28 | private $version; |
30 | 29 | |
31 | - public function __construct($contents = []) |
|
32 | - { |
|
30 | + public function __construct($contents = []) { |
|
33 | 31 | $this->parse($contents); |
34 | 32 | } |
35 | 33 | |
36 | - private function parse($contents = []) |
|
37 | - { |
|
34 | + private function parse($contents = []) { |
|
38 | 35 | $data = CollectionUtils::toMap($contents); |
39 | 36 | |
40 | 37 | $this->title = $data->get('title'); |
@@ -48,16 +45,14 @@ discard block |
||
48 | 45 | $this->parseExtensions($data); |
49 | 46 | } |
50 | 47 | |
51 | - public function toArray() |
|
52 | - { |
|
48 | + public function toArray() { |
|
53 | 49 | return $this->export('version', 'title', 'description', 'termsOfService', 'contact', 'license'); |
54 | 50 | } |
55 | 51 | |
56 | 52 | /** |
57 | 53 | * @return string |
58 | 54 | */ |
59 | - public function getTitle() |
|
60 | - { |
|
55 | + public function getTitle() { |
|
61 | 56 | return $this->title; |
62 | 57 | } |
63 | 58 | |
@@ -66,8 +61,7 @@ discard block |
||
66 | 61 | * |
67 | 62 | * @return $this |
68 | 63 | */ |
69 | - public function setTitle($title) |
|
70 | - { |
|
64 | + public function setTitle($title) { |
|
71 | 65 | $this->title = $title; |
72 | 66 | |
73 | 67 | return $this; |
@@ -76,8 +70,7 @@ discard block |
||
76 | 70 | /** |
77 | 71 | * @return string |
78 | 72 | */ |
79 | - public function getTerms() |
|
80 | - { |
|
73 | + public function getTerms() { |
|
81 | 74 | return $this->termsOfService; |
82 | 75 | } |
83 | 76 | |
@@ -86,8 +79,7 @@ discard block |
||
86 | 79 | * |
87 | 80 | * @return $this |
88 | 81 | */ |
89 | - public function setTerms($terms) |
|
90 | - { |
|
82 | + public function setTerms($terms) { |
|
91 | 83 | $this->termsOfService = $terms; |
92 | 84 | |
93 | 85 | return $this; |
@@ -96,24 +88,21 @@ discard block |
||
96 | 88 | /** |
97 | 89 | * @return Contact |
98 | 90 | */ |
99 | - public function getContact() |
|
100 | - { |
|
91 | + public function getContact() { |
|
101 | 92 | return $this->contact; |
102 | 93 | } |
103 | 94 | |
104 | 95 | /** |
105 | 96 | * @return License |
106 | 97 | */ |
107 | - public function getLicense() |
|
108 | - { |
|
98 | + public function getLicense() { |
|
109 | 99 | return $this->license; |
110 | 100 | } |
111 | 101 | |
112 | 102 | /** |
113 | 103 | * @return string |
114 | 104 | */ |
115 | - public function getVersion() |
|
116 | - { |
|
105 | + public function getVersion() { |
|
117 | 106 | return $this->version; |
118 | 107 | } |
119 | 108 | |
@@ -122,8 +111,7 @@ discard block |
||
122 | 111 | * |
123 | 112 | * @return $this |
124 | 113 | */ |
125 | - public function setVersion($version) |
|
126 | - { |
|
114 | + public function setVersion($version) { |
|
127 | 115 | $this->version = $version; |
128 | 116 | |
129 | 117 | return $this; |
@@ -12,43 +12,43 @@ |
||
12 | 12 | |
13 | 13 | class Header extends AbstractModel implements Arrayable |
14 | 14 | { |
15 | - use DescriptionPart; |
|
16 | - use TypePart; |
|
17 | - use ItemsPart; |
|
18 | - use ExtensionPart; |
|
19 | - |
|
20 | - /** @var string */ |
|
21 | - private $header; |
|
22 | - |
|
23 | - public function __construct($header, $contents = null) |
|
24 | - { |
|
25 | - $this->header = $header; |
|
26 | - $this->parse($contents === null ? new Map() : $contents); |
|
27 | - } |
|
28 | - |
|
29 | - private function parse($contents = []) |
|
30 | - { |
|
31 | - $data = CollectionUtils::toMap($contents); |
|
32 | - |
|
33 | - // parts |
|
34 | - $this->parseDescription($data); |
|
35 | - $this->parseType($data); |
|
36 | - $this->parseItems($data); |
|
37 | - $this->parseExtensions($data); |
|
38 | - } |
|
39 | - |
|
40 | - public function toArray() |
|
41 | - { |
|
42 | - return $this->export('description', $this->getTypeExportFields(), 'items'); |
|
43 | - } |
|
44 | - |
|
45 | - /** |
|
46 | - * Returns the header. |
|
47 | - * |
|
48 | - * @return string |
|
49 | - */ |
|
50 | - public function getHeader() |
|
51 | - { |
|
52 | - return $this->header; |
|
53 | - } |
|
15 | + use DescriptionPart; |
|
16 | + use TypePart; |
|
17 | + use ItemsPart; |
|
18 | + use ExtensionPart; |
|
19 | + |
|
20 | + /** @var string */ |
|
21 | + private $header; |
|
22 | + |
|
23 | + public function __construct($header, $contents = null) |
|
24 | + { |
|
25 | + $this->header = $header; |
|
26 | + $this->parse($contents === null ? new Map() : $contents); |
|
27 | + } |
|
28 | + |
|
29 | + private function parse($contents = []) |
|
30 | + { |
|
31 | + $data = CollectionUtils::toMap($contents); |
|
32 | + |
|
33 | + // parts |
|
34 | + $this->parseDescription($data); |
|
35 | + $this->parseType($data); |
|
36 | + $this->parseItems($data); |
|
37 | + $this->parseExtensions($data); |
|
38 | + } |
|
39 | + |
|
40 | + public function toArray() |
|
41 | + { |
|
42 | + return $this->export('description', $this->getTypeExportFields(), 'items'); |
|
43 | + } |
|
44 | + |
|
45 | + /** |
|
46 | + * Returns the header. |
|
47 | + * |
|
48 | + * @return string |
|
49 | + */ |
|
50 | + public function getHeader() |
|
51 | + { |
|
52 | + return $this->header; |
|
53 | + } |
|
54 | 54 | } |
@@ -10,8 +10,7 @@ discard block |
||
10 | 10 | use phootwork\lang\Arrayable; |
11 | 11 | use phootwork\collection\Map; |
12 | 12 | |
13 | -class Header extends AbstractModel implements Arrayable |
|
14 | -{ |
|
13 | +class Header extends AbstractModel implements Arrayable { |
|
15 | 14 | use DescriptionPart; |
16 | 15 | use TypePart; |
17 | 16 | use ItemsPart; |
@@ -20,14 +19,12 @@ discard block |
||
20 | 19 | /** @var string */ |
21 | 20 | private $header; |
22 | 21 | |
23 | - public function __construct($header, $contents = null) |
|
24 | - { |
|
22 | + public function __construct($header, $contents = null) { |
|
25 | 23 | $this->header = $header; |
26 | 24 | $this->parse($contents === null ? new Map() : $contents); |
27 | 25 | } |
28 | 26 | |
29 | - private function parse($contents = []) |
|
30 | - { |
|
27 | + private function parse($contents = []) { |
|
31 | 28 | $data = CollectionUtils::toMap($contents); |
32 | 29 | |
33 | 30 | // parts |
@@ -37,8 +34,7 @@ discard block |
||
37 | 34 | $this->parseExtensions($data); |
38 | 35 | } |
39 | 36 | |
40 | - public function toArray() |
|
41 | - { |
|
37 | + public function toArray() { |
|
42 | 38 | return $this->export('description', $this->getTypeExportFields(), 'items'); |
43 | 39 | } |
44 | 40 | |
@@ -47,8 +43,7 @@ discard block |
||
47 | 43 | * |
48 | 44 | * @return string |
49 | 45 | */ |
50 | - public function getHeader() |
|
51 | - { |
|
46 | + public function getHeader() { |
|
52 | 47 | return $this->header; |
53 | 48 | } |
54 | 49 | } |
@@ -6,31 +6,31 @@ |
||
6 | 6 | |
7 | 7 | trait RequiredPart |
8 | 8 | { |
9 | - /** @var bool */ |
|
10 | - private $required = false; |
|
9 | + /** @var bool */ |
|
10 | + private $required = false; |
|
11 | 11 | |
12 | - private function parseRequired(Map $data) |
|
13 | - { |
|
14 | - $this->required = $data->has('required') && $data->get('required'); |
|
15 | - } |
|
12 | + private function parseRequired(Map $data) |
|
13 | + { |
|
14 | + $this->required = $data->has('required') && $data->get('required'); |
|
15 | + } |
|
16 | 16 | |
17 | - /** |
|
18 | - * @return bool |
|
19 | - */ |
|
20 | - public function getRequired() |
|
21 | - { |
|
22 | - return $this->required; |
|
23 | - } |
|
17 | + /** |
|
18 | + * @return bool |
|
19 | + */ |
|
20 | + public function getRequired() |
|
21 | + { |
|
22 | + return $this->required; |
|
23 | + } |
|
24 | 24 | |
25 | - /** |
|
26 | - * @param bool $required |
|
27 | - * |
|
28 | - * @return $this |
|
29 | - */ |
|
30 | - public function setRequired($required) |
|
31 | - { |
|
32 | - $this->required = $required; |
|
25 | + /** |
|
26 | + * @param bool $required |
|
27 | + * |
|
28 | + * @return $this |
|
29 | + */ |
|
30 | + public function setRequired($required) |
|
31 | + { |
|
32 | + $this->required = $required; |
|
33 | 33 | |
34 | - return $this; |
|
35 | - } |
|
34 | + return $this; |
|
35 | + } |
|
36 | 36 | } |
@@ -4,21 +4,18 @@ discard block |
||
4 | 4 | |
5 | 5 | use phootwork\collection\Map; |
6 | 6 | |
7 | -trait RequiredPart |
|
8 | -{ |
|
7 | +trait RequiredPart { |
|
9 | 8 | /** @var bool */ |
10 | 9 | private $required = false; |
11 | 10 | |
12 | - private function parseRequired(Map $data) |
|
13 | - { |
|
11 | + private function parseRequired(Map $data) { |
|
14 | 12 | $this->required = $data->has('required') && $data->get('required'); |
15 | 13 | } |
16 | 14 | |
17 | 15 | /** |
18 | 16 | * @return bool |
19 | 17 | */ |
20 | - public function getRequired() |
|
21 | - { |
|
18 | + public function getRequired() { |
|
22 | 19 | return $this->required; |
23 | 20 | } |
24 | 21 | |
@@ -27,8 +24,7 @@ discard block |
||
27 | 24 | * |
28 | 25 | * @return $this |
29 | 26 | */ |
30 | - public function setRequired($required) |
|
31 | - { |
|
27 | + public function setRequired($required) { |
|
32 | 28 | $this->required = $required; |
33 | 29 | |
34 | 30 | return $this; |
@@ -7,20 +7,20 @@ |
||
7 | 7 | |
8 | 8 | trait ProducesPart |
9 | 9 | { |
10 | - private $produces; |
|
10 | + private $produces; |
|
11 | 11 | |
12 | - private function parseProduces(Map $data) |
|
13 | - { |
|
14 | - $this->produces = $data->get('produces', new Set()); |
|
15 | - } |
|
12 | + private function parseProduces(Map $data) |
|
13 | + { |
|
14 | + $this->produces = $data->get('produces', new Set()); |
|
15 | + } |
|
16 | 16 | |
17 | - /** |
|
18 | - * Return produces. |
|
19 | - * |
|
20 | - * @return Set |
|
21 | - */ |
|
22 | - public function getProduces() |
|
23 | - { |
|
24 | - return $this->produces; |
|
25 | - } |
|
17 | + /** |
|
18 | + * Return produces. |
|
19 | + * |
|
20 | + * @return Set |
|
21 | + */ |
|
22 | + public function getProduces() |
|
23 | + { |
|
24 | + return $this->produces; |
|
25 | + } |
|
26 | 26 | } |
@@ -5,12 +5,10 @@ discard block |
||
5 | 5 | use phootwork\collection\Map; |
6 | 6 | use phootwork\collection\Set; |
7 | 7 | |
8 | -trait ProducesPart |
|
9 | -{ |
|
8 | +trait ProducesPart { |
|
10 | 9 | private $produces; |
11 | 10 | |
12 | - private function parseProduces(Map $data) |
|
13 | - { |
|
11 | + private function parseProduces(Map $data) { |
|
14 | 12 | $this->produces = $data->get('produces', new Set()); |
15 | 13 | } |
16 | 14 | |
@@ -19,8 +17,7 @@ discard block |
||
19 | 17 | * |
20 | 18 | * @return Set |
21 | 19 | */ |
22 | - public function getProduces() |
|
23 | - { |
|
20 | + public function getProduces() { |
|
24 | 21 | return $this->produces; |
25 | 22 | } |
26 | 23 | } |
@@ -7,20 +7,20 @@ |
||
7 | 7 | |
8 | 8 | trait SchemesPart |
9 | 9 | { |
10 | - private $schemes; |
|
10 | + private $schemes; |
|
11 | 11 | |
12 | - private function parseSchemes(Map $data) |
|
13 | - { |
|
14 | - $this->schemes = $data->get('schemes', new ArrayList()); |
|
15 | - } |
|
12 | + private function parseSchemes(Map $data) |
|
13 | + { |
|
14 | + $this->schemes = $data->get('schemes', new ArrayList()); |
|
15 | + } |
|
16 | 16 | |
17 | - /** |
|
18 | - * Return schemes. |
|
19 | - * |
|
20 | - * @return ArrayList |
|
21 | - */ |
|
22 | - public function getSchemes() |
|
23 | - { |
|
24 | - return $this->schemes; |
|
25 | - } |
|
17 | + /** |
|
18 | + * Return schemes. |
|
19 | + * |
|
20 | + * @return ArrayList |
|
21 | + */ |
|
22 | + public function getSchemes() |
|
23 | + { |
|
24 | + return $this->schemes; |
|
25 | + } |
|
26 | 26 | } |
@@ -5,12 +5,10 @@ discard block |
||
5 | 5 | use phootwork\collection\Map; |
6 | 6 | use phootwork\collection\ArrayList; |
7 | 7 | |
8 | -trait SchemesPart |
|
9 | -{ |
|
8 | +trait SchemesPart { |
|
10 | 9 | private $schemes; |
11 | 10 | |
12 | - private function parseSchemes(Map $data) |
|
13 | - { |
|
11 | + private function parseSchemes(Map $data) { |
|
14 | 12 | $this->schemes = $data->get('schemes', new ArrayList()); |
15 | 13 | } |
16 | 14 | |
@@ -19,8 +17,7 @@ discard block |
||
19 | 17 | * |
20 | 18 | * @return ArrayList |
21 | 19 | */ |
22 | - public function getSchemes() |
|
23 | - { |
|
20 | + public function getSchemes() { |
|
24 | 21 | return $this->schemes; |
25 | 22 | } |
26 | 23 | } |