src/Draggy/Autocode/Templates/Template.php
public function convertLinesToCode(array $lines) {
        if (0 === count($lines)) {
            return '';
        }

        if (0 !== strlen($this->getTemplate()->getIndentationPrefix())) {
            foreach ($lines as $lineNumber => $line) {
                if (null === $line) {
                    unset($lines[$lineNumber]);
                } elseif ('' === trim($line)) {
                    $lines[$lineNumber] = '';
                }
            }
        }

        return implode($this->getTemplate()->getEol(), $lines) . $this->getTemplate()->getEol();
    }
public function convertLinesToCode(array $lines) {
        if (0 === count($lines)) {
            return '';
        }

        if (0 !== strlen($this->getTemplate()->getIndentationPrefix())) {
            foreach ($lines as $lineNumber => $line) {
                if (null === $line) {
                    unset($lines[$lineNumber]);
                } elseif ('' === trim($line)) {
                    $lines[$lineNumber] = '';
                }
            }
        }

        return implode($this->getTemplate()->getEol(), $lines) . $this->getTemplate()->getEol();
    }
public function convertLinesToCode ( array $ lines ) { if ( 0 === count ( $ lines ) ) { return '' ; } if ( 0 !== strlen ( $ this -> getTemplate ( ) -> getIndentationPrefix ( ) ) ) { foreach ( $ lines as $ lineNumber => $ line ) { if ( null === $ line ) { unset ( $ lines [ $ lineNumber ] ) ; } elseif ( '' === trim ( $ line ) ) { $ lines [ $ lineNumber ] = '' ; } } } return implode ( $ this -> getTemplate ( ) -> getEol ( ) , $ lines ) . $ this -> getTemplate ( ) -> getEol ( ) ; }
Converts an array of lines into code, including the current indentation

@param array $lines

@return string
Converts an array of lines into code including the current indentation