Browse Source

fixed som php storm warnings

develop
Robin Thoni 8 years ago
parent
commit
2e2c925d3e

+ 2
- 1
src/Utils/Controller/LuticateApplication.php View File

16
 use Ratchet\Http\HttpServer;
16
 use Ratchet\Http\HttpServer;
17
 use Ratchet\Server\IoServer;
17
 use Ratchet\Server\IoServer;
18
 use Ratchet\WebSocket\WsServer;
18
 use Ratchet\WebSocket\WsServer;
19
-use Illuminate\Database\Capsule\Manager as Capsule;
20
 
19
 
21
 class LuticateApplication implements MessageComponentInterface
20
 class LuticateApplication implements MessageComponentInterface
22
 {
21
 {
81
     
80
     
82
     public function setupRoutes()
81
     public function setupRoutes()
83
     {
82
     {
83
+        /** @noinspection PhpUnusedLocalVariableInspection */
84
         $app = $this;
84
         $app = $this;
85
+        /** @noinspection PhpIncludeInspection */
85
         require_once __DIR__ . '/../../../../../../app/routes.php';
86
         require_once __DIR__ . '/../../../../../../app/routes.php';
86
         
87
         
87
         $this->_router->setup();
88
         $this->_router->setup();

+ 5
- 1
src/Utils/DataAccess/LuRequest.php View File

12
 use GuzzleHttp\Client;
12
 use GuzzleHttp\Client;
13
 use GuzzleHttp\Exception\ClientException;
13
 use GuzzleHttp\Exception\ClientException;
14
 use GuzzleHttp\Exception\RequestException;
14
 use GuzzleHttp\Exception\RequestException;
15
+use Luticate\Utils\Business\LuBusinessException;
15
 use Luticate\Utils\Business\LuLog;
16
 use Luticate\Utils\Business\LuLog;
16
 use Luticate\Utils\Dbo\LuRequestDbo;
17
 use Luticate\Utils\Dbo\LuRequestDbo;
17
 
18
 
51
         }
52
         }
52
         if (!is_null($response)) {
53
         if (!is_null($response)) {
53
             $body = json_decode($response->getBody(), true);
54
             $body = json_decode($response->getBody(), true);
55
+            /**
56
+             * @var $request LuRequestDbo
57
+             */
54
             $request = LuRequestDbo::jsonDeserialize($body);
58
             $request = LuRequestDbo::jsonDeserialize($body);
55
             $request->setStatusCode($response->getStatusCode());
59
             $request->setStatusCode($response->getStatusCode());
56
             return $request;
60
             return $request;
65
     {
69
     {
66
         $response = LuRequest::request($method, $url, $get, $post, $headers);
70
         $response = LuRequest::request($method, $url, $get, $post, $headers);
67
         if ($response->getStatusCode() != 200) {
71
         if ($response->getStatusCode() != 200) {
68
-            abort($response->getStatusCode(), $response->getMessage());
72
+            throw new LuBusinessException($response->getMessage(), $response->getStatusCode());
69
         }
73
         }
70
         return $response->getData();
74
         return $response->getData();
71
     }
75
     }

+ 0
- 1
src/Utils/DataAccess/PgSqlDataAccess.php View File

259
                     "data_type" => $sp["data_type"],
259
                     "data_type" => $sp["data_type"],
260
                     "parameter_mode" => "OUT"
260
                     "parameter_mode" => "OUT"
261
                 );
261
                 );
262
-                $out_count = 1;
263
             }
262
             }
264
             return $sps;
263
             return $sps;
265
         }
264
         }

Loading…
Cancel
Save