Skip to content

Commit

Permalink
removed backslashes from native constants
Browse files Browse the repository at this point in the history
  • Loading branch information
maximgubar committed Jun 25, 2018
1 parent f1ed641 commit 0624a2a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Binary/Locator/FileSystemInsecureLocator.php
Expand Up @@ -21,9 +21,9 @@ class FileSystemInsecureLocator extends FileSystemLocator
*/
protected function generateAbsolutePath(string $root, string $path): ?string
{
if (false === mb_strpos($path, '..'.\DIRECTORY_SEPARATOR) &&
false === mb_strpos($path, \DIRECTORY_SEPARATOR.'..') &&
false !== file_exists($absolute = $root.\DIRECTORY_SEPARATOR.$path)
if (false === mb_strpos($path, '..'.DIRECTORY_SEPARATOR) &&
false === mb_strpos($path, DIRECTORY_SEPARATOR.'..') &&
false !== file_exists($absolute = $root.DIRECTORY_SEPARATOR.$path)
) {
return $absolute;
}
Expand Down
2 changes: 1 addition & 1 deletion Binary/Locator/FileSystemLocator.php
Expand Up @@ -60,7 +60,7 @@ public function locate(string $path): string
*/
protected function generateAbsolutePath(string $root, string $path): ?string
{
if (false !== $absolute = realpath($root.\DIRECTORY_SEPARATOR.$path)) {
if (false !== $absolute = realpath($root.DIRECTORY_SEPARATOR.$path)) {
return $absolute;
}

Expand Down
Expand Up @@ -127,7 +127,7 @@ private function getBundleResourcePaths(ContainerBuilder $container)
}

return array_map(function ($path) {
return $path.\DIRECTORY_SEPARATOR.'Resources'.\DIRECTORY_SEPARATOR.'public';
return $path.DIRECTORY_SEPARATOR.'Resources'.DIRECTORY_SEPARATOR.'public';
}, $paths);
}

Expand Down
4 changes: 2 additions & 2 deletions Tests/AbstractTest.php
Expand Up @@ -50,8 +50,8 @@ abstract class AbstractTest extends TestCase

protected function setUp()
{
$this->fixturesPath = realpath(__DIR__.\DIRECTORY_SEPARATOR.'Fixtures');
$this->temporaryPath = sys_get_temp_dir().\DIRECTORY_SEPARATOR.'liip_imagine_test';
$this->fixturesPath = realpath(__DIR__.DIRECTORY_SEPARATOR.'Fixtures');
$this->temporaryPath = sys_get_temp_dir().DIRECTORY_SEPARATOR.'liip_imagine_test';
$this->filesystem = new Filesystem();

if ($this->filesystem->exists($this->temporaryPath)) {
Expand Down

0 comments on commit 0624a2a

Please sign in to comment.