@@ -30,7 +30,7 @@ |
||
30 | 30 | public function execute(string $id, string $type, string $title) |
31 | 31 | { |
32 | 32 | $characteristic = $this->characteristicRepository->getBy(['title' => $title, 'type' => $type]); |
33 | - if(isset($characteristic)){ |
|
33 | + if (isset($characteristic)) { |
|
34 | 34 | throw new CharacteristicAlreadyExists(); |
35 | 35 | } |
36 | 36 | $characteristic = new Characteristic($id, $type, $title, false); |
@@ -33,7 +33,7 @@ |
||
33 | 33 | $this->postalCode = $postalCode; |
34 | 34 | $this->department = (new PostalCode($postalCode))->department(); |
35 | 35 | $this->characteristics = $characteristics; |
36 | - foreach($this->characteristics as $characteristic){ |
|
36 | + foreach ($this->characteristics as $characteristic) { |
|
37 | 37 | $this->characteristicsByType[$characteristic->type()][] = $characteristic; |
38 | 38 | } |
39 | 39 | $this->description = $description; |
@@ -17,7 +17,7 @@ |
||
17 | 17 | $this->doneAt = $doneAt; |
18 | 18 | } |
19 | 19 | |
20 | - public function doneAt():?\DateTime |
|
20 | + public function doneAt(): ?\DateTime |
|
21 | 21 | { |
22 | 22 | return $this->doneAt; |
23 | 23 | } |
@@ -12,7 +12,7 @@ |
||
12 | 12 | public $type; |
13 | 13 | public $icon; |
14 | 14 | |
15 | - public function __construct(string $uuid, string $label, string $type, ?string $icon, $prettyLabel) |
|
15 | + public function __construct(string $uuid, string $label, string $type, ?string $icon, $prettyLabel) |
|
16 | 16 | { |
17 | 17 | $this->uuid = $uuid; |
18 | 18 | $this->label = $label; |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | $userData = $user->toArray(); |
29 | 29 | $username = ucfirst($userData['firstname']).'_'.ucfirst($userData['lastname']); |
30 | 30 | $comments = Cache::get("comments_".$userId); |
31 | - if(isset($comments)){ |
|
31 | + if (isset($comments)) { |
|
32 | 32 | return json_decode($comments, true); |
33 | 33 | } |
34 | 34 | |
@@ -37,13 +37,13 @@ discard block |
||
37 | 37 | $comments = $content['query']['usercontribs']; |
38 | 38 | |
39 | 39 | $commentsToRetrieved = []; |
40 | - foreach($comments as $comment){ |
|
41 | - if(!isset($commentsToRetrieved[$comment['pageid']])) { |
|
40 | + foreach ($comments as $comment) { |
|
41 | + if (!isset($commentsToRetrieved[$comment['pageid']])) { |
|
42 | 42 | $commentsToRetrieved[$comment['pageid']] = $comment; |
43 | 43 | } |
44 | 44 | } |
45 | 45 | |
46 | - foreach($commentsToRetrieved as $pageId => $commentToRetrieved){ |
|
46 | + foreach ($commentsToRetrieved as $pageId => $commentToRetrieved) { |
|
47 | 47 | $response = $this->httpClient->get(config('wiki.api_uri').$this->commentEndPoint.$pageId); |
48 | 48 | $content = json_decode($response->getBody()->getContents(), true); |
49 | 49 | $commentsToRetrieved[$pageId] = array_merge($commentsToRetrieved[$pageId], $content['csquerycomment']); |
@@ -16,7 +16,7 @@ |
||
16 | 16 | $this->contextRepository = $contextRepository; |
17 | 17 | } |
18 | 18 | |
19 | - public function execute(string $userId):?ContextDto |
|
19 | + public function execute(string $userId): ?ContextDto |
|
20 | 20 | { |
21 | 21 | return $this->contextRepository->getByUserDto($userId); |
22 | 22 | } |
@@ -19,7 +19,7 @@ |
||
19 | 19 | { |
20 | 20 | $practisesToReturn = []; |
21 | 21 | $practises = $this->interactionsRepository->getDoneByUser($userId); |
22 | - foreach ($practises as $practise){ |
|
22 | + foreach ($practises as $practise) { |
|
23 | 23 | $year = $practise->doneAt()->format('Y'); |
24 | 24 | $practisesToReturn[$year][] = $practise->toArray(); |
25 | 25 | } |
@@ -25,7 +25,7 @@ |
||
25 | 25 | $this->authGateway = $authGateway; |
26 | 26 | } |
27 | 27 | |
28 | - public function execute(int $pageId):?Interaction |
|
28 | + public function execute(int $pageId): ?Interaction |
|
29 | 29 | { |
30 | 30 | $canInteractUser = $this->getInteractUser(); |
31 | 31 | return $this->interactionRepository->getByInteractUser($canInteractUser, $pageId); |
@@ -18,17 +18,17 @@ |
||
18 | 18 | $h = $img->height(); |
19 | 19 | $w = $img->width(); |
20 | 20 | |
21 | - if($dim == null){ |
|
21 | + if ($dim == null) { |
|
22 | 22 | return $img->response(); |
23 | 23 | } |
24 | 24 | |
25 | 25 | $img = Image::cache(function($image) use($pathPicture, $dim, $w, $h){ |
26 | - if($w <= $h) { |
|
27 | - $image->make($pathPicture)->widen($dim, function ($constraint) { |
|
26 | + if ($w <= $h) { |
|
27 | + $image->make($pathPicture)->widen($dim, function($constraint) { |
|
28 | 28 | $constraint->upsize(); |
29 | 29 | }); |
30 | - }else{ |
|
31 | - $image->make($pathPicture)->heighten($dim, function ($constraint) { |
|
30 | + } else { |
|
31 | + $image->make($pathPicture)->heighten($dim, function($constraint) { |
|
32 | 32 | $constraint->upsize(); |
33 | 33 | }); |
34 | 34 | } |
@@ -31,7 +31,7 @@ |
||
31 | 31 | $image->make($pathPicture)->widen($dim, function ($constraint) { |
32 | 32 | $constraint->upsize(); |
33 | 33 | }); |
34 | - }else{ |
|
34 | + } else{ |
|
35 | 35 | $image->make($pathPicture)->heighten($dim, function ($constraint) { |
36 | 36 | $constraint->upsize(); |
37 | 37 | }); |