@@ -301,7 +301,7 @@ protected static function printArgs(array $options, array $args, string $indenta
301
301
}
302
302
303
303
// Return
304
- return static ::printLines ($ arguments , '( ' , ') ' , $ description || static ::isLineTooLong ($ length ), $ indentation );
304
+ return static ::printChildrenBlock ($ arguments , '( ' , ') ' , $ description || static ::isLineTooLong ($ length ), $ indentation );
305
305
}
306
306
307
307
/**
@@ -448,7 +448,7 @@ protected static function printUnion(UnionType $type, array $options): string
448
448
: '' ;
449
449
$ directives = static ::printTypeDirectives ($ type , $ options , '' );
450
450
451
- if (mb_strlen ($ directives ) > static :: LINE_LENGTH ) {
451
+ if (static :: isLineTooLong ($ directives )) {
452
452
$ types = ltrim ($ types );
453
453
$ directives .= "\n" ;
454
454
}
@@ -530,7 +530,8 @@ protected static function printInputObjectField(InputObjectField $type, array $o
530
530
*/
531
531
protected static function printBlock (array $ items ): string
532
532
{
533
- return static ::printLines ($ items , ' { ' , '} ' , true );
533
+ // TODO Deprecated?
534
+ return static ::printChildrenBlock ($ items , ' { ' , '} ' , true );
534
535
}
535
536
536
537
/**
@@ -612,7 +613,7 @@ protected static function printTypeDirective(DirectiveNode $directive, array $op
612
613
}
613
614
614
615
return "@ {$ directive ->name ->value }" .
615
- static ::printLines ($ arguments , '( ' , ') ' , static ::isLineTooLong ($ length ), $ indentation );
616
+ static ::printChildrenBlock ($ arguments , '( ' , ') ' , static ::isLineTooLong ($ length ), $ indentation );
616
617
}
617
618
618
619
/**
@@ -644,7 +645,7 @@ protected static function printValue($value, array $options, string $indentation
644
645
$ values [] = $ string ;
645
646
}
646
647
647
- $ result = static ::printLines ($ values , '[ ' , '] ' , static ::isLineTooLong ($ length ), $ indentation );
648
+ $ result = static ::printChildrenBlock ($ values , '[ ' , '] ' , static ::isLineTooLong ($ length ), $ indentation );
648
649
} else {
649
650
$ result = Printer::doPrint ($ value );
650
651
}
@@ -655,7 +656,7 @@ protected static function printValue($value, array $options, string $indentation
655
656
/**
656
657
* @param array<string> $lines
657
658
*/
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
659
660
{
660
661
$ block = '' ;
661
662
0 commit comments