Passed
Pull Request — master (#599)
by Aleksei
08:43 queued 02:55
created
src/Boot/tests/EnvironmentTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
      * @return EnvironmentInterface
78 78
      * @throws \Throwable
79 79
      */
80
-    protected function getEnv(array $env, bool $overwite= true): EnvironmentInterface
80
+    protected function getEnv(array $env, bool $overwite = true): EnvironmentInterface
81 81
     {
82 82
         $core = TestCore::init(['root' => __DIR__], new Environment($env, $overwite));
83 83
 
Please login to merge, or discard this patch.
src/Boot/src/Environment.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      */
39 39
     public function getID(): string
40 40
     {
41
-        if (empty($this->id)) {
41
+        if (empty($this->id)){
42 42
             $this->id = md5(serialize($this->values));
43 43
         }
44 44
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      */
51 51
     public function set(string $name, $value): void
52 52
     {
53
-        if (\array_key_exists($name, $this->values) && !$this->overwrite) {
53
+        if (\array_key_exists($name, $this->values) && !$this->overwrite){
54 54
             return;
55 55
         }
56 56
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      */
66 66
     public function get(string $name, $default = null)
67 67
     {
68
-        if (isset($this->values[$name])) {
68
+        if (isset($this->values[$name])){
69 69
             return $this->normalize($this->values[$name]);
70 70
         }
71 71
 
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     {
80 80
         $result = [];
81 81
 
82
-        foreach ($this->values as $key => $value) {
82
+        foreach ($this->values as $key => $value){
83 83
             $result[$key] = $this->normalize($value);
84 84
         }
85 85
 
@@ -92,12 +92,12 @@  discard block
 block discarded – undo
92 92
      */
93 93
     protected function normalize($value)
94 94
     {
95
-        if (!is_string($value)) {
95
+        if (!is_string($value)){
96 96
             return $value;
97 97
         }
98 98
 
99 99
         $alias = strtolower($value);
100
-        if (isset(self::VALUE_MAP[$alias])) {
100
+        if (isset(self::VALUE_MAP[$alias])){
101 101
             return self::VALUE_MAP[$alias];
102 102
         }
103 103
 
Please login to merge, or discard this patch.
Braces   +12 added lines, -6 removed lines patch added patch discarded remove patch
@@ -38,7 +38,8 @@  discard block
 block discarded – undo
38 38
      */
39 39
     public function getID(): string
40 40
     {
41
-        if (empty($this->id)) {
41
+        if (empty($this->id))
42
+        {
42 43
             $this->id = md5(serialize($this->values));
43 44
         }
44 45
 
@@ -50,7 +51,8 @@  discard block
 block discarded – undo
50 51
      */
51 52
     public function set(string $name, $value): void
52 53
     {
53
-        if (\array_key_exists($name, $this->values) && !$this->overwrite) {
54
+        if (\array_key_exists($name, $this->values) && !$this->overwrite)
55
+        {
54 56
             return;
55 57
         }
56 58
 
@@ -65,7 +67,8 @@  discard block
 block discarded – undo
65 67
      */
66 68
     public function get(string $name, $default = null)
67 69
     {
68
-        if (isset($this->values[$name])) {
70
+        if (isset($this->values[$name]))
71
+        {
69 72
             return $this->normalize($this->values[$name]);
70 73
         }
71 74
 
@@ -79,7 +82,8 @@  discard block
 block discarded – undo
79 82
     {
80 83
         $result = [];
81 84
 
82
-        foreach ($this->values as $key => $value) {
85
+        foreach ($this->values as $key => $value)
86
+        {
83 87
             $result[$key] = $this->normalize($value);
84 88
         }
85 89
 
@@ -92,12 +96,14 @@  discard block
 block discarded – undo
92 96
      */
93 97
     protected function normalize($value)
94 98
     {
95
-        if (!is_string($value)) {
99
+        if (!is_string($value))
100
+        {
96 101
             return $value;
97 102
         }
98 103
 
99 104
         $alias = strtolower($value);
100
-        if (isset(self::VALUE_MAP[$alias])) {
105
+        if (isset(self::VALUE_MAP[$alias]))
106
+        {
101 107
             return self::VALUE_MAP[$alias];
102 108
         }
103 109
 
Please login to merge, or discard this patch.