Completed
Push — 6.0 ( ee2016...4cd5e6 )
by liu
10:07
created
src/think/Container.php 1 patch
Spacing   +9 added lines, -9 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
 
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
     public function invokeClass(string $class, array $vars = [])
383 383
     {
384 384
         if (!class_exists($class)) {
385
-            throw new ClassNotFoundException('class not exists: ' . $class, $class);
385
+            throw new ClassNotFoundException('class not exists: '.$class, $class);
386 386
         }
387 387
 
388 388
         $reflect = new ReflectionClass($class);
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
             } elseif ($param->isDefaultValueAvailable()) {
465 465
                 $args[] = $param->getDefaultValue();
466 466
             } else {
467
-                throw new InvalidArgumentException('method param miss:' . $name);
467
+                throw new InvalidArgumentException('method param miss:'.$name);
468 468
             }
469 469
         }
470 470
 
@@ -482,13 +482,13 @@  discard block
 block discarded – undo
482 482
      */
483 483
     public static function factory(string $name, string $namespace = '', ...$args)
484 484
     {
485
-        $class = false !== strpos($name, '\\') ? $name : $namespace . ucwords($name);
485
+        $class = false !== strpos($name, '\\') ? $name : $namespace.ucwords($name);
486 486
 
487 487
         if (class_exists($class)) {
488 488
             return Container::getInstance()->invokeClass($class, $args);
489 489
         }
490 490
 
491
-        throw new ClassNotFoundException('class not exists:' . $class, $class);
491
+        throw new ClassNotFoundException('class not exists:'.$class, $class);
492 492
     }
493 493
 
494 494
     /**
Please login to merge, or discard this patch.