@@ -10,8 +10,8 @@ discard block |
||
10 | 10 | * @copyright 2014-2017 Martijn van der Lee |
11 | 11 | * @license https://opensource.org/licenses/MIT MIT |
12 | 12 | */ |
13 | -class TypeRegistry |
|
14 | -{ |
|
13 | +class TypeRegistry |
|
14 | +{ |
|
15 | 15 | |
16 | 16 | /** |
17 | 17 | * Map of format-name => class-name |
@@ -25,10 +25,10 @@ discard block |
||
25 | 25 | * |
26 | 26 | * @param type $classname |
27 | 27 | */ |
28 | - public function add($classname) |
|
29 | - { |
|
30 | - if (is_subclass_of($classname, '\\SwaggerGen\\Swagger\\Type\\Custom\\ICustomType', true)) { |
|
31 | - foreach ($classname::getFormats() as $format) { |
|
28 | + public function add($classname) |
|
29 | + { |
|
30 | + if (is_subclass_of($classname, '\\SwaggerGen\\Swagger\\Type\\Custom\\ICustomType', true)) { |
|
31 | + foreach ($classname::getFormats() as $format) { |
|
32 | 32 | $this->formats[$format] = $classname; |
33 | 33 | } |
34 | 34 | } |
@@ -39,8 +39,8 @@ discard block |
||
39 | 39 | * |
40 | 40 | * @param string $name |
41 | 41 | */ |
42 | - public function remove($name) |
|
43 | - { |
|
42 | + public function remove($name) |
|
43 | + { |
|
44 | 44 | $this->formats[$name] = null; |
45 | 45 | } |
46 | 46 | |
@@ -49,8 +49,8 @@ discard block |
||
49 | 49 | * |
50 | 50 | * @return bool |
51 | 51 | */ |
52 | - public function has($name) |
|
53 | - { |
|
52 | + public function has($name) |
|
53 | + { |
|
54 | 54 | return !empty($this->formats[$name]); |
55 | 55 | } |
56 | 56 | |
@@ -59,8 +59,8 @@ discard block |
||
59 | 59 | * |
60 | 60 | * @return null|string |
61 | 61 | */ |
62 | - public function get($name) |
|
63 | - { |
|
62 | + public function get($name) |
|
63 | + { |
|
64 | 64 | return !empty($this->formats[$name]) ? $this->formats[$name] : null; |
65 | 65 | } |
66 | 66 |