Completed
Push — 6.0 ( 5b0350...ee2016 )
by liu
07:01
created
src/think/Container.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 // +----------------------------------------------------------------------
9 9
 // | Author: liu21st <[email protected]>
10 10
 // +----------------------------------------------------------------------
11
-declare (strict_types = 1);
11
+declare(strict_types=1);
12 12
 
13 13
 namespace think;
14 14
 
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
             return $this->make($abstract);
130 130
         }
131 131
 
132
-        throw new ClassNotFoundException('class not exists: ' . $abstract, $abstract);
132
+        throw new ClassNotFoundException('class not exists: '.$abstract, $abstract);
133 133
     }
134 134
 
135 135
     /**
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
             } else {
299 299
                 $function .= '()';
300 300
             }
301
-            throw new Exception('function not exists: ' . $function, 0, $e);
301
+            throw new Exception('function not exists: '.$function, 0, $e);
302 302
         }
303 303
     }
304 304
 
@@ -331,12 +331,12 @@  discard block
 block discarded – undo
331 331
         } catch (ReflectionException $e) {
332 332
             if (is_array($method)) {
333 333
                 $class    = is_object($method[0]) ? get_class($method[0]) : $method[0];
334
-                $callback = $class . '::' . $method[1];
334
+                $callback = $class.'::'.$method[1];
335 335
             } else {
336 336
                 $callback = $method;
337 337
             }
338 338
 
339
-            throw new Exception('method not exists: ' . $callback . '()', 0, $e);
339
+            throw new Exception('method not exists: '.$callback.'()', 0, $e);
340 340
         }
341 341
     }
342 342
 
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
460 460
             } elseif ($param->isDefaultValueAvailable()) {
461 461
                 $args[] = $param->getDefaultValue();
462 462
             } else {
463
-                throw new InvalidArgumentException('method param miss:' . $name);
463
+                throw new InvalidArgumentException('method param miss:'.$name);
464 464
             }
465 465
         }
466 466
 
@@ -478,13 +478,13 @@  discard block
 block discarded – undo
478 478
      */
479 479
     public static function factory(string $name, string $namespace = '', ...$args)
480 480
     {
481
-        $class = false !== strpos($name, '\\') ? $name : $namespace . ucwords($name);
481
+        $class = false !== strpos($name, '\\') ? $name : $namespace.ucwords($name);
482 482
 
483 483
         if (class_exists($class)) {
484 484
             return Container::getInstance()->invokeClass($class, $args);
485 485
         }
486 486
 
487
-        throw new ClassNotFoundException('class not exists:' . $class, $class);
487
+        throw new ClassNotFoundException('class not exists:'.$class, $class);
488 488
     }
489 489
 
490 490
     /**
Please login to merge, or discard this patch.