Commit 5f91175d authored by Guillaume Perréal's avatar Guillaume Perréal
Browse files

WriterInterface::printf => WriterInterface::writeFormatted.

No related merge requests found
Showing with 10 additions and 10 deletions
+10 -10
...@@ -55,14 +55,14 @@ class BaseArrow implements ArrowInterface ...@@ -55,14 +55,14 @@ class BaseArrow implements ArrowInterface
protected function writeLabelTo(WriterInterface $writer) protected function writeLabelTo(WriterInterface $writer)
{ {
if ($this->label) { if ($this->label) {
$writer->printf(" : %s", $this->label); $writer->writeFormatted(" : %s", $this->label);
} }
return $this; return $this;
} }
protected function writeLinkTo(WriterInterface $writer) protected function writeLinkTo(WriterInterface $writer)
{ {
$writer->printf(" %s ", $this->link); $writer->writeFormatted(" %s ", $this->link);
return $this; return $this;
} }
} }
...@@ -33,7 +33,7 @@ class FlatNamespace extends AbstractNamespace ...@@ -33,7 +33,7 @@ class FlatNamespace extends AbstractNamespace
public function writeTo(WriterInterface $writer) public function writeTo(WriterInterface $writer)
{ {
$writer->printf("set namespaceSeparator %s\n", static::SEPARATOR); $writer->writeFormatted("set namespaceSeparator %s\n", static::SEPARATOR);
$this $this
->writeNodesTo($writer) ->writeNodesTo($writer)
->writeArrowsTo($writer); ->writeArrowsTo($writer);
......
...@@ -72,7 +72,7 @@ class Namespace_ extends AbstractNamespace ...@@ -72,7 +72,7 @@ class Namespace_ extends AbstractNamespace
} }
$writer $writer
->printf("namespace %s {\n", $this->name) ->writeFormatted("namespace %s {\n", $this->name)
->indent(); ->indent();
$this $this
->writeNodesTo($writer) ->writeNodesTo($writer)
......
...@@ -91,7 +91,7 @@ class BaseNode implements NodeInterface ...@@ -91,7 +91,7 @@ class BaseNode implements NodeInterface
$this $this
->writeClassifiersTo($writer) ->writeClassifiersTo($writer)
->writeNodeTypeTo($writer); ->writeNodeTypeTo($writer);
$writer->printf('"%s" as %s', $this->label, $this->id); $writer->writeFormatted('"%s" as %s', $this->label, $this->id);
$this $this
->writeStereotypesTo($writer); ->writeStereotypesTo($writer);
$writer $writer
...@@ -115,21 +115,21 @@ class BaseNode implements NodeInterface ...@@ -115,21 +115,21 @@ class BaseNode implements NodeInterface
protected function writeClassifiersTo(WriterInterface $writer) protected function writeClassifiersTo(WriterInterface $writer)
{ {
foreach($this->classifiers as $classifier) { foreach($this->classifiers as $classifier) {
$writer->printf('%s ', $classifier); $writer->writeFormatted('%s ', $classifier);
} }
return $this; return $this;
} }
protected function writeNodeTypeTo(WriterInterface $writer) protected function writeNodeTypeTo(WriterInterface $writer)
{ {
$writer->printf('%s ', $this->nodeType); $writer->writeFormatted('%s ', $this->nodeType);
return $this; return $this;
} }
protected function writeStereotypesTo(WriterInterface $writer) protected function writeStereotypesTo(WriterInterface $writer)
{ {
foreach($this->stereotypes as $stereotype) { foreach($this->stereotypes as $stereotype) {
$writer->printf(' <<%s>>', $stereotype); $writer->writeFormatted(' <<%s>>', $stereotype);
} }
return $this; return $this;
} }
......
...@@ -37,7 +37,7 @@ abstract class AbstractWriter implements WriterInterface ...@@ -37,7 +37,7 @@ abstract class AbstractWriter implements WriterInterface
return $this; return $this;
} }
public function printf($format) public function writeFormatted($format)
{ {
$args = func_get_args(); $args = func_get_args();
array_shift($args); array_shift($args);
......
...@@ -37,5 +37,5 @@ interface WriterInterface ...@@ -37,5 +37,5 @@ interface WriterInterface
* @param mixed ... * @param mixed ...
* @return self * @return self
*/ */
public function printf($fmt); public function writeFormatted($fmt);
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment