Completed
Pull Request — master (#3)
by Guilh
02:22
created
src/parts/RefPart.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -4,16 +4,14 @@  discard block
 block discarded – undo
4 4
 
5 5
 use phootwork\collection\Map;
6 6
 
7
-trait RefPart
8
-{
7
+trait RefPart {
9 8
     /** @var string */
10 9
     private $ref;
11 10
 
12 11
     /** @var bool */
13 12
     private $hasRef = false;
14 13
 
15
-    private function parseRef(Map $data)
16
-    {
14
+    private function parseRef(Map $data) {
17 15
         $this->ref = $data->get('$ref');
18 16
         $this->hasRef = $data->has('$ref');
19 17
     }
@@ -21,8 +19,7 @@  discard block
 block discarded – undo
21 19
     /**
22 20
      * @return the string
23 21
      */
24
-    public function getRef()
25
-    {
22
+    public function getRef() {
26 23
         return $this->ref;
27 24
     }
28 25
 
@@ -30,16 +27,14 @@  discard block
 block discarded – undo
30 27
      * @param
31 28
      *        	$ref
32 29
      */
33
-    public function setRef($ref)
34
-    {
30
+    public function setRef($ref) {
35 31
         $this->ref = $ref;
36 32
         $this->hasRef = $ref !== null;
37 33
 
38 34
         return $this;
39 35
     }
40 36
 
41
-    public function hasRef()
42
-    {
37
+    public function hasRef() {
43 38
         return $this->hasRef;
44 39
     }
45 40
 }
Please login to merge, or discard this patch.
src/parts/SchemaPart.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -5,21 +5,18 @@
 block discarded – undo
5 5
 use phootwork\collection\Map;
6 6
 use gossi\swagger\Schema;
7 7
 
8
-trait SchemaPart
9
-{
8
+trait SchemaPart {
10 9
     /** @var Schema */
11 10
     private $schema;
12 11
 
13
-    private function parseSchema(Map $data)
14
-    {
12
+    private function parseSchema(Map $data) {
15 13
         $this->schema = new Schema($data->get('schema'));
16 14
     }
17 15
 
18 16
     /**
19 17
      * @return Schema
20 18
      */
21
-    public function getSchema()
22
-    {
19
+    public function getSchema() {
23 20
         return $this->schema;
24 21
     }
25 22
 }
Please login to merge, or discard this patch.
src/parts/ParametersPart.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -5,13 +5,11 @@  discard block
 block discarded – undo
5 5
 use phootwork\collection\Map;
6 6
 use gossi\swagger\collections\Parameters;
7 7
 
8
-trait ParametersPart
9
-{
8
+trait ParametersPart {
10 9
     /** @var Parameters */
11 10
     private $parameters;
12 11
 
13
-    private function parseParameters(Map $data)
14
-    {
12
+    private function parseParameters(Map $data) {
15 13
         $this->parameters = new Parameters($data->get('parameters', new Map()));
16 14
     }
17 15
 
@@ -20,8 +18,7 @@  discard block
 block discarded – undo
20 18
      *
21 19
      * @return Parameters
22 20
      */
23
-    public function getParameters()
24
-    {
21
+    public function getParameters() {
25 22
         return $this->parameters;
26 23
     }
27 24
 }
Please login to merge, or discard this patch.
src/parts/ResponsesPart.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -5,13 +5,11 @@  discard block
 block discarded – undo
5 5
 use gossi\swagger\collections\Responses;
6 6
 use phootwork\collection\Map;
7 7
 
8
-trait ResponsesPart
9
-{
8
+trait ResponsesPart {
10 9
     /** @var Responses */
11 10
     private $responses;
12 11
 
13
-    private function parseResponses(Map $data)
14
-    {
12
+    private function parseResponses(Map $data) {
15 13
         $this->responses = new Responses($data->get('responses', new Map()));
16 14
     }
17 15
 
@@ -20,8 +18,7 @@  discard block
 block discarded – undo
20 18
      *
21 19
      * @return Responses
22 20
      */
23
-    public function getResponses()
24
-    {
21
+    public function getResponses() {
25 22
         return $this->responses;
26 23
     }
27 24
 }
Please login to merge, or discard this patch.
src/parts/DescriptionPart.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -4,21 +4,18 @@  discard block
 block discarded – undo
4 4
 
5 5
 use phootwork\collection\Map;
6 6
 
7
-trait DescriptionPart
8
-{
7
+trait DescriptionPart {
9 8
     /** @var string */
10 9
     private $description = false;
11 10
 
12
-    private function parseDescription(Map $data)
13
-    {
11
+    private function parseDescription(Map $data) {
14 12
         $this->description = $data->get('description');
15 13
     }
16 14
 
17 15
     /**
18 16
      * @return string
19 17
      */
20
-    public function getDescription()
21
-    {
18
+    public function getDescription() {
22 19
         return $this->description;
23 20
     }
24 21
 
@@ -27,8 +24,7 @@  discard block
 block discarded – undo
27 24
      *
28 25
      * @return $this
29 26
      */
30
-    public function setDescription($description)
31
-    {
27
+    public function setDescription($description) {
32 28
         $this->description = $description;
33 29
 
34 30
         return $this;
Please login to merge, or discard this patch.
src/parts/ItemsPart.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -5,13 +5,11 @@  discard block
 block discarded – undo
5 5
 use phootwork\collection\Map;
6 6
 use gossi\swagger\Items;
7 7
 
8
-trait ItemsPart
9
-{
8
+trait ItemsPart {
10 9
     /** @var */
11 10
     private $items;
12 11
 
13
-    private function parseItems(Map $data)
14
-    {
12
+    private function parseItems(Map $data) {
15 13
         if ($data->has('items')) {
16 14
             $this->items = new Items($data->get('items'));
17 15
         }
@@ -22,8 +20,7 @@  discard block
 block discarded – undo
22 20
      * 
23 21
      * @return Items
24 22
      */
25
-    public function getItems()
26
-    {
23
+    public function getItems() {
27 24
         if ($this->items === null) {
28 25
             $this->items = new Items();
29 26
         }
Please login to merge, or discard this patch.
src/parts/ConsumesPart.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -5,12 +5,10 @@  discard block
 block discarded – undo
5 5
 use phootwork\collection\Map;
6 6
 use phootwork\collection\Set;
7 7
 
8
-trait ConsumesPart
9
-{
8
+trait ConsumesPart {
10 9
     private $consumes;
11 10
 
12
-    private function parseConsumes(Map $data)
13
-    {
11
+    private function parseConsumes(Map $data) {
14 12
         $this->consumes = $data->get('consumes', new Set());
15 13
     }
16 14
 
@@ -19,8 +17,7 @@  discard block
 block discarded – undo
19 17
      *
20 18
      * @return Set
21 19
      */
22
-    public function getConsumes()
23
-    {
20
+    public function getConsumes() {
24 21
         return $this->consumes;
25 22
     }
26 23
 }
Please login to merge, or discard this patch.
src/parts/ExtensionPart.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -5,12 +5,10 @@  discard block
 block discarded – undo
5 5
 use phootwork\collection\Map;
6 6
 use phootwork\lang\Text;
7 7
 
8
-trait ExtensionPart
9
-{
8
+trait ExtensionPart {
10 9
     private $extensions;
11 10
 
12
-    private function parseExtensions(Map $data)
13
-    {
11
+    private function parseExtensions(Map $data) {
14 12
         $this->extensions = new Map();
15 13
 
16 14
         foreach ($data as $k => $v) {
@@ -26,8 +24,7 @@  discard block
 block discarded – undo
26 24
      * 
27 25
      * @return Map
28 26
      */
29
-    public function getExtensions()
30
-    {
27
+    public function getExtensions() {
31 28
         return $this->extensions;
32 29
     }
33 30
 }
Please login to merge, or discard this patch.
src/parts/TagsPart.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -6,12 +6,10 @@  discard block
 block discarded – undo
6 6
 use phootwork\collection\ArrayList;
7 7
 use gossi\swagger\Tag;
8 8
 
9
-trait TagsPart
10
-{
9
+trait TagsPart {
11 10
     private $tags;
12 11
 
13
-    private function parseTags(Map $data)
14
-    {
12
+    private function parseTags(Map $data) {
15 13
         $this->tags = new ArrayList();
16 14
         foreach ($data->get('tags', []) as $t) {
17 15
             $this->tags->add(new Tag($t));
@@ -23,13 +21,11 @@  discard block
 block discarded – undo
23 21
      *
24 22
      * @return ArrayList
25 23
      */
26
-    public function getTags()
27
-    {
24
+    public function getTags() {
28 25
         return $this->tags;
29 26
     }
30 27
 
31
-    protected function exportTags()
32
-    {
28
+    protected function exportTags() {
33 29
         $out = [];
34 30
         foreach ($this->tags as $tag) {
35 31
             if ($tag->isObject()) {
Please login to merge, or discard this patch.