mirror of
https://github.com/retailcrm/graphql-php.git
synced 2025-02-16 20:33:14 +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 implode;
|
||||||
use function is_array;
|
use function is_array;
|
||||||
use function sprintf;
|
use function sprintf;
|
||||||
use const PHP_EOL;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implements the "Validation" section of the spec.
|
* Implements the "Validation" section of the spec.
|
||||||
@ -316,7 +315,7 @@ class DocumentValidator
|
|||||||
if (count($errors) !== 0) {
|
if (count($errors) !== 0) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
implode(
|
implode(
|
||||||
PHP_EOL . PHP_EOL,
|
"\n\n",
|
||||||
array_map(static function (Error $error) : string {
|
array_map(static function (Error $error) : string {
|
||||||
return $error->message;
|
return $error->message;
|
||||||
}, $errors)
|
}, $errors)
|
||||||
|
@ -15,7 +15,6 @@ use GraphQL\Type\Schema;
|
|||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
use function count;
|
use function count;
|
||||||
use function var_export;
|
use function var_export;
|
||||||
use const PHP_EOL;
|
|
||||||
|
|
||||||
class ValuesTest extends TestCase
|
class ValuesTest extends TestCase
|
||||||
{
|
{
|
||||||
@ -37,7 +36,7 @@ class ValuesTest extends TestCase
|
|||||||
self::assertEquals(
|
self::assertEquals(
|
||||||
$variables,
|
$variables,
|
||||||
$this->runTestCase($variables)['coerced'],
|
$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_match;
|
||||||
use function preg_replace;
|
use function preg_replace;
|
||||||
use function trim;
|
use function trim;
|
||||||
use const PHP_EOL;
|
|
||||||
|
|
||||||
class SchemaExtenderTest extends TestCase
|
class SchemaExtenderTest extends TestCase
|
||||||
{
|
{
|
||||||
@ -1844,9 +1843,9 @@ class SchemaExtenderTest extends TestCase
|
|||||||
extend schema @foo
|
extend schema @foo
|
||||||
'),
|
'),
|
||||||
implode(
|
implode(
|
||||||
PHP_EOL,
|
"\n",
|
||||||
array_map(static function ($node) {
|
array_map(static function ($node) {
|
||||||
return Printer::doPrint($node) . PHP_EOL;
|
return Printer::doPrint($node) . "\n";
|
||||||
}, $nodes)
|
}, $nodes)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user