Completed
Push — master ( ef07c2...7d9b81 )
by Adam
07:20
created
src/DateTime/Date.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         $this->year      = $year;
50 50
         $this->month     = $month;
51 51
         $this->day       = $day;
52
-        $this->native    = new \DateTime($year . '-' . $month . '-' . $day);
52
+        $this->native    = new \DateTime($year.'-'.$month.'-'.$day);
53 53
         $this->timestamp = $this->native->getTimeStamp();
54 54
         parent::__construct([ $year, $month, $day ]);
55 55
     }
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
      */
81 81
     public function __toString()
82 82
     {
83
-        return $this->year . '-' . $this->month . '-' . $this->day;
83
+        return $this->year.'-'.$this->month.'-'.$this->day;
84 84
     }
85 85
 
86 86
     /**
Please login to merge, or discard this patch.
src/DateTime/Unit/MicroSecond.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
      */
51 51
     public static function fromNative(\DateTime $native)
52 52
     {
53
-        return new static(floatval('0.' . $native->format('u')));
53
+        return new static(floatval('0.'.$native->format('u')));
54 54
     }
55 55
 
56 56
     /**
Please login to merge, or discard this patch.
src/DateTime/Unit/DayTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,6 +86,6 @@
 block discarded – undo
86 86
      */
87 87
     public function addDay($days)
88 88
     {
89
-        return static::fromNative($this->native->modify($days . ' day'));
89
+        return static::fromNative($this->native->modify($days.' day'));
90 90
     }
91 91
 }
Please login to merge, or discard this patch.
src/DateTime/Time.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,6 +121,6 @@
 block discarded – undo
121 121
      */
122 122
     public function __toString()
123 123
     {
124
-        return $this->hour . ':' . $this->minute . ':' . $this->second;
124
+        return $this->hour.':'.$this->minute.':'.$this->second;
125 125
     }
126 126
 }
Please login to merge, or discard this patch.
src/Format/Xml.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@  discard block
 block discarded – undo
21 21
      */
22 22
     public function parse()
23 23
     {
24
-        return [$this->getValue()->documentElement->tagName =>
25
-            $this->parseElement($this->value->documentElement)];
24
+        return [ $this->getValue()->documentElement->tagName =>
25
+            $this->parseElement($this->value->documentElement) ];
26 26
     }
27 27
 
28 28
     /**
@@ -30,11 +30,11 @@  discard block
 block discarded – undo
30 30
      * @param array $output
31 31
      * @return array
32 32
      */
