Skip to content

Commit 3d3d134

Browse files
author
Phalcon
committed
Merge pull request phalcon#11 from zaets28rus/master
refs #NA Some fixes
2 parents 580e731 + 95ff256 commit 3d3d134

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.DS_Store
2+
.idea/
23
.temp/
34
ext/Makefile.global
45
ext/acinclude.m4

Library/ClassDefinition.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ public function compile(CompilationContext $compilationContext)
570570
foreach ($this->getProperties() as $property) {
571571
$docBlock = $property->getDocBlock();
572572
if ($docBlock) {
573-
$codePrinter->outputDocBlock($docBlock);
573+
$codePrinter->outputDocBlock($docBlock, false);
574574
}
575575
$property->compile($compilationContext);
576576
}

Library/CodePrinter.php

+10-3
Original file line numberDiff line numberDiff line change
@@ -105,15 +105,22 @@ public function output($code)
105105
/**
106106
* Adds a comment to the output with indentation level
107107
*
108-
* @param string $docBlock
108+
* @param $docblock
109+
* @param bool $replaceTab
109110
*/
110-
public function outputDocBlock($docblock)
111+
public function outputDocBlock($docblock, $replaceTab = true)
111112
{
112113
$code = '';
113114
$docblock = '/' . $docblock . '/';
115+
114116
foreach (explode("\n", $docblock) as $line) {
115-
$code .= preg_replace('/^[ \t]+/', ' ', $line) . PHP_EOL;
117+
if ($replaceTab) {
118+
$code .= preg_replace('/^[ \t]+/', ' ', $line) . PHP_EOL;
119+
} else {
120+
$code .= $line . PHP_EOL;
121+
}
116122
}
123+
117124
$this->_lastLine = $code;
118125
$this->_code .= $code;
119126
$this->_currentPrints++;

Library/Statements/LetStatement.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1206,7 +1206,7 @@ public function assignDecr($variable, Variable $symbolVariable, CompilationConte
12061206
break;
12071207
case 'variable':
12081208

1209-
$dynamicType = $symbolVariable->getDynamicType();
1209+
$dynamicType = $symbolVariable->getDynamicTypes();
12101210

12111211
/**
12121212
* Variable is probably not initialized here

0 commit comments

Comments
 (0)