Skip to content

Commit

Permalink
updated php-generator
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Apr 26, 2018
1 parent d7cd4f8 commit c9694ae
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
15 changes: 15 additions & 0 deletions cs/php-generator.texy
Expand Up @@ -122,6 +122,21 @@ class Demo
}
\--

Tabulátory versus mezery
------------------------

Vygenerovaný kód používá pro odsazování tabulátory, díky čemuž je lze snadno změnit na libovolný počet mezer:

/--php
use Nette\PhpGenerator\Helpers;

$class = new Nette\PhpGenerator\ClassType('Demo');
// ...

echo Helpers::tabsToSpaces((string) $class); // odsazení 4 mezerami
echo Helpers::tabsToSpaces((string) $class, 2); // odsazení 2 mezerami
\--

Literály
--------

Expand Down
15 changes: 15 additions & 0 deletions en/php-generator.texy
Expand Up @@ -122,6 +122,21 @@ class Demo
}
\--

Tabs versus spaces
------------------

The generated code uses tabs for indentation, which makes it very easy to change it to any number of spaces:

/--php
use Nette\PhpGenerator\Helpers;

$class = new Nette\PhpGenerator\ClassType('Demo');
// ...

echo Helpers::tabsToSpaces((string) $class); // 4 spaces indentation
echo Helpers::tabsToSpaces((string) $class, 2); // 2 spaces indentation
\--

Literals
--------

Expand Down

0 comments on commit c9694ae

Please sign in to comment.