Skip to content

Commit c046687

Browse files
committed
Renames.
1 parent 093c9bc commit c046687

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/Utils/SchemaPrinter.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ protected static function printArgs(array $options, array $args, string $indenta
301301
}
302302

303303
// Return
304-
return static::printLines($arguments, '(', ')', $description || static::isLineTooLong($length), $indentation);
304+
return static::printChildrenBlock($arguments, '(', ')', $description || static::isLineTooLong($length), $indentation);
305305
}
306306

307307
/**
@@ -448,7 +448,7 @@ protected static function printUnion(UnionType $type, array $options): string
448448
: '';
449449
$directives = static::printTypeDirectives($type, $options, '');
450450

451-
if (mb_strlen($directives) > static::LINE_LENGTH) {
451+
if (static::isLineTooLong($directives)) {
452452
$types = ltrim($types);
453453
$directives .= "\n";
454454
}
@@ -530,7 +530,8 @@ protected static function printInputObjectField(InputObjectField $type, array $o
530530
*/
531531
protected static function printBlock(array $items): string
532532
{
533-
return static::printLines($items, ' {', '}', true);
533+
// TODO Deprecated?
534+
return static::printChildrenBlock($items, ' {', '}', true);
534535
}
535536

536537
/**
@@ -612,7 +613,7 @@ protected static function printTypeDirective(DirectiveNode $directive, array $op
612613
}
613614

614615
return "@{$directive->name->value}" .
615-
static::printLines($arguments, '(', ')', static::isLineTooLong($length), $indentation);
616+
static::printChildrenBlock($arguments, '(', ')', static::isLineTooLong($length), $indentation);
616617
}
617618

618619
/**
@@ -644,7 +645,7 @@ protected static function printValue($value, array $options, string $indentation
644645
$values[] = $string;
645646
}
646647

647-
$result = static::printLines($values, '[', ']', static::isLineTooLong($length), $indentation);
648+
$result = static::printChildrenBlock($values, '[', ']', static::isLineTooLong($length), $indentation);
648649
} else {
649650
$result = Printer::doPrint($value);
650651
}
@@ -655,7 +656,7 @@ protected static function printValue($value, array $options, string $indentation
655656
/**
656657
* @param array<string> $lines
657658
*/
658-
protected static function printLines(array $lines, string $begin, string $end, bool $forceMultiline, string $indentation = ''): string
659+
protected static function printChildrenBlock(array $lines, string $begin, string $end, bool $forceMultiline, string $indentation = ''): string
659660
{
660661
$block = '';
661662

0 commit comments

Comments
 (0)