File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 42
42
class ReceiptPrinter
43
43
{
44
44
use Conditionable;
45
- use Macroable;
45
+ use Macroable {
46
+ Macroable::__call as __macroCall;
47
+ }
46
48
47
49
protected DummyPrintConnector $ connector ;
48
50
@@ -68,15 +70,15 @@ public function __toString(): string
68
70
return $ this ->connector ->getData ();
69
71
}
70
72
71
- public function __call ($ name , $ arguments )
73
+ public function __call ($ method , $ parameters )
72
74
{
73
- if (method_exists ($ this ->printer , $ name )) {
74
- $ this ->printer ->{$ name }(...$ arguments );
75
+ if (method_exists ($ this ->printer , $ method )) {
76
+ $ this ->printer ->{$ method }(...$ parameters );
75
77
76
78
return $ this ;
77
79
}
78
80
79
- throw new InvalidArgumentException ( " Method [ { $ name } ] not found on receipt printer object. " );
81
+ return $ this -> __macroCall ( $ method , $ parameters );
80
82
}
81
83
82
84
public function centerAlign (): self
You can’t perform that action at this time.
0 commit comments