@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | |
| 71 | 71 | /** |
| 72 | 72 | * @param AbstractConnection $connection |
| 73 | - * @param $channel_id |
|
| 73 | + * @param integer|null $channel_id |
|
| 74 | 74 | * @throws \PhpAmqpLib\Exception\AMQPRuntimeException |
| 75 | 75 | */ |
| 76 | 76 | public function __construct(AbstractConnection $connection, $channel_id) |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | * @param $method_sig |
| 235 | 235 | * @param string $args |
| 236 | 236 | * @param null $pkt |
| 237 | - * @return null|\PhpAmqpLib\Wire\AMQPWriter |
|
| 237 | + * @return \PhpAmqpLib\Wire\AMQPWriter |
|
| 238 | 238 | */ |
| 239 | 239 | protected function prepare_method_frame($method_sig, $args = '', $pkt = null) |
| 240 | 240 | { |
@@ -408,6 +408,10 @@ discard block |
||
| 408 | 408 | $this->validate_frame($frame_type, 3, 'AMQP Content body'); |
| 409 | 409 | } |
| 410 | 410 | |
| 411 | + /** |
|
| 412 | + * @param integer $expected_type |
|
| 413 | + * @param string $expected_msg |
|
| 414 | + */ |
|
| 411 | 415 | protected function validate_frame($frame_type, $expected_type, $expected_msg) |
| 412 | 416 | { |
| 413 | 417 | if ($frame_type != $expected_type) { |
@@ -444,6 +448,9 @@ discard block |
||
| 444 | 448 | return mb_substr($payload, 4, mb_strlen($payload, 'ASCII') - 4, 'ASCII'); |
| 445 | 449 | } |
| 446 | 450 | |
| 451 | + /** |
|
| 452 | + * @param string $method_sig |
|
| 453 | + */ |
|
| 447 | 454 | protected function should_dispatch_method($allowed_methods, $method_sig) |
| 448 | 455 | { |
| 449 | 456 | $PROTOCOL_CONSTANTS_CLASS = self::$PROTOCOL_CONSTANTS_CLASS; |
@@ -453,6 +460,9 @@ discard block |
||
| 453 | 460 | || in_array($method_sig, $PROTOCOL_CONSTANTS_CLASS::$CLOSE_METHODS); |
| 454 | 461 | } |
| 455 | 462 | |
| 463 | + /** |
|
| 464 | + * @param string $method_sig |
|
| 465 | + */ |
|
| 456 | 466 | protected function maybe_wait_for_content($method_sig) |
| 457 | 467 | { |
| 458 | 468 | $PROTOCOL_CONSTANTS_CLASS = self::$PROTOCOL_CONSTANTS_CLASS; |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | use PhpAmqpLib\Exception\AMQPBasicCancelException; |
| 5 | 5 | use PhpAmqpLib\Exception\AMQPProtocolChannelException; |
| 6 | 6 | use PhpAmqpLib\Exception\AMQPRuntimeException; |
| 7 | -use PhpAmqpLib\Helper\MiscHelper; |
|
| 8 | 7 | use PhpAmqpLib\Message\AMQPMessage; |
| 9 | 8 | use PhpAmqpLib\Wire\AMQPReader; |
| 10 | 9 | use PhpAmqpLib\Wire\AMQPWriter; |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | } |
| 227 | 227 | |
| 228 | 228 | /** |
| 229 | - * @param $active |
|
| 229 | + * @param boolean $active |
|
| 230 | 230 | */ |
| 231 | 231 | protected function x_flow_ok($active) |
| 232 | 232 | { |
@@ -634,7 +634,7 @@ discard block |
||
| 634 | 634 | * Confirms a queue definition |
| 635 | 635 | * |
| 636 | 636 | * @param AMQPReader $args |
| 637 | - * @return array |
|
| 637 | + * @return string[] |
|
| 638 | 638 | */ |
| 639 | 639 | protected function queue_declare_ok($args) |
| 640 | 640 | { |
@@ -783,7 +783,7 @@ discard block |
||
| 783 | 783 | * |
| 784 | 784 | * @param string $delivery_tag |
| 785 | 785 | * @param bool $multiple |
| 786 | - * @param $handler |
|
| 786 | + * @param callable $handler |
|
| 787 | 787 | */ |
| 788 | 788 | protected function internal_ack_handler($delivery_tag, $multiple, $handler) |
| 789 | 789 | { |
@@ -801,14 +801,18 @@ discard block |
||
| 801 | 801 | } |
| 802 | 802 | |
| 803 | 803 | /** |
| 804 | - * @param array $array |
|
| 805 | - * @param $value |
|
| 804 | + * @param AMQPMessage[] $array |
|
| 805 | + * @param string $value |
|
| 806 | 806 | * @return mixed |
| 807 | 807 | */ |
| 808 | 808 | protected function get_keys_less_or_equal(array $array, $value) |
| 809 | 809 | { |
| 810 | 810 | $keys = array_reduce( |
| 811 | 811 | array_keys($array), |
| 812 | + |
|
| 813 | + /** |
|
| 814 | + * @param string $key |
|
| 815 | + */ |
|
| 812 | 816 | function ($keys, $key) use ($value) { |
| 813 | 817 | if (bccomp($key, $value, 0) <= 0) { |
| 814 | 818 | $keys[] = $key; |
@@ -1418,7 +1422,7 @@ discard block |
||
| 1418 | 1422 | /** |
| 1419 | 1423 | * Helper method to get a particular method from $this->publishedMessages, removes it from the array and returns it. |
| 1420 | 1424 | * |
| 1421 | - * @param $index |
|
| 1425 | + * @param string $index |
|
| 1422 | 1426 | * @return AMQPMessage |
| 1423 | 1427 | */ |
| 1424 | 1428 | protected function get_and_unset_message($index) |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | use PhpAmqpLib\Exception\AMQPBasicCancelException; |
| 5 | 5 | use PhpAmqpLib\Exception\AMQPProtocolChannelException; |
| 6 | 6 | use PhpAmqpLib\Exception\AMQPRuntimeException; |
| 7 | -use PhpAmqpLib\Helper\MiscHelper; |
|
| 8 | 7 | use PhpAmqpLib\Message\AMQPMessage; |
| 9 | 8 | use PhpAmqpLib\Wire\AMQPReader; |
| 10 | 9 | use PhpAmqpLib\Wire\AMQPWriter; |
@@ -435,7 +435,7 @@ discard block |
||
| 435 | 435 | } |
| 436 | 436 | |
| 437 | 437 | /** |
| 438 | - * @param $channel |
|
| 438 | + * @param string $channel |
|
| 439 | 439 | * @param $method_sig |
| 440 | 440 | * @param string $args |
| 441 | 441 | * @param null $pkt |
@@ -454,7 +454,7 @@ discard block |
||
| 454 | 454 | * @param $method_sig |
| 455 | 455 | * @param string $args |
| 456 | 456 | * @param AMQPWriter $pkt |
| 457 | - * @return null|AMQPWriter |
|
| 457 | + * @return AMQPWriter |
|
| 458 | 458 | */ |
| 459 | 459 | protected function prepare_channel_method_frame($channel, $method_sig, $args = '', $pkt = null) |
| 460 | 460 | { |
@@ -769,9 +769,9 @@ discard block |
||
| 769 | 769 | |
| 770 | 770 | /** |
| 771 | 771 | * @param $client_properties |
| 772 | - * @param $mechanism |
|
| 773 | - * @param $response |
|
| 774 | - * @param $locale |
|
| 772 | + * @param string $mechanism |
|
| 773 | + * @param AMQPWriter $response |
|
| 774 | + * @param string $locale |
|
| 775 | 775 | */ |
| 776 | 776 | protected function x_start_ok($client_properties, $mechanism, $response, $locale) |
| 777 | 777 | { |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace PhpAmqpLib\Connection; |
| 3 | 3 | |
| 4 | -use PhpAmqpLib\Channel\AbstractChannel; |
|
| 5 | 4 | use PhpAmqpLib\Channel\AMQPChannel; |
| 5 | +use PhpAmqpLib\Channel\AbstractChannel; |
|
| 6 | 6 | use PhpAmqpLib\Exception\AMQPProtocolConnectionException; |
| 7 | 7 | use PhpAmqpLib\Exception\AMQPRuntimeException; |
| 8 | 8 | use PhpAmqpLib\Exception\AMQPTimeoutException; |
@@ -4,8 +4,8 @@ |
||
| 4 | 4 | |
| 5 | 5 | namespace PhpAmqpLib\Helper\Protocol; |
| 6 | 6 | |
| 7 | -use PhpAmqpLib\Wire\AMQPWriter; |
|
| 8 | 7 | use PhpAmqpLib\Wire\AMQPReader; |
| 8 | +use PhpAmqpLib\Wire\AMQPWriter; |
|
| 9 | 9 | |
| 10 | 10 | class Protocol091 |
| 11 | 11 | { |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | |
| 56 | 56 | /** |
| 57 | 57 | * @param AMQPReader $reader |
| 58 | - * @return array |
|
| 58 | + * @return string[] |
|
| 59 | 59 | */ |
| 60 | 60 | public static function connectionSecureOk(AMQPReader $reader) |
| 61 | 61 | { |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | |
| 110 | 110 | /** |
| 111 | 111 | * @param AMQPReader $reader |
| 112 | - * @return array |
|
| 112 | + * @return string[] |
|
| 113 | 113 | */ |
| 114 | 114 | public static function connectionOpenOk(AMQPReader $reader) |
| 115 | 115 | { |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | |
| 180 | 180 | /** |
| 181 | 181 | * @param AMQPReader $reader |
| 182 | - * @return array |
|
| 182 | + * @return string[] |
|
| 183 | 183 | */ |
| 184 | 184 | public static function channelOpenOk(AMQPReader $reader) |
| 185 | 185 | { |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | |
| 202 | 202 | /** |
| 203 | 203 | * @param AMQPReader $reader |
| 204 | - * @return array |
|
| 204 | + * @return boolean[] |
|
| 205 | 205 | */ |
| 206 | 206 | public static function channelFlowOk(AMQPReader $reader) |
| 207 | 207 | { |
@@ -409,7 +409,7 @@ discard block |
||
| 409 | 409 | |
| 410 | 410 | /** |
| 411 | 411 | * @param AMQPReader $reader |
| 412 | - * @return array |
|
| 412 | + * @return string[] |
|
| 413 | 413 | */ |
| 414 | 414 | public static function queueDeclareOk(AMQPReader $reader) |
| 415 | 415 | { |
@@ -468,7 +468,7 @@ discard block |
||
| 468 | 468 | |
| 469 | 469 | /** |
| 470 | 470 | * @param AMQPReader $reader |
| 471 | - * @return array |
|
| 471 | + * @return string[] |
|
| 472 | 472 | */ |
| 473 | 473 | public static function queuePurgeOk(AMQPReader $reader) |
| 474 | 474 | { |
@@ -496,7 +496,7 @@ discard block |
||
| 496 | 496 | |
| 497 | 497 | /** |
| 498 | 498 | * @param AMQPReader $reader |
| 499 | - * @return array |
|
| 499 | + * @return string[] |
|
| 500 | 500 | */ |
| 501 | 501 | public static function queueDeleteOk(AMQPReader $reader) |
| 502 | 502 | { |
@@ -583,7 +583,7 @@ discard block |
||
| 583 | 583 | |
| 584 | 584 | /** |
| 585 | 585 | * @param AMQPReader $reader |
| 586 | - * @return array |
|
| 586 | + * @return string[] |
|
| 587 | 587 | */ |
| 588 | 588 | public static function basicConsumeOk(AMQPReader $reader) |
| 589 | 589 | { |
@@ -607,7 +607,7 @@ discard block |
||
| 607 | 607 | |
| 608 | 608 | /** |
| 609 | 609 | * @param AMQPReader $reader |
| 610 | - * @return array |
|
| 610 | + * @return string[] |
|
| 611 | 611 | */ |
| 612 | 612 | public static function basicCancelOk(AMQPReader $reader) |
| 613 | 613 | { |
@@ -702,7 +702,7 @@ discard block |
||
| 702 | 702 | |
| 703 | 703 | /** |
| 704 | 704 | * @param AMQPReader $reader |
| 705 | - * @return array |
|
| 705 | + * @return string[] |
|
| 706 | 706 | */ |
| 707 | 707 | public static function basicGetEmpty(AMQPReader $reader) |
| 708 | 708 | { |
@@ -521,7 +521,7 @@ |
||
| 521 | 521 | /** |
| 522 | 522 | * Sets the timeout (second) |
| 523 | 523 | * |
| 524 | - * @param $timeout |
|
| 524 | + * @param integer $timeout |
|
| 525 | 525 | */ |
| 526 | 526 | public function setTimeout($timeout) |
| 527 | 527 | { |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | /** |
| 132 | 132 | * Write multiple bits as an octet |
| 133 | 133 | * |
| 134 | - * @param $bits |
|
| 134 | + * @param boolean[] $bits |
|
| 135 | 135 | * @return $this |
| 136 | 136 | */ |
| 137 | 137 | public function write_bits($bits) |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | |
| 307 | 307 | /** |
| 308 | 308 | * @param int $n |
| 309 | - * @return array |
|
| 309 | + * @return integer[] |
|
| 310 | 310 | */ |
| 311 | 311 | private function splitIntoQuads($n) |
| 312 | 312 | { |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | /** |
| 185 | 185 | * @param $len |
| 186 | 186 | * @throws \PhpAmqpLib\Exception\AMQPIOException |
| 187 | - * @return mixed|string |
|
| 187 | + * @return string |
|
| 188 | 188 | */ |
| 189 | 189 | public function read($len) |
| 190 | 190 | { |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | } |
| 240 | 240 | |
| 241 | 241 | /** |
| 242 | - * @param $data |
|
| 242 | + * @param string $data |
|
| 243 | 243 | * @return mixed|void |
| 244 | 244 | * @throws \PhpAmqpLib\Exception\AMQPRuntimeException |
| 245 | 245 | * @throws \PhpAmqpLib\Exception\AMQPTimeoutException |
@@ -374,7 +374,7 @@ discard block |
||
| 374 | 374 | /** |
| 375 | 375 | * @param $sec |
| 376 | 376 | * @param $usec |
| 377 | - * @return int|mixed |
|
| 377 | + * @return integer |
|
| 378 | 378 | */ |
| 379 | 379 | public function select($sec, $usec) |
| 380 | 380 | { |
@@ -4,8 +4,8 @@ |
||
| 4 | 4 | |
| 5 | 5 | namespace PhpAmqpLib\Helper\Protocol; |
| 6 | 6 | |
| 7 | -use PhpAmqpLib\Wire\AMQPWriter; |
|
| 8 | 7 | use PhpAmqpLib\Wire\AMQPReader; |
| 8 | +use PhpAmqpLib\Wire\AMQPWriter; |
|
| 9 | 9 | |
| 10 | 10 | class Protocol091 |
| 11 | 11 | { |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | |
| 56 | 56 | /** |
| 57 | 57 | * @param AMQPReader $reader |
| 58 | - * @return array |
|
| 58 | + * @return string[] |
|
| 59 | 59 | */ |
| 60 | 60 | public static function connectionSecureOk(AMQPReader $reader) |
| 61 | 61 | { |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | |
| 110 | 110 | /** |
| 111 | 111 | * @param AMQPReader $reader |
| 112 | - * @return array |
|
| 112 | + * @return string[] |
|
| 113 | 113 | */ |
| 114 | 114 | public static function connectionOpenOk(AMQPReader $reader) |
| 115 | 115 | { |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | |
| 193 | 193 | /** |
| 194 | 194 | * @param AMQPReader $reader |
| 195 | - * @return array |
|
| 195 | + * @return boolean[] |
|
| 196 | 196 | */ |
| 197 | 197 | public static function channelFlowOk(AMQPReader $reader) |
| 198 | 198 | { |
@@ -353,7 +353,7 @@ discard block |
||
| 353 | 353 | |
| 354 | 354 | /** |
| 355 | 355 | * @param AMQPReader $reader |
| 356 | - * @return array |
|
| 356 | + * @return string[] |
|
| 357 | 357 | */ |
| 358 | 358 | public static function queueDeclareOk(AMQPReader $reader) |
| 359 | 359 | { |
@@ -412,7 +412,7 @@ discard block |
||
| 412 | 412 | |
| 413 | 413 | /** |
| 414 | 414 | * @param AMQPReader $reader |
| 415 | - * @return array |
|
| 415 | + * @return string[] |
|
| 416 | 416 | */ |
| 417 | 417 | public static function queuePurgeOk(AMQPReader $reader) |
| 418 | 418 | { |
@@ -440,7 +440,7 @@ discard block |
||
| 440 | 440 | |
| 441 | 441 | /** |
| 442 | 442 | * @param AMQPReader $reader |
| 443 | - * @return array |
|
| 443 | + * @return string[] |
|
| 444 | 444 | */ |
| 445 | 445 | public static function queueDeleteOk(AMQPReader $reader) |
| 446 | 446 | { |
@@ -525,7 +525,7 @@ discard block |
||
| 525 | 525 | |
| 526 | 526 | /** |
| 527 | 527 | * @param AMQPReader $reader |
| 528 | - * @return array |
|
| 528 | + * @return string[] |
|
| 529 | 529 | */ |
| 530 | 530 | public static function basicConsumeOk(AMQPReader $reader) |
| 531 | 531 | { |
@@ -549,7 +549,7 @@ discard block |
||
| 549 | 549 | |
| 550 | 550 | /** |
| 551 | 551 | * @param AMQPReader $reader |
| 552 | - * @return array |
|
| 552 | + * @return string[] |
|
| 553 | 553 | */ |
| 554 | 554 | public static function basicCancelOk(AMQPReader $reader) |
| 555 | 555 | { |
@@ -644,7 +644,7 @@ discard block |
||
| 644 | 644 | |
| 645 | 645 | /** |
| 646 | 646 | * @param AMQPReader $reader |
| 647 | - * @return array |
|
| 647 | + * @return string[] |
|
| 648 | 648 | */ |
| 649 | 649 | public static function basicGetEmpty(AMQPReader $reader) |
| 650 | 650 | { |
@@ -758,7 +758,7 @@ discard block |
||
| 758 | 758 | |
| 759 | 759 | /** |
| 760 | 760 | * @param AMQPReader $reader |
| 761 | - * @return array |
|
| 761 | + * @return string[] |
|
| 762 | 762 | */ |
| 763 | 763 | public static function fileConsumeOk(AMQPReader $reader) |
| 764 | 764 | { |
@@ -782,7 +782,7 @@ discard block |
||
| 782 | 782 | |
| 783 | 783 | /** |
| 784 | 784 | * @param AMQPReader $reader |
| 785 | - * @return array |
|
| 785 | + * @return string[] |
|
| 786 | 786 | */ |
| 787 | 787 | public static function fileCancelOk(AMQPReader $reader) |
| 788 | 788 | { |
@@ -806,7 +806,7 @@ discard block |
||
| 806 | 806 | |
| 807 | 807 | /** |
| 808 | 808 | * @param AMQPReader $reader |
| 809 | - * @return array |
|
| 809 | + * @return string[] |
|
| 810 | 810 | */ |
| 811 | 811 | public static function fileOpenOk(AMQPReader $reader) |
| 812 | 812 | { |
@@ -957,7 +957,7 @@ discard block |
||
| 957 | 957 | |
| 958 | 958 | /** |
| 959 | 959 | * @param AMQPReader $reader |
| 960 | - * @return array |
|
| 960 | + * @return string[] |
|
| 961 | 961 | */ |
| 962 | 962 | public static function streamConsumeOk(AMQPReader $reader) |
| 963 | 963 | { |
@@ -981,7 +981,7 @@ discard block |
||
| 981 | 981 | |
| 982 | 982 | /** |
| 983 | 983 | * @param AMQPReader $reader |
| 984 | - * @return array |
|
| 984 | + * @return string[] |
|
| 985 | 985 | */ |
| 986 | 986 | public static function streamCancelOk(AMQPReader $reader) |
| 987 | 987 | { |
@@ -1175,7 +1175,7 @@ discard block |
||
| 1175 | 1175 | |
| 1176 | 1176 | /** |
| 1177 | 1177 | * @param AMQPReader $reader |
| 1178 | - * @return array |
|
| 1178 | + * @return string[] |
|
| 1179 | 1179 | */ |
| 1180 | 1180 | public static function testIntegerOk(AMQPReader $reader) |
| 1181 | 1181 | { |
@@ -1201,7 +1201,7 @@ discard block |
||
| 1201 | 1201 | |
| 1202 | 1202 | /** |
| 1203 | 1203 | * @param AMQPReader $reader |
| 1204 | - * @return array |
|
| 1204 | + * @return string[] |
|
| 1205 | 1205 | */ |
| 1206 | 1206 | public static function testStringOk(AMQPReader $reader) |
| 1207 | 1207 | { |
@@ -1227,7 +1227,7 @@ discard block |
||
| 1227 | 1227 | |
| 1228 | 1228 | /** |
| 1229 | 1229 | * @param AMQPReader $reader |
| 1230 | - * @return array |
|
| 1230 | + * @return string[] |
|
| 1231 | 1231 | */ |
| 1232 | 1232 | public static function testTableOk(AMQPReader $reader) |
| 1233 | 1233 | { |
@@ -1249,7 +1249,7 @@ discard block |
||
| 1249 | 1249 | |
| 1250 | 1250 | /** |
| 1251 | 1251 | * @param AMQPReader $reader |
| 1252 | - * @return array |
|
| 1252 | + * @return string[] |
|
| 1253 | 1253 | */ |
| 1254 | 1254 | public static function testContentOk(AMQPReader $reader) |
| 1255 | 1255 | { |