Skip to content

Commit 6b8dc54

Browse files
author
Magento CICD
authored
Merge 5405209 into pr-develop
2 parents 41f435a + 5405209 commit 6b8dc54

File tree

17 files changed

+475
-199
lines changed

17 files changed

+475
-199
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ atlassian*
2525
/.grunt
2626
/Gruntfile.js
2727
/package.json
28+
/.php_cs
29+
/.php_cs.cache
2830
/grunt-config.json
2931
/dev/tools/grunt/configs/local-themes.js
3032

.htaccess

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@
222222
order allow,deny
223223
deny from all
224224
</Files>
225-
<Files .php_cs>
225+
<Files .php_cs.dist>
226226
order allow,deny
227227
deny from all
228228
</Files>

.htaccess.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@
198198
order allow,deny
199199
deny from all
200200
</Files>
201-
<Files .php_cs>
201+
<Files .php_cs.dist>
202202
order allow,deny
203203
deny from all
204204
</Files>

.php_cs

Lines changed: 0 additions & 52 deletions
This file was deleted.

.php_cs.dist

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<?php
2+
/**
3+
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
/**
8+
* Pre-commit hook installation:
9+
* vendor/bin/static-review.php hook:install dev/tools/Magento/Tools/StaticReview/pre-commit .git/hooks/pre-commit
10+
*/
11+
$finder = PhpCsFixer\Finder::create()
12+
->name('*.phtml')
13+
->exclude('dev/tests/functional/generated')
14+
->exclude('dev/tests/functional/var')
15+
->exclude('dev/tests/functional/vendor')
16+
->exclude('dev/tests/integration/tmp')
17+
->exclude('dev/tests/integration/var')
18+
->exclude('lib/internal/Cm')
19+
->exclude('lib/internal/Credis')
20+
->exclude('lib/internal/Less')
21+
->exclude('lib/internal/LinLibertineFont')
22+
->exclude('pub/media')
23+
->exclude('pub/static')
24+
->exclude('setup/vendor')
25+
->exclude('var');
26+
27+
return PhpCsFixer\Config::create()
28+
->setFinder($finder)
29+
->setRules([
30+
'@PSR2' => true,
31+
'array_syntax' => ['syntax' => 'short'],
32+
'concat_space' => ['spacing' => 'one'],
33+
'include' => true,
34+
'new_with_braces' => true,
35+
'no_empty_statement' => true,
36+
'no_extra_consecutive_blank_lines' => true,
37+
'no_leading_import_slash' => true,
38+
'no_leading_namespace_whitespace' => true,
39+
'no_multiline_whitespace_around_double_arrow' => true,
40+
'no_multiline_whitespace_before_semicolons' => true,
41+
'no_singleline_whitespace_before_semicolons' => true,
42+
'no_trailing_comma_in_singleline_array' => true,
43+
'no_unused_imports' => true,
44+
'no_whitespace_in_blank_line' => true,
45+
'object_operator_without_whitespace' => true,
46+
'ordered_imports' => true,
47+
'standardize_not_equals' => true,
48+
'ternary_operator_spaces' => true,
49+
]);
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
"Read Details","Read Details"
22
"Mark as Read","Mark as Read"
33
"Are you sure?","Are you sure?"
4-
Remove,Remove
4+
"Remove","Remove"
55
"Messages Inbox","Messages Inbox"
66
"You have %1 new system messages","You have %1 new system messages"
77
"You have %1 new system message","You have %1 new system message"
88
"Incoming Message","Incoming Message"
9-
close,close
10-
Notifications,Notifications
9+
"close","close"
10+
"Notifications","Notifications"
1111
"The message has been marked as Read.","The message has been marked as Read."
1212
"We couldn't mark the notification as Read because of an error.","We couldn't mark the notification as Read because of an error."
1313
"Please select messages.","Please select messages."
@@ -20,10 +20,10 @@ Notifications,Notifications
2020
"6 Hours","6 Hours"
2121
"12 Hours","12 Hours"
2222
"24 Hours","24 Hours"
23-
critical,critical
24-
major,major
25-
minor,minor
26-
notice,notice
23+
"critical","critical"
24+
"major","major"
25+
"minor","minor"
26+
"notice","notice"
2727
"Wrong message type","Wrong message type"
2828
"Wrong notification ID specified.","Wrong notification ID specified."
2929
"{{base_url}} is not recommended to use in a production environment to declare the Base Unsecure URL / Base Secure URL. We highly recommend changing this value in your Magento <a href=""%1"">configuration</a>.","{{base_url}} is not recommended to use in a production environment to declare the Base Unsecure URL / Base Secure URL. We highly recommend changing this value in your Magento <a href=""%1"">configuration</a>."
@@ -33,7 +33,7 @@ notice,notice
3333
"Synchronization of media storages has been completed.","Synchronization of media storages has been completed."
3434
"Your web server is set up incorrectly and allows unauthorized access to sensitive files. Please contact your hosting provider.","Your web server is set up incorrectly and allows unauthorized access to sensitive files. Please contact your hosting provider."
3535
"Close popup","Close popup"
36-
Close,Close
36+
"Close","Close"
3737
"System Messages:","System Messages:"
3838
"Critical System Messages","Critical System Messages"
3939
"Major System Messages","Major System Messages"
@@ -45,7 +45,7 @@ Close,Close
4545
"Use HTTPS to Get Feed","Use HTTPS to Get Feed"
4646
"Update Frequency","Update Frequency"
4747
"Last Update","Last Update"
48-
Severity,Severity
48+
"Severity","Severity"
4949
"Date Added","Date Added"
50-
Message,Message
51-
Actions,Actions
50+
"Message","Message"
51+
"Actions","Actions"

