Exemple #1
0
 public function testDuplicateEmptyLinesRemove()
 {
     $format = new Format(self::duplicateLines);
     $format->removeDuplicateEmptyLines();
     $this->assertSame(self::duplicateLinesRemoved, (string) $format);
 }
Exemple #2
0
    public function render()
    {
        $output = new Format(sprintf(<<<'PHP'
<?php

namespace %s;

%s

%s%s
{%s}
PHP
, $this->namespace, $this->getUsesDeclarations(), $this->classComment, $this->getClassDeclaration(), $this->getClassBody()->indent(4)));
        return $output->removeDuplicateEmptyLines();
    }