@@ -85,6 +85,10 @@ |
||
| 85 | 85 | return new SingleResourceResponse($form, new ResponseContext(400)); |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | + /** |
|
| 89 | + * @param \SWP\Bundle\CoreBundle\Model\ContentListInterface $contentBucket |
|
| 90 | + * @param \SWP\Bundle\FacebookInstantArticlesBundle\Model\PageInterface $facebookPage |
|
| 91 | + */ |
|
| 88 | 92 | private function checkIfFeedExists($contentBucket, $facebookPage) |
| 89 | 93 | { |
| 90 | 94 | if (null !== $this->get('swp.repository.facebook_instant_articles_feed')->findOneBy([ |
@@ -147,7 +147,7 @@ |
||
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | /** |
| 150 | - * @param $id |
|
| 150 | + * @param integer $id |
|
| 151 | 151 | * |
| 152 | 152 | * @throws NotFoundHttpException |
| 153 | 153 | * |
@@ -82,6 +82,9 @@ |
||
| 82 | 82 | return $list; |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | + /** |
|
| 86 | + * @param string $id |
|
| 87 | + */ |
|
| 85 | 88 | private function findArticleOr404($id) |
| 86 | 89 | { |
| 87 | 90 | if (null === $article = $this->get('swp.repository.article')->findOneById($id)) { |
@@ -61,6 +61,9 @@ discard block |
||
| 61 | 61 | return new ResourcesListResponse($items); |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | + /** |
|
| 65 | + * @param string $id |
|
| 66 | + */ |
|
| 64 | 67 | private function findOr404($id): ?SlideshowInterface |
| 65 | 68 | { |
| 66 | 69 | if (null === $slideshow = $this->get('swp.repository.slideshow')->findOneById($id)) { |
@@ -70,6 +73,9 @@ discard block |
||
| 70 | 73 | return $slideshow; |
| 71 | 74 | } |
| 72 | 75 | |
| 76 | + /** |
|
| 77 | + * @param string $id |
|
| 78 | + */ |
|
| 73 | 79 | private function findArticleOr404($id) |
| 74 | 80 | { |
| 75 | 81 | if (null === $article = $this->get('swp.repository.article')->findOneById($id)) { |
@@ -107,6 +107,9 @@ |
||
| 107 | 107 | return new SingleResourceResponse($form, new ResponseContext(400)); |
| 108 | 108 | } |
| 109 | 109 | |
| 110 | + /** |
|
| 111 | + * @param UserInterface $requestedUser |
|
| 112 | + */ |
|
| 110 | 113 | private function checkIfCanAccess($requestedUser) |
| 111 | 114 | { |
| 112 | 115 | /** @var UserInterface $currentUser */ |
@@ -29,6 +29,7 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | /** |
| 31 | 31 | * @param string $about |
| 32 | + * @return void |
|
| 32 | 33 | */ |
| 33 | 34 | public function setAbout(string $about); |
| 34 | 35 | |
@@ -39,6 +40,7 @@ discard block |
||
| 39 | 40 | |
| 40 | 41 | /** |
| 41 | 42 | * @param string $firstName |
| 43 | + * @return void |
|
| 42 | 44 | */ |
| 43 | 45 | public function setFirstName(string $firstName); |
| 44 | 46 | |
@@ -49,6 +51,7 @@ discard block |
||
| 49 | 51 | |
| 50 | 52 | /** |
| 51 | 53 | * @param string $lastName |
| 54 | + * @return void |
|
| 52 | 55 | */ |
| 53 | 56 | public function setLastName(string $lastName); |
| 54 | 57 | } |
@@ -74,7 +74,7 @@ |
||
| 74 | 74 | |
| 75 | 75 | private function getRelated(PackageInterface $package): RelatedArticleList |
| 76 | 76 | { |
| 77 | - $relatedItemsGroups = $package->getGroups()->filter(function ($group) { |
|
| 77 | + $relatedItemsGroups = $package->getGroups()->filter(function($group) { |
|
| 78 | 78 | return GroupInterface::TYPE_RELATED === $group->getType(); |
| 79 | 79 | }); |
| 80 | 80 | |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | |
| 165 | 165 | protected function retryDecider() |
| 166 | 166 | { |
| 167 | - return function ( |
|
| 167 | + return function( |
|
| 168 | 168 | $retries, |
| 169 | 169 | Request $request, |
| 170 | 170 | Response $response = null, |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | |
| 206 | 206 | protected function retryDelay() |
| 207 | 207 | { |
| 208 | - return function ($numberOfRetries): int { |
|
| 208 | + return function($numberOfRetries): int { |
|
| 209 | 209 | return 1000 * $numberOfRetries; |
| 210 | 210 | }; |
| 211 | 211 | } |
@@ -47,8 +47,7 @@ |
||
| 47 | 47 | { |
| 48 | 48 | $this->data = [ |
| 49 | 49 | 'currentPage' => $this->context->getCurrentPage() instanceof MetaInterface ? |
| 50 | - $this->getRouteData($this->context->getCurrentPage()->getValues()) : |
|
| 51 | - [], |
|
| 50 | + $this->getRouteData($this->context->getCurrentPage()->getValues()) : [], |
|
| 52 | 51 | 'registeredMeta' => $this->context->getRegisteredMeta(), |
| 53 | 52 | ]; |
| 54 | 53 | } |