app/code/Magento/Checkout/Block/Cart/AbstractCart.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class AbstractCart extends \Magento\Framework\View\Element\Template
4040
protected $_customerSession;
4141

4242
/**
43-
* @var \Magento\Customer\Model\Session
43+
* @var \Magento\Checkout\Model\Session
4444
*/
4545
protected $_checkoutSession;
4646

app/code/Magento/Directory/Setup/InstallData.php

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,28 @@ public function install(ModuleDataSetupInterface $setup, ModuleContextInterface
808808
['BR', 'SP', 'São Paulo'],
809809
['BR', 'SE', 'Sergipe'],
810810
['BR', 'TO', 'Tocantins'],
811-
['BR', 'DF', 'Distrito Federal']
811+
['BR', 'DF', 'Distrito Federal'],
812+
['HR', 'HR-01', 'Zagrebačka županija'],
813+
['HR', 'HR-02', 'Krapinsko-zagorska županija'],
814+
['HR', 'HR-03', 'Sisačko-moslavačka županija'],
815+
['HR', 'HR-04', 'Karlovačka županija'],
816+
['HR', 'HR-05', 'Varaždinska županija'],
817+
['HR', 'HR-06', 'Koprivničko-križevačka županija'],
818+
['HR', 'HR-07', 'Bjelovarsko-bilogorska županija'],
819+
['HR', 'HR-08', 'Primorsko-goranska županija'],
820+
['HR', 'HR-09', 'Ličko-senjska županija'],
821+
['HR', 'HR-10', 'Virovitičko-podravska županija'],
822+
['HR', 'HR-11', 'Požeško-slavonska županija'],
823+
['HR', 'HR-12', 'Brodsko-posavska županija'],
824+
['HR', 'HR-13', 'Zadarska županija'],
825+
['HR', 'HR-14', 'Osječko-baranjska županija'],
826+
['HR', 'HR-15', 'Šibensko-kninska županija'],
827+
['HR', 'HR-16', 'Vukovarsko-srijemska županija'],
828+
['HR', 'HR-17', 'Splitsko-dalmatinska županija'],
829+
['HR', 'HR-18', 'Istarska županija'],
830+
['HR', 'HR-19', 'Dubrovačko-neretvanska županija'],
831+
['HR', 'HR-20', 'Međimurska županija'],
832+
['HR', 'HR-21', 'Grad Zagreb']
812833
];
813834

814835
foreach ($data as $row) {

app/code/Magento/Directory/etc/zip_codes.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,9 @@
277277
</zip>
278278
<zip countryCode="MT">
279279
<codes>
280-
<code id="pattern_1" active="true" example="ABC 123">^[a-zA-Z]{3}\s[0-9]{3}$</code>
281-
<code id="pattern_2" active="true" example="ABC 12">^[a-zA-Z]{3}\s[0-9]{2}$</code>
280+
<code id="pattern_1" active="true" example="ABC 1234">^[a-zA-Z]{3}\s[0-9]{4}$</code>
281+
<code id="pattern_2" active="true" example="ABC 123">^[a-zA-Z]{3}\s[0-9]{3}$</code>
282+
<code id="pattern_3" active="true" example="ABC 12">^[a-zA-Z]{3}\s[0-9]{2}$</code>
282283
</codes>
283284
</zip>
284285
<zip countryCode="MH">

app/code/Magento/Eav/Model/Entity/Attribute/Backend/ArrayBackend.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ public function beforeSave($object)
2323
$attributeCode = $this->getAttribute()->getAttributeCode();
2424
$data = $object->getData($attributeCode);
2525
if (is_array($data)) {
26-
$data = array_filter($data);
26+
$data = array_filter($data, function ($value) {
27+
return $value === '0' || !empty($value);
28+
});
2729
$object->setData($attributeCode, implode(',', $data));
2830
}
2931

0 commit comments

Comments
 (0)