@@ -6,8 +6,8 @@ |
||
| 6 | 6 | |
| 7 | 7 | class TextPlainFactory implements Factory |
| 8 | 8 | { |
| 9 | - public static function create() |
|
| 10 | - { |
|
| 11 | - return new TextPlain(); |
|
| 12 | - } |
|
| 9 | + public static function create() |
|
| 10 | + { |
|
| 11 | + return new TextPlain(); |
|
| 12 | + } |
|
| 13 | 13 | } |
| 14 | 14 | \ No newline at end of file |
@@ -7,8 +7,8 @@ |
||
| 7 | 7 | class PostFactory implements Factory |
| 8 | 8 | { |
| 9 | 9 | |
| 10 | - public static function create() |
|
| 11 | - { |
|
| 12 | - return new Post($_POST); |
|
| 13 | - } |
|
| 10 | + public static function create() |
|
| 11 | + { |
|
| 12 | + return new Post($_POST); |
|
| 13 | + } |
|
| 14 | 14 | } |
| 15 | 15 | \ No newline at end of file |
@@ -6,8 +6,8 @@ |
||
| 6 | 6 | |
| 7 | 7 | class FormUrlEncodedFactory implements Factory |
| 8 | 8 | { |
| 9 | - public static function create() |
|
| 10 | - { |
|
| 11 | - return new FormUrlEncoded(); |
|
| 12 | - } |
|
| 9 | + public static function create() |
|
| 10 | + { |
|
| 11 | + return new FormUrlEncoded(); |
|
| 12 | + } |
|
| 13 | 13 | } |
| 14 | 14 | \ No newline at end of file |
@@ -6,8 +6,8 @@ |
||
| 6 | 6 | |
| 7 | 7 | class FormDataFactory implements Factory |
| 8 | 8 | { |
| 9 | - public static function create() |
|
| 10 | - { |
|
| 11 | - return new FormData(); |
|
| 12 | - } |
|
| 9 | + public static function create() |
|
| 10 | + { |
|
| 11 | + return new FormData(); |
|
| 12 | + } |
|
| 13 | 13 | } |
| 14 | 14 | \ No newline at end of file |
@@ -6,8 +6,8 @@ |
||
| 6 | 6 | |
| 7 | 7 | class JsonFactory implements Factory |
| 8 | 8 | { |
| 9 | - public static function create() |
|
| 10 | - { |
|
| 11 | - return new Json(); |
|
| 12 | - } |
|
| 9 | + public static function create() |
|
| 10 | + { |
|
| 11 | + return new Json(); |
|
| 12 | + } |
|
| 13 | 13 | } |
| 14 | 14 | \ No newline at end of file |
@@ -6,8 +6,8 @@ |
||
| 6 | 6 | |
| 7 | 7 | class XmlFactory implements Factory |
| 8 | 8 | { |
| 9 | - public static function create() |
|
| 10 | - { |
|
| 11 | - return new XML(); |
|
| 12 | - } |
|
| 9 | + public static function create() |
|
| 10 | + { |
|
| 11 | + return new XML(); |
|
| 12 | + } |
|
| 13 | 13 | } |
| 14 | 14 | \ No newline at end of file |
@@ -6,5 +6,5 @@ |
||
| 6 | 6 | |
| 7 | 7 | interface Factory |
| 8 | 8 | { |
| 9 | - public static function create(); |
|
| 9 | + public static function create(); |
|
| 10 | 10 | } |
| 11 | 11 | \ No newline at end of file |
@@ -27,14 +27,14 @@ |
||
| 27 | 27 | return $array; |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | - public static function converToObject(array $data) |
|
| 31 | - { |
|
| 32 | - $object = new \stdClass(); |
|
| 30 | + public static function converToObject(array $data) |
|
| 31 | + { |
|
| 32 | + $object = new \stdClass(); |
|
| 33 | 33 | |
| 34 | - foreach ($data as $key => $value) { |
|
| 35 | - $object->$key = $value; |
|
| 36 | - } |
|
| 34 | + foreach ($data as $key => $value) { |
|
| 35 | + $object->$key = $value; |
|
| 36 | + } |
|
| 37 | 37 | |
| 38 | - return $object; |
|
| 38 | + return $object; |
|
| 39 | 39 | } |
| 40 | 40 | } |
| 41 | 41 | \ No newline at end of file |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | { |
| 24 | 24 | $json = JsonFactory::create(); |
| 25 | 25 | $post = PostFactory::create(); |
| 26 | - $formData = FormDataFactory::create(); |
|
| 26 | + $formData = FormDataFactory::create(); |
|
| 27 | 27 | $urlEncode = FormUrlEncodedFactory::create(); |
| 28 | 28 | $textPlain = TextPlainFactory::create(); |
| 29 | 29 | $xml = XmlFactory::create(); |