Permalink
Browse files

fixed exception message in set_return_listener

  • Loading branch information...
1 parent 73ebe30 commit 12172d2143b3358c3b5ef22d852b738fb23006ad @brikou brikou committed Oct 12, 2012
Showing with 17 additions and 20 deletions.
  1. +17 −20 PhpAmqpLib/Channel/AMQPChannel.php
@@ -602,7 +602,6 @@ public function basic_publish($msg, $exchange="", $routing_key="",
$msg->body);
}
-
/**
* specify quality of service
*/
@@ -612,11 +611,10 @@ public function basic_qos($prefetch_size, $prefetch_count, $a_global)
$this->send_method_frame(array(60, 10), $args);
return $this->wait(array(
- "60,11" //Channel.basic_qos_ok
- ));
+ "60,11" //Channel.basic_qos_ok
+ ));
}
-
/**
* confirm the requested qos
*/
@@ -654,12 +652,12 @@ protected function basic_return($args, $msg)
if ( !is_null($this->basic_return_callback )) {
call_user_func_array($this->basic_return_callback, array(
- $reply_code,
- $reply_text,
- $exchange,
- $routing_key,
- $msg,
- ));
+ $reply_code,
+ $reply_text,
+ $exchange,
+ $routing_key,
+ $msg,
+ ));
} elseif ($this->debug) {
MiscHelper::debug_msg("Skipping unhandled basic_return message");
}
@@ -669,8 +667,8 @@ public function tx_commit()
$this->send_method_frame(array(90, 20));
return $this->wait(array(
- "90,21" //Channel.tx_commit_ok
- ));
+ "90,21" //Channel.tx_commit_ok
+ ));
}
/**
@@ -680,7 +678,6 @@ protected function tx_commit_ok($args)
{
}
-
/**
* abandon the current transaction
*/
@@ -689,8 +686,8 @@ public function tx_rollback()
$this->send_method_frame(array(90, 30));
return $this->wait(array(
- "90,31" //Channel.tx_rollback_ok
- ));
+ "90,31" //Channel.tx_rollback_ok
+ ));
}
/**
@@ -708,8 +705,8 @@ public function tx_select()
$this->send_method_frame(array(90, 10));
return $this->wait(array(
- "90,11" //Channel.tx_select_ok
- ));
+ "90,11" //Channel.tx_select_ok
+ ));
}
/**
@@ -735,9 +732,9 @@ protected function getTicket($ticket)
*/
public function set_return_listener($callback)
{
- if(!is_callable($callback))
- throw new \InvalidArgumentException('$callback should be callable.');
+ if (!is_callable($callback)) {
+ throw new \InvalidArgumentException("$callback should be callable.");
+ }
$this->basic_return_callback = $callback;
}
-
}

0 comments on commit 12172d2

Please sign in to comment.