mirror of
https://github.com/retailcrm/graphql-php.git
synced 2024-11-21 20:36:05 +03:00
Got rid of PHP_EOL usages (we never do or expect carriage returns)
This commit is contained in:
parent
0070cb4039
commit
c7fcd4eb48
@ -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)
|
||||
|
@ -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"
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
)
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user