@@ -14,12 +14,12 @@ |
||
14 | 14 | interface AddressInterface extends EntityInterface |
15 | 15 | { |
16 | 16 | |
17 | - /** |
|
18 | - * Postal Code of the Address. |
|
19 | - * |
|
20 | - * @param string $postalCode |
|
21 | - * @return AddressInterface |
|
22 | - */ |
|
17 | + /** |
|
18 | + * Postal Code of the Address. |
|
19 | + * |
|
20 | + * @param string $postalCode |
|
21 | + * @return AddressInterface |
|
22 | + */ |
|
23 | 23 | public function setPostalCode($postalCode); |
24 | 24 | public function getPostalCode(); |
25 | 25 |
@@ -17,7 +17,7 @@ |
||
17 | 17 | * |
18 | 18 | * @author Anthonius Munthi <[email protected]> |
19 | 19 | * @ODM\MappedSuperclass |
20 | - */ |
|
20 | + */ |
|
21 | 21 | abstract class AbstractIdentifiableEntity extends AbstractEntity implements IdentifiableEntityInterface |
22 | 22 | { |
23 | 23 | use IdentifiableEntityTrait; |
@@ -58,7 +58,7 @@ |
||
58 | 58 | $states = static::getStates(); |
59 | 59 | |
60 | 60 | if (!in_array($state, $states)) { |
61 | - throw new \InvalidArgumentException('Invalid state name: ' . $state); |
|
61 | + throw new \InvalidArgumentException('Invalid state name: '.$state); |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | $this->state = $state; |
@@ -32,9 +32,9 @@ discard block |
||
32 | 32 | |
33 | 33 | $getters = array_filter( |
34 | 34 | get_class_methods($object), |
35 | - function ($methodName) use ($object) { |
|
35 | + function($methodName) use ($object) { |
|
36 | 36 | return "get" === substr($methodName, 0, 3) |
37 | - && method_exists($object, 's' . substr($methodName, 1)); |
|
37 | + && method_exists($object, 's'.substr($methodName, 1)); |
|
38 | 38 | } |
39 | 39 | ); |
40 | 40 | |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | } |
62 | 62 | $setters = array_filter( |
63 | 63 | get_class_methods($object), |
64 | - function ($methodName) { |
|
64 | + function($methodName) { |
|
65 | 65 | return "set" === substr($methodName, 0, 3); |
66 | 66 | } |
67 | 67 | ); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | |
79 | 79 | // ensures garbage removal |
80 | 80 | register_shutdown_function( |
81 | - function ($filename) { |
|
81 | + function($filename) { |
|
82 | 82 | @unlink($filename); |
83 | 83 | }, |
84 | 84 | $tmp |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | foreach (['user', 'name', 'type'] as $key) { |
96 | 96 | $v = $value->{"get$key"}(); |
97 | 97 | if ($v) { |
98 | - $return[$key]=$v; |
|
98 | + $return[$key] = $v; |
|
99 | 99 | } |
100 | 100 | } |
101 | 101 |
@@ -31,7 +31,7 @@ |
||
31 | 31 | public function setMetaData($key, $value = null) |
32 | 32 | { |
33 | 33 | if (is_array($key)) { |
34 | - $this->metaData = $key; |
|
34 | + $this->metaData = $key; |
|
35 | 35 | } else { |
36 | 36 | $this->metaData[$key] = $value; |
37 | 37 | } |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | $name = $this->default; |
83 | 83 | } |
84 | 84 | |
85 | - if (!isset(static::$orderMap[ $name ])) { |
|
85 | + if (!isset(static::$orderMap[$name])) { |
|
86 | 86 | throw new \InvalidArgumentException(sprintf( |
87 | 87 | 'Unknown status name "%s" for "%s"', |
88 | 88 | $name, |
@@ -91,6 +91,6 @@ discard block |
||
91 | 91 | } |
92 | 92 | |
93 | 93 | $this->name = $name; |
94 | - $this->order = static::$orderMap[ $name ]; |
|
94 | + $this->order = static::$orderMap[$name]; |
|
95 | 95 | } |
96 | 96 | } |
@@ -52,10 +52,10 @@ |
||
52 | 52 | |
53 | 53 | if ($emailOrAddressOrList instanceof UserInterface) { |
54 | 54 | parent::updateAddressList( |
55 | - $addressList, |
|
56 | - $emailOrAddressOrList->getInfo()->getEmail(), |
|
57 | - $emailOrAddressOrList->getInfo()->getDisplayName(false), |
|
58 | - $callingMethod |
|
55 | + $addressList, |
|
56 | + $emailOrAddressOrList->getInfo()->getEmail(), |
|
57 | + $emailOrAddressOrList->getInfo()->getDisplayName(false), |
|
58 | + $callingMethod |
|
59 | 59 | ); |
60 | 60 | return; |
61 | 61 | } |
@@ -26,7 +26,7 @@ |
||
26 | 26 | throw new \InvalidArgumentException( |
27 | 27 | sprintf( |
28 | 28 | 'Expected $options to be an array or \Traversable, but received %s', |
29 | - (is_object($options) ? 'instance of ' . get_class($options) : 'skalar') |
|
29 | + (is_object($options) ? 'instance of '.get_class($options) : 'skalar') |
|
30 | 30 | ) |
31 | 31 | ); |
32 | 32 | } |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | throw new \InvalidArgumentException( |
40 | 40 | sprintf( |
41 | 41 | 'Expect an array or an instance of \Traversable, but received %s', |
42 | - is_object($variables) ? 'instance of ' . get_class($variables) : 'skalar' |
|
42 | + is_object($variables) ? 'instance of '.get_class($variables) : 'skalar' |
|
43 | 43 | ) |
44 | 44 | ); |
45 | 45 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | throw new \InvalidArgumentException( |
70 | 70 | sprintf( |
71 | 71 | 'Expect an array or an instance of \Traversable, but received %s', |
72 | - is_object($callbacks) ? 'instance of ' . get_class($callbacks) : 'skalar' |
|
72 | + is_object($callbacks) ? 'instance of '.get_class($callbacks) : 'skalar' |
|
73 | 73 | ) |
74 | 74 | ); |
75 | 75 | } |
@@ -141,6 +141,6 @@ discard block |
||
141 | 141 | |
142 | 142 | protected function getNamePattern($name) |
143 | 143 | { |
144 | - return '~##' . preg_quote($name) . '##~is'; |
|
144 | + return '~##'.preg_quote($name).'##~is'; |
|
145 | 145 | } |
146 | 146 | } |