diff --git a/AbstractFactory/AbstractFactory.php b/AbstractFactory/AbstractFactory.php
index 870f217..b3794d9 100644
--- a/AbstractFactory/AbstractFactory.php
+++ b/AbstractFactory/AbstractFactory.php
@@ -33,7 +33,7 @@ abstract class AbstractFactory
abstract public function createText($content);
/**
- * Createss a picture component
+ * Creates a picture component
*
* @param string $path
* @param string $name
diff --git a/AbstractFactory/Html/Picture.php b/AbstractFactory/Html/Picture.php
index 6efc2be..549d3d7 100644
--- a/AbstractFactory/Html/Picture.php
+++ b/AbstractFactory/Html/Picture.php
@@ -1,20 +1,24 @@
', $this->_path, $this->_name);
diff --git a/AbstractFactory/Html/Text.php b/AbstractFactory/Html/Text.php
index 49be0dc..6289542 100644
--- a/AbstractFactory/Html/Text.php
+++ b/AbstractFactory/Html/Text.php
@@ -1,22 +1,27 @@
" . htmlspecialchars($this->_text) . '';
+ return '
' . htmlspecialchars($this->_text) . '
';
}
}
\ No newline at end of file
diff --git a/AbstractFactory/HtmlFactory.php b/AbstractFactory/HtmlFactory.php
index 7c9712c..a1a7d6e 100644
--- a/AbstractFactory/HtmlFactory.php
+++ b/AbstractFactory/HtmlFactory.php
@@ -1,22 +1,35 @@
$this->_name, 'path' => $this->_path));
diff --git a/AbstractFactory/Json/Text.php b/AbstractFactory/Json/Text.php
index d9aa4b3..cc85511 100644
--- a/AbstractFactory/Json/Text.php
+++ b/AbstractFactory/Json/Text.php
@@ -1,19 +1,24 @@
$this->_text));
diff --git a/AbstractFactory/JsonFactory.php b/AbstractFactory/JsonFactory.php
index e8a6059..c4232ef 100644
--- a/AbstractFactory/JsonFactory.php
+++ b/AbstractFactory/JsonFactory.php
@@ -1,23 +1,37 @@
_name = (string) $name;
- $this->_path = (string) $path;
+ $this->name = (string) $name;
+ $this->path = (string) $path;
}
}
diff --git a/AbstractFactory/Text.php b/AbstractFactory/Text.php
index dd810e8..bfa4ea4 100644
--- a/AbstractFactory/Text.php
+++ b/AbstractFactory/Text.php
@@ -2,16 +2,23 @@
namespace DesignPatterns\AbstractFactory;
+/**
+ * Class Text
+ *
+ * @package DesignPatterns\AbstractFactory
+ */
abstract class Text implements Media
{
/**
- *
* @var string
*/
- protected $_text;
+ protected $text;
+ /**
+ * @param string $text
+ */
public function __construct($text)
{
- $this->_text = $text;
+ $this->_text = (string) $text;
}
}