mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-30 19:50:12 +02:00
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.
This commit is contained in:
@@ -7,7 +7,7 @@ abstract class Text
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $text;
|
||||
protected $text;
|
||||
|
||||
public function __construct(string $text)
|
||||
{
|
||||
|
Reference in New Issue
Block a user