33declare (strict_types=1 );
44
55namespace Yiisoft \Log \Target \Syslog {
6-
76 function openlog (...$ args )
87 {
98 return \Yiisoft \Log \Target \Syslog \Tests \SyslogTargetTest::openlog ($ args );
@@ -21,7 +20,6 @@ function closelog(...$args)
2120}
2221
2322namespace Yiisoft \Log \Target \Syslog \Tests {
24-
2523 use Psr \Log \LogLevel ;
2624 use Yiisoft \Log \LogRuntimeException ;
2725 use Yiisoft \Log \Target \Syslog \SyslogTarget ;
@@ -122,19 +120,19 @@ public function testExport(): void
122120
123121 $ syslogTarget ->expects ($ this ->once ())->method ('closelog ' );
124122
125- static ::$ functions ['openlog ' ] = function ($ arguments ) use ($ syslogTarget ) {
123+ self ::$ functions ['openlog ' ] = function ($ arguments ) use ($ syslogTarget ) {
126124 $ this ->assertCount (3 , $ arguments );
127125 [$ identity , $ option , $ facility ] = $ arguments ;
128126 return $ syslogTarget ->openlog ($ identity , $ option , $ facility );
129127 };
130128
131- static ::$ functions ['syslog ' ] = function ($ arguments ) use ($ syslogTarget ) {
129+ self ::$ functions ['syslog ' ] = function ($ arguments ) use ($ syslogTarget ) {
132130 $ this ->assertCount (2 , $ arguments );
133131 [$ priority , $ message ] = $ arguments ;
134132 return $ syslogTarget ->syslog ($ priority , $ message );
135133 };
136134
137- static ::$ functions ['closelog ' ] = function ($ arguments ) use ($ syslogTarget ) {
135+ self ::$ functions ['closelog ' ] = function ($ arguments ) use ($ syslogTarget ) {
138136 $ this ->assertCount (0 , $ arguments );
139137 return $ syslogTarget ->closelog ();
140138 };
@@ -165,17 +163,17 @@ public function testFailedExport(): void
165163 [LogLevel::INFO , 'test ' , []],
166164 ]);
167165
168- static ::$ functions ['openlog ' ] = function ($ arguments ) use ($ syslogTarget ) {
166+ self ::$ functions ['openlog ' ] = function ($ arguments ) use ($ syslogTarget ) {
169167 $ this ->assertCount (3 , $ arguments );
170168 [$ identity , $ option , $ facility ] = $ arguments ;
171169 return $ syslogTarget ->openlog ($ identity , $ option , $ facility );
172170 };
173- static ::$ functions ['syslog ' ] = function ($ arguments ) use ($ syslogTarget ) {
171+ self ::$ functions ['syslog ' ] = function ($ arguments ) use ($ syslogTarget ) {
174172 $ this ->assertCount (2 , $ arguments );
175173 [$ priority , $ message ] = $ arguments ;
176174 return $ syslogTarget ->syslog ($ priority , $ message );
177175 };
178- static ::$ functions ['closelog ' ] = function ($ arguments ) use ($ syslogTarget ) {
176+ self ::$ functions ['closelog ' ] = function ($ arguments ) use ($ syslogTarget ) {
179177 $ this ->assertCount (0 , $ arguments );
180178 return $ syslogTarget ->closelog ();
181179 };
@@ -187,15 +185,16 @@ public function testFailedExport(): void
187185 /**
188186 * @param $name
189187 * @param $arguments
188+ *
190189 * @return mixed
191190 */
192191 public static function __callStatic ($ name , $ arguments )
193192 {
194- if (isset (static ::$ functions [$ name ]) && is_callable (static ::$ functions [$ name ])) {
193+ if (isset (self ::$ functions [$ name ]) && is_callable (self ::$ functions [$ name ])) {
195194 $ arguments = $ arguments [0 ] ?? $ arguments ;
196- return forward_static_call (static ::$ functions [$ name ], $ arguments );
195+ return forward_static_call (self ::$ functions [$ name ], $ arguments );
197196 }
198- static ::fail ("Function ' $ name' has not implemented yet! " );
197+ self ::fail ("Function ' $ name' has not implemented yet! " );
199198 }
200199
201200 /**
0 commit comments