diff --git a/src/Validator/DocumentValidator.php b/src/Validator/DocumentValidator.php index 6a1ba94..0364839 100644 --- a/src/Validator/DocumentValidator.php +++ b/src/Validator/DocumentValidator.php @@ -53,7 +53,6 @@ use function count; use function implode; use function is_array; use function sprintf; -use const PHP_EOL; /** * Implements the "Validation" section of the spec. @@ -316,7 +315,7 @@ class DocumentValidator if (count($errors) !== 0) { throw new Error( implode( - PHP_EOL . PHP_EOL, + "\n\n", array_map(static function (Error $error) : string { return $error->message; }, $errors) diff --git a/tests/Executor/ValuesTest.php b/tests/Executor/ValuesTest.php index b0bc05a..7aa85d2 100644 --- a/tests/Executor/ValuesTest.php +++ b/tests/Executor/ValuesTest.php @@ -15,7 +15,6 @@ use GraphQL\Type\Schema; use PHPUnit\Framework\TestCase; use function count; use function var_export; -use const PHP_EOL; class ValuesTest extends TestCase { @@ -37,7 +36,7 @@ class ValuesTest extends TestCase self::assertEquals( $variables, $this->runTestCase($variables)['coerced'], - 'Output variables did not match input variables' . PHP_EOL . var_export($variables, true) . PHP_EOL + 'Output variables did not match input variables' . "\n" . var_export($variables, true) . "\n" ); } diff --git a/tests/Utils/SchemaExtenderTest.php b/tests/Utils/SchemaExtenderTest.php index 552cc29..0df0c4c 100644 --- a/tests/Utils/SchemaExtenderTest.php +++ b/tests/Utils/SchemaExtenderTest.php @@ -38,7 +38,6 @@ use function iterator_to_array; use function preg_match; use function preg_replace; use function trim; -use const PHP_EOL; class SchemaExtenderTest extends TestCase { @@ -1844,9 +1843,9 @@ class SchemaExtenderTest extends TestCase extend schema @foo '), implode( - PHP_EOL, + "\n", array_map(static function ($node) { - return Printer::doPrint($node) . PHP_EOL; + return Printer::doPrint($node) . "\n"; }, $nodes) ) );