33
-    public function parseElement($node, $output = [])
33
+    public function parseElement($node, $output = [ ])
34 34
     {
35 35
         switch ($node->nodeType) {
36 36
             case XML_CDATA_SECTION_NODE:
37
-                $output['@cdata'] = trim($node->textContent);
37
+                $output[ '@cdata' ] = trim($node->textContent);
38 38
                 break;
39 39
             case XML_TEXT_NODE:
40 40
                 return trim($node->textContent);
@@ -63,17 +63,17 @@  discard block
 block discarded – undo
63 63
      * @param array $output
64 64
      * @return array
65 65
      */
66
-    private function childNode($node, $output = [])
66
+    private function childNode($node, $output = [ ])
67 67
     {
68 68
         foreach ($node->childNodes as $child) {
69 69
             $children = $this->parseElement($child);
70 70
 
71 71
             if (isset($child->tagName)) {
72 72
                 $tagName = $child->tagName;
73
-                $output[$tagName] = isset($output[$tagName])
74
-                    ? $output[$tagName]
75
-                    : [];
76
-                $output[$tagName][] = $children;
73
+                $output[ $tagName ] = isset($output[ $tagName ])
74
+                    ? $output[ $tagName ]
75
+                    : [ ];
76
+                $output[ $tagName ][ ] = $children;
77 77
             } elseif ($children !== '') {
78 78
                 $output = $children;
79 79
             }
@@ -81,11 +81,11 @@  discard block
 block discarded – undo
81 81
         return $output;
82 82
     }
83 83
 
84
-    private function loopAttributes($attributes, $array = [])
84
+    private function loopAttributes($attributes, $array = [ ])
85 85
     {
86 86
         // Loop through the attributes and collect them.
87 87
         foreach ($attributes as $key => $node) {
88
-            $array[$key] = (string) $node->value;
88
+            $array[ $key ] = (string) $node->value;
89 89
         }
90 90
 
91 91
         return $array;
@@ -95,8 +95,8 @@  discard block
 block discarded – undo
95 95
     {
96 96
         // If there are attributes.
97 97
         if ($node->attributes->length) {
98
-            $output = is_array($output) ? $output : ['@value' => $output];
99
-            $output['@attributes'] = $this->loopAttributes($node->attributes);
98
+            $output = is_array($output) ? $output : [ '@value' => $output ];
99
+            $output[ '@attributes' ] = $this->loopAttributes($node->attributes);
100 100
         }
101 101
         return $output;
102 102
     }
@@ -105,8 +105,8 @@  discard block
 block discarded – undo
105 105
     {
106 106
         if (is_array($output)) {
107 107
             foreach ($output as $key => $value) {
108
-                $output[$key] = is_array($value) && count($value) === 1
109
-                    ? $value[0]
108
+                $output[ $key ] = is_array($value) && count($value) === 1
109
+                    ? $value[ 0 ]
110 110
                     : $value;
111 111
             }
112 112
             $output = !isset($output) || empty($output) ? '' : $output;
Please login to merge, or discard this patch.
src/Format/Byte.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 
7 7
 abstract class Byte extends ValueObject
8 8
 {
9
-    private $units = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
9
+    private $units = [ "Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB" ];
10 10
     protected $power;
11 11
 
12 12
     public static function fromBytes($bytes)
@@ -34,6 +34,6 @@  discard block
 block discarded – undo
34 34
 
35 35
     public function __toString()
36 36
     {
37
-        return $this->getValue() ? $this->power() . ' ' . $this->getUnit() : '0 bytes';
37
+        return $this->getValue() ? $this->power().' '.$this->getUnit() : '0 bytes';
38 38
     }      
39 39
 }
Please login to merge, or discard this patch.
src/ExtendedArray/ExtendedArrayTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
 
32 32
     public function arrayToPairString(array $array)
33 33
     {
34
-        return implode(',', array_map(function ($key, $value) {
35
-            return $key . '=' . $value;
34
+        return implode(',', array_map(function($key, $value) {
35
+            return $key.'='.$value;
36 36
         }, array_keys($array), $array));
37 37
     }
38 38
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
      */
85 85
     public static function nullIfNotSet(array $array, $key = false)
86 86
     {
87
-        return isset($array[$key]) ? $array[$key] : null;
87
+        return isset($array[ $key ]) ? $array[ $key ] : null;
88 88
     }
89 89
 
90 90
     /**
@@ -94,6 +94,6 @@  discard block
 block discarded – undo
94 94
      */
95 95
     public static function falseIfNotSet(array $array, $key = false)
96 96
     {
97
-        return isset($array[$key]) ? $array[$key] : false;
97
+        return isset($array[ $key ]) ? $array[ $key ] : false;
98 98
     }
99 99
 }
Please login to merge, or discard this patch.
src/Metric/DefinedFunction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,6 +16,6 @@
 block discarded – undo
16 16
      */
17 17
     public static function now()
18 18
     {
19
-        return new static(get_defined_functions()['user']);
19
+        return new static(get_defined_functions()[ 'user' ]);
20 20
     }
21 21
 }
Please login to merge, or discard this patch.
src/Metric/DefinedConstant.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
      */
20 20
     public static function now()
21 21
     {
22
-        return new static(get_defined_constants(true)['user']);
22
+        return new static(get_defined_constants(true)[ 'user' ]);
23 23
     }
24 24
 
25 25
     /**
Please login to merge, or discard this patch.