mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-31 12:10:10 +02:00
Remove single file for SimpleFactory usage example
And move code to code-block
This commit is contained in:
@@ -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
|
||||
----
|
||||
|
||||
|
@@ -1,9 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace DesignPatterns\Creational\SimpleFactory\Usage;
|
||||
|
||||
use DesignPatterns\Creational\SimpleFactory\SimpleFactory;
|
||||
|
||||
$factory = new SimpleFactory();
|
||||
$bicycle = $factory->createBicycle();
|
||||
$bicycle->driveTo('Paris');
|
Reference in New Issue
Block a user