Skip to content

Commit 69eebb7

Browse files
committed
Printer: added $returnTypeColon [Closes #63]
1 parent 39b8959 commit 69eebb7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/PhpGenerator/Printer.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ class Printer
2929
/** @var int */
3030
protected $linesBetweenMethods = 2;
3131

32+
/** @var string */
33+
protected $returnTypeColon = ': ';
34+
3235
/** @var bool */
3336
private $resolveTypes = true;
3437

@@ -278,7 +281,7 @@ public function printType(?string $type, bool $nullable = false, PhpNamespace $n
278281
private function printReturnType($function, ?PhpNamespace $namespace): string
279282
{
280283
return ($tmp = $this->printType($function->getReturnType(), $function->isReturnNullable(), $namespace))
281-
? ': ' . $tmp
284+
? $this->returnTypeColon . $tmp
282285
: '';
283286
}
284287

0 commit comments

Comments
 (0)