Skip to content

Commit 2bb814a

Browse files
Enable native_constant_invocation CS fixer
1 parent 1319db4 commit 2bb814a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Extension/CodeExtension.php

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

@@ -164,11 +164,11 @@ public function formatFile($file, $line, $text = null)
164164
$file = trim($file);
165165

166166
if (null === $text) {
167-
$text = str_replace('/', DIRECTORY_SEPARATOR, $file);
167+
$text = str_replace('/', \DIRECTORY_SEPARATOR, $file);
168168
if (0 === strpos($text, $this->rootDir)) {
169169
$text = substr($text, \strlen($this->rootDir));
170-
$text = explode(DIRECTORY_SEPARATOR, $text, 2);
171-
$text = sprintf('<abbr title="%s%2$s">%s</abbr>%s', $this->rootDir, $text[0], isset($text[1]) ? DIRECTORY_SEPARATOR.$text[1] : '');
170+
$text = explode(\DIRECTORY_SEPARATOR, $text, 2);
171+
$text = sprintf('<abbr title="%s%2$s">%s</abbr>%s', $this->rootDir, $text[0], isset($text[1]) ? \DIRECTORY_SEPARATOR.$text[1] : '');
172172
}
173173
}
174174

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)