1313use RedisClient \Cluster \ClusterMap ;
1414use RedisClient \Command \Response \ResponseParser ;
1515use RedisClient \Exception \AskResponseException ;
16+ use RedisClient \Exception \CommandNotFoundException ;
1617use RedisClient \Exception \ErrorResponseException ;
18+ use RedisClient \Exception \InvalidArgumentException ;
1719use RedisClient \Exception \MovedResponseException ;
1820use RedisClient \Exception \TryAgainResponseException ;
1921use RedisClient \Pipeline \Pipeline ;
@@ -166,8 +168,8 @@ protected function executeProtocolCommand(ProtocolInterface $Protocol, array $co
166168 } else {
167169 $ this ->ClusterMap ->addCluster ($ response ->getSlot (), $ response ->getServer ());
168170 }
169- $ Protocol = $ this ->ClusterMap ->getProtocolByServer ($ response ->getServer ());
170- return $ this ->executeProtocolCommand ($ Protocol , $ command , $ params );
171+ $ this -> Protocol = $ this ->ClusterMap ->getProtocolByServer ($ response ->getServer ());
172+ return $ this ->executeProtocolCommand ($ this -> Protocol , $ command , $ params );
171173 }
172174 if ($ response instanceof AskResponseException) {
173175 $ config = $ this ->getConfig ();
@@ -251,7 +253,7 @@ protected function getStructure(array $command, array $params = null) {
251253 /**
252254 * @param null|Pipeline|\Closure $Pipeline
253255 * @return mixed|Pipeline
254- * @throws \ InvalidArgumentException
256+ * @throws InvalidArgumentException
255257 */
256258 public function pipeline ($ Pipeline = null ) {
257259 if (!$ Pipeline ) {
@@ -263,7 +265,7 @@ public function pipeline($Pipeline = null) {
263265 if ($ Pipeline instanceof PipelineInterface) {
264266 return $ this ->executePipeline ($ Pipeline );
265267 }
266- throw new \ InvalidArgumentException ();
268+ throw new InvalidArgumentException ();
267269 }
268270
269271 /**
@@ -342,7 +344,7 @@ public function __call($name , array $arguments) {
342344 if ($ method = $ this ->getMethodNameForReservedWord ($ name )) {
343345 return call_user_func_array ([$ this , $ method ], $ arguments );
344346 }
345- throw new \ Exception ('Call to undefined method ' . static ::class. ':: ' . $ name );
347+ throw new CommandNotFoundException ('Call to undefined method ' . static ::class. ':: ' . $ name );
346348 }
347349
348350}
0 commit comments