File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
lib/internal/Magento/Framework/Amqp/Topology Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 11<?php
2+
3+ declare (strict_types=1 );
4+
25/**
36 * Copyright © Magento, Inc. All rights reserved.
47 * See COPYING.txt for license details.
58 */
69namespace Magento \Framework \Amqp \Topology ;
710
11+ use InvalidArgumentException ;
12+
813/**
914 * @deprecated 100.0.0
1015 * see: https://github.com/php-amqplib/php-amqplib/issues/405
@@ -17,22 +22,23 @@ trait ArgumentProcessor
1722 * @param array $arguments
1823 * @return array
1924 */
20- public function processArguments ($ arguments )
25+ public function processArguments ($ arguments ): array
2126 {
2227 $ output = [];
2328 foreach ($ arguments as $ key => $ value ) {
2429 if (is_array ($ value )) {
2530 $ output [$ key ] = ['A ' , $ value ];
26- } elseif (is_int ($ value )) {
27- $ output [$ key ] = ['I ' , $ value ];
31+ } elseif (is_numeric ($ value )) {
32+ $ output [$ key ] = ['I ' , ( int ) $ value ];
2833 } elseif (is_bool ($ value )) {
2934 $ output [$ key ] = ['t ' , $ value ];
3035 } elseif (is_string ($ value )) {
3136 $ output [$ key ] = ['S ' , $ value ];
3237 } else {
33- throw new \ InvalidArgumentException ('Unknown argument type ' . gettype ($ value ));
38+ throw new InvalidArgumentException ('Unknown argument type ' . gettype ($ value ));
3439 }
3540 }
41+
3642 return $ output ;
3743 }
3844}
You can’t perform that action at this time.
0 commit comments