updated packages
This commit is contained in:
@@ -59,7 +59,7 @@ class AddAnnotatedClassesToCachePass implements CompilerPassInterface
|
||||
*/
|
||||
private function expandClasses(array $patterns, array $classes)
|
||||
{
|
||||
$expanded = array();
|
||||
$expanded = [];
|
||||
|
||||
// Explicit classes declared in the patterns are returned directly
|
||||
foreach ($patterns as $key => $pattern) {
|
||||
@@ -85,7 +85,7 @@ class AddAnnotatedClassesToCachePass implements CompilerPassInterface
|
||||
|
||||
private function getClassesInComposerClassMaps()
|
||||
{
|
||||
$classes = array();
|
||||
$classes = [];
|
||||
|
||||
foreach (spl_autoload_functions() as $function) {
|
||||
if (!\is_array($function)) {
|
||||
@@ -106,14 +106,14 @@ class AddAnnotatedClassesToCachePass implements CompilerPassInterface
|
||||
|
||||
private function patternsToRegexps($patterns)
|
||||
{
|
||||
$regexps = array();
|
||||
$regexps = [];
|
||||
|
||||
foreach ($patterns as $pattern) {
|
||||
// Escape user input
|
||||
$regex = preg_quote(ltrim($pattern, '\\'));
|
||||
|
||||
// Wildcards * and **
|
||||
$regex = strtr($regex, array('\\*\\*' => '.*?', '\\*' => '[^\\\\]*?'));
|
||||
$regex = strtr($regex, ['\\*\\*' => '.*?', '\\*' => '[^\\\\]*?']);
|
||||
|
||||
// If this class does not end by a slash, anchor the end
|
||||
if ('\\' !== substr($regex, -1)) {
|
||||
|
||||
Reference in New Issue
Block a user