@@ -73,7 +73,7 @@ |
||
73 | 73 | */ |
74 | 74 | public function getIDString(): string |
75 | 75 | { |
76 | - return 'G' . sprintf('%06d', $this->getID()); |
|
76 | + return 'G'.sprintf('%06d', $this->getID()); |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | public function getPermissions(): PermissionsEmbed |
@@ -283,9 +283,9 @@ discard block |
||
283 | 283 | public function getPermissionValue(string $permission_name, int $bit_n) : ?bool |
284 | 284 | { |
285 | 285 | $value = $this->getBitValue($permission_name, $bit_n); |
286 | - if($value == self::ALLOW) { |
|
286 | + if ($value == self::ALLOW) { |
|
287 | 287 | return true; |
288 | - } elseif($value == self::DISALLOW) { |
|
288 | + } elseif ($value == self::DISALLOW) { |
|
289 | 289 | return false; |
290 | 290 | } else { |
291 | 291 | return null; |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | */ |
301 | 301 | final protected static function readBitPair(int $data, int $n): int |
302 | 302 | { |
303 | - Assert::lessThanEq($n,31, '$n must be smaller than 32, because only a 32bit int is used! Got %s.'); |
|
303 | + Assert::lessThanEq($n, 31, '$n must be smaller than 32, because only a 32bit int is used! Got %s.'); |
|
304 | 304 | if ($n % 2 !== 0) { |
305 | 305 | throw new \InvalidArgumentException('$n must be dividable by 2, because we address bit pairs here!'); |
306 | 306 | } |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | */ |
319 | 319 | final protected static function writeBitPair(int $data, int $n, int $new) : int |
320 | 320 | { |
321 | - Assert::lessThanEq($n,31, '$n must be smaller than 32, because only a 32bit int is used! Got %s.'); |
|
321 | + Assert::lessThanEq($n, 31, '$n must be smaller than 32, because only a 32bit int is used! Got %s.'); |
|
322 | 322 | Assert::lessThanEq($new, 3, '$new must be smaller than 3, because a bit pair is written! Got %s.'); |
323 | 323 | |
324 | 324 | if ($n % 2 !== 0) { |
@@ -63,7 +63,7 @@ |
||
63 | 63 | // if the user is anonymous, we use the anonymous user. |
64 | 64 | if (!$user instanceof User) { |
65 | 65 | $user = $this->entityManager->find(User::class, User::ID_ANONYMOUS); |
66 | - if($user === null) { |
|
66 | + if ($user === null) { |
|
67 | 67 | return false; |
68 | 68 | } |
69 | 69 | } |
@@ -40,7 +40,7 @@ |
||
40 | 40 | |
41 | 41 | protected function voteOnUser($attribute, $subject, User $user): bool |
42 | 42 | { |
43 | - if($subject instanceof Part) { |
|
43 | + if ($subject instanceof Part) { |
|
44 | 44 | //Null concealing operator means, that no |
45 | 45 | return $this->resolver->inherit($user, 'parts', $attribute) ?? false; |
46 | 46 | } |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | class User extends NamedDBElement implements UserInterface, HasPermissionsInterface |
49 | 49 | { |
50 | 50 | /** The User id of the anonymous user */ |
51 | - const ID_ANONYMOUS = 1; |
|
51 | + const ID_ANONYMOUS = 1; |
|
52 | 52 | |
53 | 53 | /** |
54 | 54 | * @ORM\Id() |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | */ |
216 | 216 | public function getIDString(): string |
217 | 217 | { |
218 | - return 'U' . sprintf('%06d', $this->getID()); |
|
218 | + return 'U'.sprintf('%06d', $this->getID()); |
|
219 | 219 | } |
220 | 220 | |
221 | 221 | |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | public function setName(string $new_name) : NamedDBElement |
232 | 232 | { |
233 | 233 | // Anonymous user is not allowed to change its username |
234 | - if(!$this->isAnonymousUser()) { |
|
234 | + if (!$this->isAnonymousUser()) { |
|
235 | 235 | $this->name = $new_name; |
236 | 236 | } |
237 | 237 |