Skip to content

Commit 5d9401b

Browse files
Merge branch '2.8' into 3.4
* 2.8: Enable native_constant_invocation CS fixer
2 parents 1f61166 + 2bb814a commit 5d9401b

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

Command/DebugCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
159159
}
160160
$firstNamespace = false;
161161
foreach ($paths as $path) {
162-
$rows[] = array($namespace, $path.DIRECTORY_SEPARATOR);
162+
$rows[] = array($namespace, $path.\DIRECTORY_SEPARATOR);
163163
$namespace = '';
164164
}
165165
if (\count($paths) > 1) {
@@ -188,7 +188,7 @@ private function getLoaderPaths()
188188
foreach ($loader->getNamespaces() as $namespace) {
189189
$paths = array_map(function ($path) {
190190
if (null !== $this->projectDir && 0 === strpos($path, $this->projectDir)) {
191-
$path = ltrim(substr($path, \strlen($this->projectDir)), DIRECTORY_SEPARATOR);
191+
$path = ltrim(substr($path, \strlen($this->projectDir)), \DIRECTORY_SEPARATOR);
192192
}
193193

194194
return $path;

Extension/CodeExtension.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class CodeExtension extends AbstractExtension
3434
public function __construct($fileLinkFormat, $rootDir, $charset)
3535
{
3636
$this->fileLinkFormat = $fileLinkFormat ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format');
37-
$this->rootDir = str_replace('/', DIRECTORY_SEPARATOR, \dirname($rootDir)).DIRECTORY_SEPARATOR;
37+
$this->rootDir = str_replace('/', \DIRECTORY_SEPARATOR, \dirname($rootDir)).\DIRECTORY_SEPARATOR;
3838
$this->charset = $charset;
3939
}
4040

@@ -173,11 +173,11 @@ public function formatFile($file, $line, $text = null)
173173
$file = trim($file);
174174

175175
if (null === $text) {
176-
$text = str_replace('/', DIRECTORY_SEPARATOR, $file);
176+
$text = str_replace('/', \DIRECTORY_SEPARATOR, $file);
177177
if (0 === strpos($text, $this->rootDir)) {
178178
$text = substr($text, \strlen($this->rootDir));
179-
$text = explode(DIRECTORY_SEPARATOR, $text, 2);
180-
$text = sprintf('<abbr title="%s%2$s">%s</abbr>%s', $this->rootDir, $text[0], isset($text[1]) ? DIRECTORY_SEPARATOR.$text[1] : '');
179+
$text = explode(\DIRECTORY_SEPARATOR, $text, 2);
180+
$text = sprintf('<abbr title="%s%2$s">%s</abbr>%s', $this->rootDir, $text[0], isset($text[1]) ? \DIRECTORY_SEPARATOR.$text[1] : '');
181181
}
182182
}
183183

Tests/Command/DebugCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function testLineSeparatorInLoaderPaths()
3939
FilesystemLoader::MAIN_NAMESPACE => array('extractor', 'extractor'),
4040
));
4141
$ret = $tester->execute(array(), array('decorated' => false));
42-
$ds = DIRECTORY_SEPARATOR;
42+
$ds = \DIRECTORY_SEPARATOR;
4343
$loaderPaths = <<<TXT
4444
Loader Paths
4545
------------

Tests/Translation/TwigExtractorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function testExtractSyntaxError($resources)
9090
$extractor->extract($resources, new MessageCatalogue('en'));
9191
} catch (Error $e) {
9292
if (method_exists($e, 'getSourceContext')) {
93-
$this->assertSame(\dirname(__DIR__).strtr('/Fixtures/extractor/syntax_error.twig', '/', DIRECTORY_SEPARATOR), $e->getFile());
93+
$this->assertSame(\dirname(__DIR__).strtr('/Fixtures/extractor/syntax_error.twig', '/', \DIRECTORY_SEPARATOR), $e->getFile());
9494
$this->assertSame(1, $e->getLine());
9595
$this->assertSame('Unclosed "block".', $e->getMessage());
9696
} else {

0 commit comments

Comments
 (0)