File tree 1 file changed +10
-4
lines changed
lib/internal/Magento/Framework/Amqp/Topology 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
+
3
+ declare (strict_types=1 );
4
+
2
5
/**
3
6
* Copyright © Magento, Inc. All rights reserved.
4
7
* See COPYING.txt for license details.
5
8
*/
6
9
namespace Magento \Framework \Amqp \Topology ;
7
10
11
+ use InvalidArgumentException ;
12
+
8
13
/**
9
14
* @deprecated 100.0.0
10
15
* see: https://github.com/php-amqplib/php-amqplib/issues/405
@@ -17,22 +22,23 @@ trait ArgumentProcessor
17
22
* @param array $arguments
18
23
* @return array
19
24
*/
20
- public function processArguments ($ arguments )
25
+ public function processArguments ($ arguments ): array
21
26
{
22
27
$ output = [];
23
28
foreach ($ arguments as $ key => $ value ) {
24
29
if (is_array ($ value )) {
25
30
$ 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 ];
28
33
} elseif (is_bool ($ value )) {
29
34
$ output [$ key ] = ['t ' , $ value ];
30
35
} elseif (is_string ($ value )) {
31
36
$ output [$ key ] = ['S ' , $ value ];
32
37
} else {
33
- throw new \ InvalidArgumentException ('Unknown argument type ' . gettype ($ value ));
38
+ throw new InvalidArgumentException ('Unknown argument type ' . gettype ($ value ));
34
39
}
35
40
}
41
+
36
42
return $ output ;
37
43
}
38
44
}
You can’t perform that action at this time.
0 commit comments