added missing files in READMEs

This commit is contained in:
Dominik Liebler 2019-09-12 21:13:40 +02:00
parent e41d4321d1
commit a836472602
No known key found for this signature in database
GPG Key ID: DCE4AADEA26FD47B
6 changed files with 48 additions and 1 deletions

View File

@ -44,12 +44,24 @@ Command.php
:language: php
:linenos:
UndoableCommand.php
.. literalinclude:: UndoableCommand.php
:language: php
:linenos:
HelloCommand.php
.. literalinclude:: HelloCommand.php
:language: php
:linenos:
AddMessageDateCommand.php
.. literalinclude:: AddMessageDateCommand.php
:language: php
:linenos:
Receiver.php
.. literalinclude:: Receiver.php
@ -71,5 +83,11 @@ Tests/CommandTest.php
:language: php
:linenos:
Tests/UndoableCommandTest.php
.. literalinclude:: Tests/UndoableCommandTest.php
:language: php
:linenos:
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Behavioral/Command
.. __: http://en.wikipedia.org/wiki/Command_pattern

View File

@ -37,4 +37,10 @@ Multiton.php
Test
----
MultitonTest.php
.. literalinclude:: Tests/MultitonTest.php
:language: php
:linenos:
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Creational/Multiton

View File

@ -33,6 +33,12 @@ Code
You can also find this code on `GitHub`_
Service.php
.. literalinclude:: Service.php
:language: php
:linenos:
ServiceLocator.php
.. literalinclude:: ServiceLocator.php

View File

@ -46,5 +46,11 @@ BankAccountProxy.php
Test
----
ProxyTest.php
.. literalinclude:: Tests/ProxyTest.php
:language: php
:linenos:
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Structural/Proxy
.. __: http://en.wikipedia.org/wiki/Proxy_pattern

View File

@ -27,6 +27,12 @@ Registry.php
:language: php
:linenos:
Service.php
.. literalinclude:: Service.php
:language: php
:linenos:
Test
----

View File

@ -55,11 +55,16 @@ function getFilesFromReadmes() {
$phpFiles = getFiles('/^.+\.php$/');
$filesFromReadme = getFilesFromReadmes();
$diff = array_diff($phpFiles, $filesFromReadme);
$diff2 = array_diff($filesFromReadme, $phpFiles);
foreach ($diff as $file) {
echo $file . PHP_EOL;
}
if (count($diff) != 0) {
foreach ($diff2 as $file) {
echo $file . PHP_EOL;
}
if (count($diff) != 0 || count($diff2) != 0) {
exit(1);
}