File tree 2 files changed +9
-10
lines changed
framework/Magento/TestFramework/Dependency
testsuite/Magento/Test/Integrity
2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
2
/**
3
- * Copyright © Magento, Inc. All rights reserved.
4
- * See COPYING.txt for license details .
3
+ * Copyright 2013 Adobe
4
+ * All Rights Reserved .
5
5
*/
6
6
declare (strict_types=1 );
7
7
@@ -178,11 +178,10 @@ private function getRoutesWhitelist(): array
178
178
private function caseClassesAndIdentifiers ($ currentModule , $ file , &$ contents )
179
179
{
180
180
$ pattern = '~\b(?<class>(?<module>( '
181
- . implode (
182
- '[_ \\\\]| ' ,
183
- Files::init ()->getNamespaces ()
184
- )
185
- . '(?<delimiter>[_ \\\\]))[a-zA-Z0-9]{2,}) '
181
+ .'(?: '
182
+ . implode ('| ' , Files::init ()->getNamespaces ())
183
+ . ') '
184
+ . '(?<delimiter>[_ \\\\]))[A-Z]{1,}[a-zA-Z0-9]{1,}) '
186
185
. '(?<class_inside_module> \\4[a-zA-Z0-9_ \\\\]{2,})?)\b '
187
186
. '(?:::(?<module_scoped_key>[A-Za-z0-9_/.]+)[ \'"])?~ ' ;
188
187
Original file line number Diff line number Diff line change 1
1
<?php
2
2
/**
3
- * Copyright © Magento, Inc. All rights reserved.
4
- * See COPYING.txt for license details .
3
+ * Copyright 2013 Adobe
4
+ * All Rights Reserved .
5
5
*/
6
6
namespace Magento \Test \Integrity ;
7
7
@@ -967,7 +967,7 @@ protected static function _prepareMapLayoutBlocks()
967
967
$ area = $ matches ['area ' ];
968
968
self ::$ _mapLayoutBlocks [$ area ] = self ::$ _mapLayoutBlocks [$ area ] ?? [];
969
969
}
970
- if (preg_match ('/(?<namespace>[A-Z][a -z]+)[_\/ \\\\](?<module>[A-Z][a-zA-Z]+)/ ' , $ file , $ matches )) {
970
+ if (preg_match ('/(?<namespace>[A-Z][A-Za -z]+)[_\/ \\\\](?<module>[A-Z][a-zA-Z]+)/ ' , $ file , $ matches )) {
971
971
$ module = $ matches ['namespace ' ] . '\\' . $ matches ['module ' ];
972
972
$ xml = simplexml_load_file ($ file );
973
973
foreach ((array )$ xml ->xpath ('//container | //block ' ) as $ element ) {
You can’t perform that action at this time.
0 commit comments