mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-23 04:23:09 +00:00
CS tweaks
This commit is contained in:
@@ -363,13 +363,14 @@ class ModelsCommand extends Command
|
||||
* @param bool|null $write
|
||||
* @param string|null $comment
|
||||
*/
|
||||
protected function setProperty($name, $type = null, $read = null, $write = null,$comment=null)
|
||||
protected function setProperty($name, $type = null, $read = null, $write = null, $comment='')
|
||||
{
|
||||
if (!isset($this->properties[$name])) {
|
||||
$this->properties[$name] = array();
|
||||
$this->properties[$name]['type'] = 'mixed';
|
||||
$this->properties[$name]['read'] = false;
|
||||
$this->properties[$name]['write'] = false;
|
||||
$this->properties[$name]['comment'] = (string) $comment;
|
||||
}
|
||||
if ($type !== null) {
|
||||
$this->properties[$name]['type'] = $type;
|
||||
@@ -380,9 +381,6 @@ class ModelsCommand extends Command
|
||||
if ($write !== null) {
|
||||
$this->properties[$name]['write'] = $write;
|
||||
}
|
||||
if ($comment !== null ) {
|
||||
$this->properties[$name]['comment'] = $comment;
|
||||
}
|
||||
}
|
||||
|
||||
protected function setMethod($name, $type = '', $arguments = array())
|
||||
@@ -439,8 +437,7 @@ class ModelsCommand extends Command
|
||||
} else {
|
||||
$attr = 'property-read';
|
||||
}
|
||||
$comment = isset($property['comment'])?$property['comment']:'';
|
||||
$tag = Tag::createInstance("@{$attr} {$property['type']} {$name} {$comment}", $phpdoc);
|
||||
$tag = Tag::createInstance("@{$attr} {$property['type']} {$name} {$property['comment']}", $phpdoc);
|
||||
$phpdoc->appendTag($tag);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user