diff --git a/FactoryMethod/Bicycle.php b/FactoryMethod/Bicycle.php index 772dcdf..0c71ba2 100644 --- a/FactoryMethod/Bicycle.php +++ b/FactoryMethod/Bicycle.php @@ -1,9 +1,5 @@ color = $rgb; } - -} \ No newline at end of file +} diff --git a/FactoryMethod/FactoryMethod.php b/FactoryMethod/FactoryMethod.php index 3402bd6..89a3ba9 100644 --- a/FactoryMethod/FactoryMethod.php +++ b/FactoryMethod/FactoryMethod.php @@ -1,9 +1,5 @@ color = $rgb; } - -} \ No newline at end of file +} diff --git a/FactoryMethod/GermanFactory.php b/FactoryMethod/GermanFactory.php index a962c76..acbac40 100644 --- a/FactoryMethod/GermanFactory.php +++ b/FactoryMethod/GermanFactory.php @@ -1,39 +1,31 @@ addTuningAMG(); + return $obj; break; - default : throw new \InvalidArgumentException("$type is not a valid vehicle"); } } - -} \ No newline at end of file +} diff --git a/FactoryMethod/ItalianFactory.php b/FactoryMethod/ItalianFactory.php index db8514c..cb8338c 100644 --- a/FactoryMethod/ItalianFactory.php +++ b/FactoryMethod/ItalianFactory.php @@ -1,9 +1,5 @@ color = $rgb; } + /** + * although tuning by AMG is only offered for Mercedes Cars, + * this is a valid coding example ... + */ public function addTuningAMG() { - - } -} \ No newline at end of file + } +} diff --git a/FactoryMethod/Vehicle.php b/FactoryMethod/Vehicle.php index 180a349..591873d 100644 --- a/FactoryMethod/Vehicle.php +++ b/FactoryMethod/Vehicle.php @@ -1,9 +1,5 @@