Completed
Branch 2.0 (ba2d77)
by Anton
01:50
created
src/Core.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -80,8 +80,8 @@  discard block
 block discarded – undo
80 80
      */
81 81
     public function serve()
82 82
     {
83
-        foreach ($this->dispatchers as $dispatcher) {
84
-            if ($dispatcher->canServe()) {
83
+        foreach ($this->dispatchers as $dispatcher){
84
+            if ($dispatcher->canServe()){
85 85
                 ContainerScope::runScope($this->container, function () use ($dispatcher) {
86 86
                     $dispatcher->serve();
87 87
                 });
@@ -105,25 +105,25 @@  discard block
 block discarded – undo
105 105
      */
106 106
     protected function mapDirectories(array $directories): array
107 107
     {
108
-        if (!isset($directories['root'])) {
108
+        if (!isset($directories['root'])){
109 109
             throw new FrameworkException("Missing required directory `root`.");
110 110
         }
111 111
 
112
-        if (!isset($directories['app'])) {
113
-            $directories['app'] = $directories['root'] . '/app/';
112
+        if (!isset($directories['app'])){
113
+            $directories['app'] = $directories['root'].'/app/';
114 114
         }
115 115
 
116 116
         return array_merge($directories, [
117 117
             // public root
118
-            'public'    => $directories['root'] . '/public/',
118
+            'public'    => $directories['root'].'/public/',
119 119
 
120 120
             // application directories
121
-            'config'    => $directories['app'] . '/config/',
122
-            'resources' => $directories['app'] . '/resources/',
121
+            'config'    => $directories['app'].'/config/',
122
+            'resources' => $directories['app'].'/resources/',
123 123
 
124 124
             // data directories
125
-            'runtime'   => $directories['app'] . '/runtime/',
126
-            'cache'     => $directories['app'] . '/runtime/cache/',
125
+            'runtime'   => $directories['app'].'/runtime/',
126
+            'cache'     => $directories['app'].'/runtime/cache/',
127 127
         ]);
128 128
     }
129 129
 
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
         EnvironmentInterface $environment = null,
153 153
         bool $handleErrors = true
154 154
     ): self {
155
-        if ($handleErrors) {
155
+        if ($handleErrors){
156 156
             ExceptionHandler::register();
157 157
         }
158 158
 
@@ -162,11 +162,11 @@  discard block
 block discarded – undo
162 162
             $environment ?? new Environment()
163 163
         );
164 164
 
165
-        try {
165
+        try{
166 166
             ContainerScope::runScope($core->container, function () use ($core) {
167 167
                 $core->bootload()->bootstrap();
168 168
             });
169
-        } catch (\Throwable $e) {
169
+        }catch (\Throwable $e){
170 170
             ExceptionHandler::handleException($e);
171 171
         }
172 172
 
Please login to merge, or discard this patch.
src/Environment.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
      */
40 40
     public function getID(): string
41 41
     {
42
-        if (empty($this->id)) {
42
+        if (empty($this->id)){
43 43
             $this->id = md5(serialize($this->values));
44 44
         }
45 45
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
      */
63 63
     public function get(string $name, $default = null)
64 64
     {
65
-        if (isset($this->values[$name])) {
65
+        if (isset($this->values[$name])){
66 66
             return $this->normalize($this->values[$name]);
67 67
         }
68 68
 
@@ -75,12 +75,12 @@  discard block
 block discarded – undo
75 75
      */
76 76
     protected function normalize($value): ?string
77 77
     {
78
-        if (!is_string($value)) {
78
+        if (!is_string($value)){
79 79
             return $value;
80 80
         }
81 81
 
82 82
         $alias = strtolower($value);
83
-        if (isset(self::VALUE_MAP[$alias])) {
83
+        if (isset(self::VALUE_MAP[$alias])){
84 84
             return self::VALUE_MAP[$alias];
85 85
         }
86 86
 
Please login to merge, or discard this patch.