Skip to content

Commit bfe62d5

Browse files
author
Kerem Güneş
committed
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.
1 parent d9ca300 commit bfe62d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Creational/AbstractFactory/Text.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ abstract class Text
77
/**
88
* @var string
99
*/
10-
private $text;
10+
protected $text;
1111

1212
public function __construct(string $text)
1313
{

0 commit comments

Comments
 (0)