Remove single file for SimpleFactory usage example

And move code to code-block
This commit is contained in:
Nikita Strelkov
2016-10-04 13:13:34 +05:00
parent e15b873463
commit b182503514
2 changed files with 5 additions and 13 deletions

View File

@@ -43,12 +43,13 @@ Bicycle.php
Usage
-----
Usage/SimpleFactoryUsage.php
.. literalinclude:: Usage/SimpleFactoryUsage.php
:language: php
.. code-block:: php
:linenos:
$factory = new SimpleFactory();
$bicycle = $factory->createBicycle();
$bicycle->driveTo('Paris');
Test
----

View File

@@ -1,9 +0,0 @@
<?php
namespace DesignPatterns\Creational\SimpleFactory\Usage;
use DesignPatterns\Creational\SimpleFactory\SimpleFactory;
$factory = new SimpleFactory();
$bicycle = $factory->createBicycle();
$bicycle->driveTo('Paris');