ST3 - Generation of code failing
Issue #1
resolved
Based on the starting code:
<?php
@class User
@property -t string -get -set name
@property -t DateTime -get -set birthday
@endClass
The resulting generated code is:
<?php
/**
* User
*/
class User {
/**
* name
* @var string
*/
protected $name;
/**
* setName
* @param $value
* @return void
*/
public function setName($value) {
$this->name = $value;
}
/**
* getName
* @return string
*/
/**
* birthday
* @var DateTime
*/
protected $birthday;
/**
* setBirthday
* @param DateTime $value
* @return void
*/
public function setBirthday(DateTime $value) {
$this->birthday = $value;
}
/**
* getBirthday
* @return DateTime
*/
public
} getBirthday() {
return $this->birthday;
}eturn $this->name;
}
@property -t DateTime -get -set birthday
@endClass
Comments (6)
-
repo owner -
repo owner - changed status to resolved
Can't replicate issue
-
reporter Hello again,
Found the offending issue... It happens that if the
translate_tabs_to_spaces
setting is set totrue
you will get the scrambled output I posted on the issue report.If it helps the extra info, I'm on Linux Mint 15, using Cinnamon and SublimeText3. Tried again with a clean install, and this single setting is the one that breaks the generation.
-
repo owner Ah, thanks for pointing that out. I will look into this.
-
repo owner - changed status to open
Breaks when "translate_tabs_to_spaces" is set to true
-
repo owner - changed status to resolved
Fixed issue in 1.0.3
- Log in to comment
I copied and pasted the starting code and was not able to replicate the issue on windows or mac. Are you still having an issue?
Also, check sublimes console. Make sure PhpCodeGen's debugMode is turned on and see if you get any errors. If there is an issue parsing a command string, it will display that in the console.