Skip to content

Commit 94d055c

Browse files
Merge pull request DesignPatternsPHP#309 from k-gun/master
The "protected" keyword should be used in order to subclasses to use …
2 parents d9ca300 + 26eb707 commit 94d055c

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

Creational/AbstractFactory/Text.php

Lines changed: 1 addition & 1 deletion
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
{

Creational/SimpleFactory/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Purpose
77
SimpleFactory is a simple factory pattern.
88

99
It differs from the static factory because it is not static.
10-
Therefore, you can have multiple factories, differently parametrized, you can subclass it and you can mock it.
10+
Therefore, you can have multiple factories, differently parameterized, you can subclass it and you can mock it.
1111
It always should be preferred over a static factory!
1212

1313
UML Diagram

Structural/DependencyInjection/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ testable, maintainable and extendable code.
1010
Usage
1111
-----
1212

13-
DatabaseConfiguration gets injected and ``DatabaseConnection`` will get all that it
13+
``DatabaseConfiguration`` gets injected and ``DatabaseConnection`` will get all that it
1414
needs from ``$config``. Without DI, the configuration would be created
1515
directly in ``DatabaseConnection``, which is not very good for testing and
1616
extending it.

locale/ca/LC_MESSAGES/Creational/SimpleFactory/README.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#
1+
#
22
msgid ""
33
msgstr ""
44
"Project-Id-Version: DesignPatternsPHP 1.0\n"
@@ -31,7 +31,7 @@ msgstr ""
3131

3232
#: ../../Creational/SimpleFactory/README.rst:12
3333
msgid ""
34-
"Therefore, you can have multiple factories, differently parametrized, you "
34+
"Therefore, you can have multiple factories, differently parameterized, you "
3535
"can subclass it and you can mock-up it."
3636
msgstr ""
3737

locale/template/LC_MESSAGES/Creational/SimpleFactory/README.pot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ msgstr ""
2323
#: ../../Creational/SimpleFactory/README.rst:9
2424
msgid ""
2525
"It differs from the static factory because it is not static. "
26-
"Therefore, you can have multiple factories, differently parametrized, you can subclass it and you can mock it."
26+
"Therefore, you can have multiple factories, differently parameterized, you can subclass it and you can mock it."
2727
msgstr ""
2828

2929
#: ../../Creational/SimpleFactory/README.rst:11
@@ -52,4 +52,4 @@ msgstr ""
5252

5353
#: ../../Creational/SimpleFactory/README.rst:52
5454
msgid "Test"
55-
msgstr ""
55+
msgstr ""

locale/template/LC_MESSAGES/Structural/DependencyInjection/README.pot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ msgstr ""
2828

2929
#: ../../Structural/DependencyInjection/README.rst:13
3030
msgid ""
31-
"DatabaseConfiguration gets injected and ``DatabaseConnection`` will get all that it "
31+
"``DatabaseConfiguration`` gets injected and ``DatabaseConnection`` will get all that it "
3232
"needs from ``$config``. Without DI, the configuration would be created "
3333
"directly in ``DatabaseConnection``, which is not very good for testing and "
3434
"extending it."
@@ -71,4 +71,4 @@ msgstr ""
7171

7272
#: ../../Structural/DependencyInjection/README.rst:53
7373
msgid "Test"
74-
msgstr ""
74+
msgstr ""

0 commit comments

Comments
 (0)