@@ -46,14 +46,14 @@ discard block |
||
46 | 46 | * @param string $method |
47 | 47 | * @param array $parameter |
48 | 48 | */ |
49 | - public function __construct($object, ?array $constructParameter=null, string $method, array $parameter = []) |
|
49 | + public function __construct($object, ?array $constructParameter = null, string $method, array $parameter = []) |
|
50 | 50 | { |
51 | 51 | $this->object = $object; |
52 | 52 | $this->constructParameter = $constructParameter; |
53 | 53 | $this->method = $method; |
54 | 54 | $this->parameter = $parameter; |
55 | 55 | $static = $this->isStatic() ? '->' : '::'; |
56 | - $name = \is_object($object)? \get_class($object) : $object; |
|
56 | + $name = \is_object($object) ? \get_class($object) : $object; |
|
57 | 57 | $this->name = $name.$static.$method; |
58 | 58 | } |
59 | 59 | |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | * |
63 | 63 | * @return object|null 动态类可获取 |
64 | 64 | */ |
65 | - public function getObjectInstance():?object |
|
65 | + public function getObjectInstance(): ?object |
|
66 | 66 | { |
67 | 67 | if (\is_object($this->object)) { |
68 | 68 | return $this->object; |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | if (!is_null($this->requireFile) && !\class_exists($this->object)) { |
74 | 74 | require_once $this->requireFile; |
75 | 75 | } |
76 | - $classRef= new ReflectionClass($this->object); |
|
76 | + $classRef = new ReflectionClass($this->object); |
|
77 | 77 | return $classRef->newInstanceArgs($this->constructParameter); |
78 | 78 | } |
79 | 79 | |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | if ($this->isStatic() || \is_object($this->object)) { |
84 | 84 | $this->runnableTarget = [$this->object, $this->method]; |
85 | 85 | } |
86 | - $this->runnableTarget = [$this->getObjectInstance() ?? $this->object, $this->method]; |
|
86 | + $this->runnableTarget = [$this->getObjectInstance() ?? $this->object, $this->method]; |
|
87 | 87 | } |
88 | 88 | return $this->runnableTarget; |
89 | 89 | } |