Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / psy / psysh / test / Formatter / CodeFormatterTest.php
index ee213f1c0aab0670743ba1a87e9b89156a47e30d..87f56dfd70cb148b63e45fd0324c1d2b667adbdb 100644 (file)
@@ -22,7 +22,7 @@ class CodeFormatterTest extends \PHPUnit\Framework\TestCase
     public function testFormat($reflector, $expected)
     {
         $formatted = CodeFormatter::format($reflector);
-        $formattedWithoutColors = preg_replace('#' . chr(27) . '\[\d\d?m#', '', $formatted);
+        $formattedWithoutColors = \preg_replace('#' . \chr(27) . '\[\d\d?m#', '', $formatted);
 
         $this->assertEquals($expected, self::trimLines($formattedWithoutColors));
         $this->assertNotEquals($expected, self::trimLines($formatted));
@@ -88,7 +88,7 @@ EOS;
             [new \ReflectionProperty('Psy\Test\Formatter\Fixtures\SomeClass', 'someProp')],
         ];
 
-        if (version_compare(PHP_VERSION, '7.1.0', '>=')) {
+        if (\version_compare(PHP_VERSION, '7.1.0', '>=')) {
             $reflectors[] = [new \ReflectionClassConstant('Psy\Test\Formatter\Fixtures\SomeClass', 'SOME_CONST')];
         }
 
@@ -115,7 +115,7 @@ EOS;
 
     public function filenames()
     {
-        if (defined('HHVM_VERSION')) {
+        if (\defined('HHVM_VERSION')) {
             $this->markTestSkipped('We have issues with PHPUnit mocks on HHVM.');
         }
 
@@ -124,6 +124,6 @@ EOS;
 
     private static function trimLines($code)
     {
-        return rtrim(implode("\n", array_map('rtrim', explode("\n", $code))));
+        return \rtrim(\implode("\n", \array_map('rtrim', \explode("\n", $code))));
     }
 }