Passed
Push — develop ( a803f3...78e549 )
by nguereza
03:14
created
src/Map/MapInterface.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,8 +50,7 @@
 block discarded – undo
50 50
  * Class MapInterface
51 51
  * @package Platine\Collection\Map
52 52
  */
53
-interface MapInterface
54
-{
53
+interface MapInterface {
55 54
 
56 55
     /**
57 56
      * Add element to the collection
Please login to merge, or discard this patch.
src/Map/HashMap.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -85,8 +85,7 @@  discard block
 block discarded – undo
85 85
      * @param mixed $valueType
86 86
      * @param array<mixed, mixed> $initials
87 87
      */
88
-    public function __construct($keyType, $valueType, array $initials = [])
89
-    {
88
+    public function __construct($keyType, $valueType, array $initials = []) {
90 89
         $this->keyType = $keyType;
91 90
         $this->valueType = $valueType;
92 91
 
@@ -155,8 +154,7 @@  discard block
 block discarded – undo
155 154
      * Return the type of the key
156 155
      * @return mixed
157 156
      */
158
-    public function getKeyType()
159
-    {
157
+    public function getKeyType() {
160 158
         return $this->keyType;
161 159
     }
162 160
 
@@ -164,8 +162,7 @@  discard block
 block discarded – undo
164 162
      * Return the type of the value
165 163
      * @return mixed
166 164
      */
167
-    public function getValueType()
168
-    {
165
+    public function getValueType() {
169 166
         return $this->valueType;
170 167
     }
171 168
 
@@ -246,8 +243,7 @@  discard block
 block discarded – undo
246 243
      /**
247 244
      * {@inheritedoc}
248 245
      */
249
-    public function get($key)
250
-    {
246
+    public function get($key) {
251 247
         return $this->data->offsetExists($key)
252 248
                ? $this->data->offsetGet($key)->getValue()
253 249
                : null;
Please login to merge, or discard this patch.
src/Map/Pair.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -50,8 +50,7 @@  discard block
 block discarded – undo
50 50
  * Class Pair
51 51
  * @package Platine\Collection\Map
52 52
  */
53
-class Pair
54
-{
53
+class Pair {
55 54
 
56 55
     /**
57 56
      *
@@ -70,8 +69,7 @@  discard block
 block discarded – undo
70 69
      * @param mixed $key
71 70
      * @param mixed $value
72 71
      */
73
-    public function __construct($key, $value)
74
-    {
72
+    public function __construct($key, $value) {
75 73
         $this->key = $key;
76 74
         $this->value = $value;
77 75
     }
@@ -80,8 +78,7 @@  discard block
 block discarded – undo
80 78
      *
81 79
      * @return mixed
82 80
      */
83
-    public function getKey()
84
-    {
81
+    public function getKey() {
85 82
         return $this->key;
86 83
     }
87 84
 
@@ -89,8 +86,7 @@  discard block
 block discarded – undo
89 86
      *
90 87
      * @return mixed
91 88
      */
92
-    public function getValue()
93
-    {
89
+    public function getValue() {
94 90
         return $this->value;
95 91
     }
96 92
 
Please login to merge, or discard this patch.
src/Stack/Stack.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -54,8 +54,7 @@  discard block
 block discarded – undo
54 54
  * Class Stack
55 55
  * @package Platine\Collection\Stack
56 56
  */
57
-class Stack implements Countable
58
-{
57
+class Stack implements Countable {
59 58
 
60 59
     /**
61 60
      *
@@ -73,8 +72,7 @@  discard block
 block discarded – undo
73 72
      * Create new instance
74 73
      * @param string $type
75 74
      */
76
-    public function __construct(string $type)
77
-    {
75
+    public function __construct(string $type) {
78 76
         $this->data = [];
79 77
         $this->type = $type;
80 78
     }
@@ -108,8 +106,7 @@  discard block
 block discarded – undo
108 106
     /**
109 107
      * @return mixed
110 108
      */
111
-    public function peek()
112
-    {
109
+    public function peek() {
113 110
         if ($this->isEmpty()) {
114 111
             throw new InvalidOperationException('The collection is empty');
115 112
         }
@@ -121,8 +118,7 @@  discard block
 block discarded – undo
121 118
      *
122 119
      * @return mixed
123 120
      */
124
-    public function pop()
125
-    {
121
+    public function pop() {
126 122
         return array_pop($this->data);
127 123
     }
128 124
 
@@ -132,8 +128,7 @@  discard block
 block discarded – undo
132 128
      * @param mixed $value
133 129
      * @return mixed
134 130
      */
135
-    public function push($value)
136
-    {
131
+    public function push($value) {
137 132
         TypeCheck::isValueOf(
138 133
             $value,
139 134
             $this->type,
Please login to merge, or discard this patch.
src/Collection.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -73,8 +73,7 @@  discard block
 block discarded – undo
73 73
      * Create new instance
74 74
      * @param mixed ...$data
75 75
      */
76
-    public function __construct(...$data)
77
-    {
76
+    public function __construct(...$data) {
78 77
         foreach ($data as $value) {
79 78
             $this->validateEntry($value);
80 79
         }
@@ -180,8 +179,7 @@  discard block
 block discarded – undo
180 179
      * @return mixed
181 180
      * @throws OutOfRangeException
182 181
      */
183
-    public function get(int $offset)
184
-    {
182
+    public function get(int $offset) {
185 183
         if ($this->isEmpty()) {
186 184
             throw new OutOfRangeException('The collection is empty');
187 185
         }
@@ -268,8 +266,7 @@  discard block
 block discarded – undo
268 266
      * Return a random element of the collection
269 267
      * @return mixed
270 268
      */
271
-    public function rand()
272
-    {
269
+    public function rand() {
273 270
         if ($this->isEmpty()) {
274 271
             throw new InvalidOperationException('The collection is empty');
275 272
         }
Please login to merge, or discard this patch.