Skip to content

Commit 2af0aae

Browse files
Merge branch '2.3' into 2.6
* 2.3: [2.3][Debug] Fix fatal-errors handling on HHVM Standardize the name of the exception variables [2.3] Static Code Analysis for Components Remove duplicated paths Conflicts: src/Symfony/Component/Debug/ErrorHandler.php src/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php src/Symfony/Component/Security/Acl/Dbal/AclProvider.php src/Symfony/Component/Security/Core/Authentication/Provider/UserAuthenticationProvider.php
2 parents 6f9ad98 + 70545d2 commit 2af0aae

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Tests/FinderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ public function testSort($adapter)
272272
public function testFilter($adapter)
273273
{
274274
$finder = $this->buildFinder($adapter);
275-
$this->assertSame($finder, $finder->filter(function (\SplFileInfo $f) { return preg_match('/test/', $f) > 0; }));
275+
$this->assertSame($finder, $finder->filter(function (\SplFileInfo $f) { return false !== strpos($f, 'test'); }));
276276
$this->assertIterator($this->toAbsolute(array('test.php', 'test.py')), $finder->in(self::$tmpDir)->getIterator());
277277
}
278278

Tests/Iterator/CustomFilterIteratorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function getAcceptData()
3939
{
4040
return array(
4141
array(array(function (\SplFileInfo $fileinfo) { return false; }), array()),
42-
array(array(function (\SplFileInfo $fileinfo) { return preg_match('/^test/', $fileinfo) > 0; }), array('test.php', 'test.py')),
42+
array(array(function (\SplFileInfo $fileinfo) { return 0 === strpos($fileinfo, 'test'); }), array('test.php', 'test.py')),
4343
array(array('is_dir'), array()),
4444
);
4545
}

Tests/Iterator/MockSplFileInfo.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function __construct($param)
5151
public function isFile()
5252
{
5353
if (null === $this->type) {
54-
return preg_match('/file/', $this->getFilename());
54+
return false !== strpos($this->getFilename(), 'file');
5555
};
5656

5757
return self::TYPE_FILE === $this->type;
@@ -60,7 +60,7 @@ public function isFile()
6060
public function isDir()
6161
{
6262
if (null === $this->type) {
63-
return preg_match('/directory/', $this->getFilename());
63+
return false !== strpos($this->getFilename(), 'directory');
6464
}
6565

6666
return self::TYPE_DIRECTORY === $this->type;

0 commit comments

Comments
 (0)