Skip to content

Commit

Permalink
code fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ateliee committed Dec 14, 2019
1 parent 4c1598b commit b5e33e7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion psysh.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
$sh->run();

// 終了時に表示するメッセージ
echo "Bye.\n";
echo "Bye.\n";
10 changes: 5 additions & 5 deletions src/PlantUMLParser/PUMLElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ abstract class PUMLElement
*/
public static function name()
{
$c = explode('\\', get_called_class());
$c = end($c);
if (preg_match('/^PUML(.+)$/', $c, $matchs)) {
$c = $matchs[1];
$cname = explode('\\', get_called_class());
$cname = end($cname);
if (preg_match('/^PUML(.+)$/', $cname, $matchs)) {
$cname = $matchs[1];
}
return $c;
return $cname;
}

/**
Expand Down
19 changes: 10 additions & 9 deletions src/PlantUMLParser/Structure/PUMLRelation.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,15 @@ public function __construct($value, $related, $value2, $attributes = null)

public function str($current_indent, $indent)
{
return $this->getOutputComment($current_indent).
$current_indent.
sprintf(
'%s %s %s%s',
$this->value,
$this->related,
$this->value2,
$this->attributes ? ' '.$this->attributes : ''
);
$str = $this->getOutputComment($current_indent);
$str .= $current_indent;
$str .= sprintf(
'%s %s %s%s',
$this->value,
$this->related,
$this->value2,
$this->attributes ? ' '.$this->attributes : ''
);
return $str;
}
}

0 comments on commit b5e33e7

Please sign in to comment.