change delimiter to curly braces
parent
e698636af4
commit
0298cdc60d
|
@ -123,7 +123,7 @@ abstract class BaseExcludeFilter
|
|||
protected function generatePattern($rule)
|
||||
{
|
||||
$negate = false;
|
||||
$pattern = '#';
|
||||
$pattern = '{';
|
||||
|
||||
if (strlen($rule) && $rule[0] === '!') {
|
||||
$negate = true;
|
||||
|
@ -143,6 +143,6 @@ abstract class BaseExcludeFilter
|
|||
// remove delimiters as well as caret (^) and dollar sign ($) from the regex
|
||||
$pattern .= substr(Finder\Glob::toRegex($rule), 2, -2) . '(?=$|/)';
|
||||
|
||||
return array($pattern . '#', $negate, false);
|
||||
return array($pattern . '}', $negate, false);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,8 +29,8 @@ class GitExcludeFilterTest extends \PHPUnit_Framework_TestCase
|
|||
public function patterns()
|
||||
{
|
||||
return array(
|
||||
array('app/config/parameters.yml', array('#(?=[^\.])app/(?=[^\.])config/(?=[^\.])parameters\.yml(?=$|/)#', false, false)),
|
||||
array('!app/config/parameters.yml', array('#(?=[^\.])app/(?=[^\.])config/(?=[^\.])parameters\.yml(?=$|/)#', true, false)),
|
||||
array('app/config/parameters.yml', array('{(?=[^\.])app/(?=[^\.])config/(?=[^\.])parameters\.yml(?=$|/)}', false, false)),
|
||||
array('!app/config/parameters.yml', array('{(?=[^\.])app/(?=[^\.])config/(?=[^\.])parameters\.yml(?=$|/)}', true, false)),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue