Mercurial > hg > isophonics-drupal-site
diff vendor/symfony/finder/Tests/Iterator/RealIteratorTestCase.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | c2387f117808 |
children |
line wrap: on
line diff
--- a/vendor/symfony/finder/Tests/Iterator/RealIteratorTestCase.php Tue Jul 10 15:07:59 2018 +0100 +++ b/vendor/symfony/finder/Tests/Iterator/RealIteratorTestCase.php Thu Feb 28 13:21:36 2019 +0000 @@ -18,9 +18,9 @@ public static function setUpBeforeClass() { - self::$tmpDir = realpath(sys_get_temp_dir()).DIRECTORY_SEPARATOR.'symfony_finder'; + self::$tmpDir = realpath(sys_get_temp_dir()).\DIRECTORY_SEPARATOR.'symfony_finder'; - self::$files = array( + self::$files = [ '.git/', '.foo/', '.foo/.bar', @@ -33,7 +33,7 @@ 'toto/', 'toto/.git/', 'foo bar', - ); + ]; self::$files = self::toAbsolute(self::$files); @@ -44,7 +44,7 @@ } foreach (self::$files as $file) { - if (DIRECTORY_SEPARATOR === $file[strlen($file) - 1]) { + if (\DIRECTORY_SEPARATOR === $file[\strlen($file) - 1]) { mkdir($file); } else { touch($file); @@ -84,24 +84,24 @@ * Without the call to setUpBeforeClass() property can be null. */ if (!self::$tmpDir) { - self::$tmpDir = realpath(sys_get_temp_dir()).DIRECTORY_SEPARATOR.'symfony_finder'; + self::$tmpDir = realpath(sys_get_temp_dir()).\DIRECTORY_SEPARATOR.'symfony_finder'; } - if (is_array($files)) { - $f = array(); + if (\is_array($files)) { + $f = []; foreach ($files as $file) { - if (is_array($file)) { + if (\is_array($file)) { $f[] = self::toAbsolute($file); } else { - $f[] = self::$tmpDir.DIRECTORY_SEPARATOR.str_replace('/', DIRECTORY_SEPARATOR, $file); + $f[] = self::$tmpDir.\DIRECTORY_SEPARATOR.str_replace('/', \DIRECTORY_SEPARATOR, $file); } } return $f; } - if (is_string($files)) { - return self::$tmpDir.DIRECTORY_SEPARATOR.str_replace('/', DIRECTORY_SEPARATOR, $files); + if (\is_string($files)) { + return self::$tmpDir.\DIRECTORY_SEPARATOR.str_replace('/', \DIRECTORY_SEPARATOR, $files); } return self::$tmpDir; @@ -109,9 +109,9 @@ protected static function toAbsoluteFixtures($files) { - $f = array(); + $f = []; foreach ($files as $file) { - $f[] = realpath(__DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'Fixtures'.DIRECTORY_SEPARATOR.$file); + $f[] = realpath(__DIR__.\DIRECTORY_SEPARATOR.'..'.\DIRECTORY_SEPARATOR.'Fixtures'.\DIRECTORY_SEPARATOR.$file); } return $f;