From 5f91175d11cab9c7f4897aea21d937a939e0b88b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Guillaume=20Perr=C3=A9al?= <guillaume.perreal@irstea.fr>
Date: Fri, 11 Mar 2016 15:00:57 +0100
Subject: [PATCH] WriterInterface::printf => WriterInterface::writeFormatted.

---
 Model/Arrow/BaseArrow.php           | 4 ++--
 Model/Namespace_/FlatNamespace.php  | 2 +-
 Model/Namespace_/Php/Namespace_.php | 2 +-
 Model/Node/BaseNode.php             | 8 ++++----
 Writer/AbstractWriter.php           | 2 +-
 Writer/WriterInterface.php          | 2 +-
 6 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/Model/Arrow/BaseArrow.php b/Model/Arrow/BaseArrow.php
index 7d9893e..e96270a 100644
--- a/Model/Arrow/BaseArrow.php
+++ b/Model/Arrow/BaseArrow.php
@@ -55,14 +55,14 @@ class BaseArrow implements ArrowInterface
     protected function writeLabelTo(WriterInterface $writer)
     {
         if ($this->label) {
-            $writer->printf(" : %s", $this->label);
+            $writer->writeFormatted(" : %s", $this->label);
         }
         return $this;
     }
 
     protected function writeLinkTo(WriterInterface $writer)
     {
-        $writer->printf(" %s ", $this->link);
+        $writer->writeFormatted(" %s ", $this->link);
         return $this;
     }
 }
diff --git a/Model/Namespace_/FlatNamespace.php b/Model/Namespace_/FlatNamespace.php
index 362e794..8042bc2 100644
--- a/Model/Namespace_/FlatNamespace.php
+++ b/Model/Namespace_/FlatNamespace.php
@@ -33,7 +33,7 @@ class FlatNamespace extends AbstractNamespace
 
     public function writeTo(WriterInterface $writer)
     {
-        $writer->printf("set namespaceSeparator %s\n", static::SEPARATOR);
+        $writer->writeFormatted("set namespaceSeparator %s\n", static::SEPARATOR);
         $this
             ->writeNodesTo($writer)
             ->writeArrowsTo($writer);
diff --git a/Model/Namespace_/Php/Namespace_.php b/Model/Namespace_/Php/Namespace_.php
index 279a089..36241a0 100644
--- a/Model/Namespace_/Php/Namespace_.php
+++ b/Model/Namespace_/Php/Namespace_.php
@@ -72,7 +72,7 @@ class Namespace_ extends AbstractNamespace
         }
 
         $writer
-            ->printf("namespace %s {\n", $this->name)
+            ->writeFormatted("namespace %s {\n", $this->name)
             ->indent();
         $this
             ->writeNodesTo($writer)
diff --git a/Model/Node/BaseNode.php b/Model/Node/BaseNode.php
index 5878209..1a5cd69 100644
--- a/Model/Node/BaseNode.php
+++ b/Model/Node/BaseNode.php
@@ -91,7 +91,7 @@ class BaseNode implements NodeInterface
         $this
             ->writeClassifiersTo($writer)
             ->writeNodeTypeTo($writer);
-        $writer->printf('"%s" as %s', $this->label, $this->id);
+        $writer->writeFormatted('"%s" as %s', $this->label, $this->id);
         $this
             ->writeStereotypesTo($writer);
         $writer
@@ -115,21 +115,21 @@ class BaseNode implements NodeInterface
     protected function writeClassifiersTo(WriterInterface $writer)
     {
         foreach($this->classifiers as $classifier) {
-            $writer->printf('%s ', $classifier);
+            $writer->writeFormatted('%s ', $classifier);
         }
         return $this;
     }
 
     protected function writeNodeTypeTo(WriterInterface $writer)
     {
-        $writer->printf('%s ', $this->nodeType);
+        $writer->writeFormatted('%s ', $this->nodeType);
         return $this;
     }
 
     protected function writeStereotypesTo(WriterInterface $writer)
     {
         foreach($this->stereotypes as $stereotype) {
-            $writer->printf(' <<%s>>', $stereotype);
+            $writer->writeFormatted(' <<%s>>', $stereotype);
         }
         return $this;
     }
diff --git a/Writer/AbstractWriter.php b/Writer/AbstractWriter.php
index 7a14d3a..e06c338 100644
--- a/Writer/AbstractWriter.php
+++ b/Writer/AbstractWriter.php
@@ -37,7 +37,7 @@ abstract class AbstractWriter implements WriterInterface
         return $this;
     }
 
-    public function printf($format)
+    public function writeFormatted($format)
     {
         $args = func_get_args();
         array_shift($args);
diff --git a/Writer/WriterInterface.php b/Writer/WriterInterface.php
index 06036fa..d0ad058 100644
--- a/Writer/WriterInterface.php
+++ b/Writer/WriterInterface.php
@@ -37,5 +37,5 @@ interface WriterInterface
      * @param mixed ...
      * @return self
      */
-    public function printf($fmt);
+    public function writeFormatted($fmt);
 }
-- 
GitLab