Explorar el Código

Fully qualified add to use

Joanhey hace 6 años
padre
commit
982ed69608

+ 1 - 1
Connection/AsyncTcpConnection.php

@@ -16,7 +16,7 @@ namespace Workerman\Connection;
 use Workerman\Events\EventInterface;
 use Workerman\Lib\Timer;
 use Workerman\Worker;
-use Exception;
+use \Exception;
 
 /**
  * AsyncTcpConnection.

+ 1 - 1
Connection/AsyncUdpConnection.php

@@ -15,7 +15,7 @@ namespace Workerman\Connection;
 
 use Workerman\Events\EventInterface;
 use Workerman\Worker;
-use Exception;
+use \Exception;
 
 /**
  * AsyncTcpConnection.

+ 1 - 1
Connection/TcpConnection.php

@@ -15,7 +15,7 @@ namespace Workerman\Connection;
 
 use Workerman\Events\EventInterface;
 use Workerman\Worker;
-use Exception;
+use \Exception;
 
 /**
  * TcpConnection.

+ 1 - 1
Events/Ev.php

@@ -13,7 +13,7 @@
 namespace Workerman\Events;
 
 use Workerman\Worker;
-use EvWatcher;
+use \EvWatcher;
 
 /**
  * ev eventloop

+ 1 - 1
Lib/Timer.php

@@ -15,7 +15,7 @@ namespace Workerman\Lib;
 
 use Workerman\Events\EventInterface;
 use Workerman\Worker;
-use Exception;
+use \Exception;
 
 /**
  * Timer.

+ 3 - 3
Worker.php

@@ -20,7 +20,7 @@ use Workerman\Connection\TcpConnection;
 use Workerman\Connection\UdpConnection;
 use Workerman\Lib\Timer;
 use Workerman\Events\Select;
-use Exception;
+use \Exception;
 
 /**
  * Worker class
@@ -2153,7 +2153,7 @@ class Worker
         static::$_pidMap[$this->workerId]  = array();
 
         // Get autoload root path.
-        $backtrace                = \debug_backtrace();
+        $backtrace               = \debug_backtrace();
         $this->_autoloadRootPath = \dirname($backtrace[0]['file']);
 
         // Turn reusePort on.
@@ -2275,7 +2275,7 @@ class Worker
             }
 
             if (!isset(static::$_builtinTransports[$this->transport])) {
-                throw new \Exception('Bad worker->transport ' . \var_export($this->transport, true));
+                throw new Exception('Bad worker->transport ' . \var_export($this->transport, true));
             }
         } else {
             $this->transport = $scheme;