From bfe62d5f1a9d6eac106aba0733d7404ad6622ac4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kerem=20G=C3=BCne=C5=9F?= Date: Sat, 9 Dec 2017 21:21:37 +0300 Subject: [PATCH] The "protected" keyword should be used in order to subclasses to use that property. Otherwise, saying "$this->text = $text" is not making sense for extender objects. --- Creational/AbstractFactory/Text.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Creational/AbstractFactory/Text.php b/Creational/AbstractFactory/Text.php index 60846bb..3573801 100644 --- a/Creational/AbstractFactory/Text.php +++ b/Creational/AbstractFactory/Text.php @@ -7,7 +7,7 @@ abstract class Text /** * @var string */ - private $text; + protected $text; public function __construct(string $text) {