File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
app/code/Magento/Fedex/Model/Source Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
-
3
2
/**
4
3
* Copyright © Magento, Inc. All rights reserved.
5
4
* See COPYING.txt for license details.
9
8
10
9
/**
11
10
* Fedex generic source implementation
12
- *
13
- * @author Magento Core Team <core@magentocommerce.com>
14
11
*/
15
12
class Generic implements \Magento \Framework \Data \OptionSourceInterface
16
13
{
@@ -44,9 +41,14 @@ public function toOptionArray()
44
41
$ configData = $ this ->_shippingFedex ->getCode ($ this ->_code );
45
42
$ arr = [];
46
43
if ($ configData ) {
47
- foreach ($ configData as $ code => $ title ) {
48
- $ arr [] = ['value ' => $ code , 'label ' => $ title ];
49
- }
44
+ $ arr = array_map (
45
+ function ($ code , $ title ) {
46
+ return [
47
+ 'value ' => $ code ,
48
+ 'label ' => $ title
49
+ ];
50
+ }, array_keys ($ configData ), $ configData
51
+ );
50
52
}
51
53
52
54
return $ arr ;
You can’t perform that action at this time.
0 commit comments