Skip to content

Commit 0fdf6b2

Browse files
Merge branch '4.0' into 4.1
* 4.0: Enable native_constant_invocation CS fixer
2 parents 270062c + ff8f4e0 commit 0fdf6b2

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
@@ -116,7 +116,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
116116
}
117117
$firstNamespace = false;
118118
foreach ($paths as $path) {
119-
$rows[] = array($namespace, $path.DIRECTORY_SEPARATOR);
119+
$rows[] = array($namespace, $path.\DIRECTORY_SEPARATOR);
120120
$namespace = '';
121121
}
122122
if (\count($paths) > 1) {
@@ -145,7 +145,7 @@ private function getLoaderPaths()
145145
foreach ($loader->getNamespaces() as $namespace) {
146146
$paths = array_map(function ($path) {
147147
if (null !== $this->projectDir && 0 === strpos($path, $this->projectDir)) {
148-
$path = ltrim(substr($path, \strlen($this->projectDir)), DIRECTORY_SEPARATOR);
148+
$path = ltrim(substr($path, \strlen($this->projectDir)), \DIRECTORY_SEPARATOR);
149149
}
150150

151151
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, string $rootDir, string $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)