@@ -146,18 +146,18 @@ |
||
146 | 146 | $size = $this->getLength(); |
147 | 147 | |
148 | 148 | if ($size >= 1073741824) { |
149 | - return round($size / 1073741824, 2) . ' GB'; |
|
149 | + return round($size / 1073741824, 2).' GB'; |
|
150 | 150 | } |
151 | 151 | |
152 | 152 | if ($size >= 1048576) { |
153 | - return round($size / 1048576, 2) . ' MB'; |
|
153 | + return round($size / 1048576, 2).' MB'; |
|
154 | 154 | } |
155 | 155 | |
156 | 156 | if ($size >= 1024) { |
157 | - return round($size / 1024, 2) . ' kB'; |
|
157 | + return round($size / 1024, 2).' kB'; |
|
158 | 158 | } |
159 | 159 | |
160 | - return (string)$size; |
|
160 | + return (string) $size; |
|
161 | 161 | } |
162 | 162 | |
163 | 163 | /** |
@@ -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 | ); |
@@ -43,7 +43,7 @@ |
||
43 | 43 | $setterMethods = $object->getSetters(); |
44 | 44 | } |
45 | 45 | foreach ($data as $key => $value) { |
46 | - $setter = 'set' . ucfirst($key); |
|
46 | + $setter = 'set'.ucfirst($key); |
|
47 | 47 | if (in_array($setter, $setterMethods)) { |
48 | 48 | $object->$setter($value); |
49 | 49 | } else { |
@@ -61,8 +61,8 @@ |
||
61 | 61 | $file = $this->getFileEntity(); |
62 | 62 | |
63 | 63 | $file->setName($value['name']) |
64 | - ->setType($value['type']) |
|
65 | - ->setFile($value['tmp_name']); |
|
64 | + ->setType($value['type']) |
|
65 | + ->setFile($value['tmp_name']); |
|
66 | 66 | |
67 | 67 | return $file; |
68 | 68 | } |
@@ -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 |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | $imageSpecs = $this->options->getImages(); |
87 | 87 | |
88 | 88 | |
89 | - $images = [ ImageSetInterface::ORIGINAL => $this->createEntity($file, $data) ]; |
|
89 | + $images = [ImageSetInterface::ORIGINAL => $this->createEntity($file, $data)]; |
|
90 | 90 | |
91 | 91 | foreach ($imageSpecs as $key => $size) { |
92 | 92 | $newImage = ImageSetInterface::THUMBNAIL == $key |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | : $this->createImage($image, $size); |
95 | 95 | |
96 | 96 | if ($newImage) { |
97 | - $entity = $this->createEntity($newImage, $data, $key); |
|
97 | + $entity = $this->createEntity($newImage, $data, $key); |
|
98 | 98 | $images[$key] = $entity; |
99 | 99 | } |
100 | 100 | } |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | |
143 | 143 | $entity |
144 | 144 | ->setFile($file) |
145 | - ->setName(($prefix ? "$prefix-" : '') . $data['name']) |
|
145 | + ->setName(($prefix ? "$prefix-" : '').$data['name']) |
|
146 | 146 | ->setType($data['type']) |
147 | 147 | ; |
148 | 148 |