@@ -24,11 +24,13 @@ |
||
| 24 | 24 | { |
| 25 | 25 | /** |
| 26 | 26 | * @param ReviewableInterface $reviewSubject |
| 27 | + * @return void |
|
| 27 | 28 | */ |
| 28 | 29 | public function update(ReviewableInterface $reviewSubject): void; |
| 29 | 30 | |
| 30 | 31 | /** |
| 31 | 32 | * @param ReviewInterface $review |
| 33 | + * @return void |
|
| 32 | 34 | */ |
| 33 | 35 | public function updateFromReview(ReviewInterface $review): void; |
| 34 | 36 | } |
@@ -32,11 +32,13 @@ discard block |
||
| 32 | 32 | |
| 33 | 33 | /** |
| 34 | 34 | * @param ReviewInterface $review |
| 35 | + * @return void |
|
| 35 | 36 | */ |
| 36 | 37 | public function addReview(ReviewInterface $review): void; |
| 37 | 38 | |
| 38 | 39 | /** |
| 39 | 40 | * @param ReviewInterface $review |
| 41 | + * @return void |
|
| 40 | 42 | */ |
| 41 | 43 | public function removeReview(ReviewInterface $review): void; |
| 42 | 44 | |
@@ -47,6 +49,7 @@ discard block |
||
| 47 | 49 | |
| 48 | 50 | /** |
| 49 | 51 | * @param float $averageRating |
| 52 | + * @return void |
|
| 50 | 53 | */ |
| 51 | 54 | public function setAverageRating(float $averageRating): void; |
| 52 | 55 | } |
@@ -33,6 +33,7 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | /** |
| 35 | 35 | * @param string|null $title |
| 36 | + * @return void |
|
| 36 | 37 | */ |
| 37 | 38 | public function setTitle(?string $title): void; |
| 38 | 39 | |
@@ -43,6 +44,7 @@ discard block |
||
| 43 | 44 | |
| 44 | 45 | /** |
| 45 | 46 | * @param int|null $rating |
| 47 | + * @return void |
|
| 46 | 48 | */ |
| 47 | 49 | public function setRating(?int $rating): void; |
| 48 | 50 | |
@@ -53,6 +55,7 @@ discard block |
||
| 53 | 55 | |
| 54 | 56 | /** |
| 55 | 57 | * @param string|null $comment |
| 58 | + * @return void |
|
| 56 | 59 | */ |
| 57 | 60 | public function setComment(?string $comment): void; |
| 58 | 61 | |
@@ -63,6 +66,7 @@ discard block |
||
| 63 | 66 | |
| 64 | 67 | /** |
| 65 | 68 | * @param ReviewerInterface|null $author |
| 69 | + * @return void |
|
| 66 | 70 | */ |
| 67 | 71 | public function setAuthor(?ReviewerInterface $author): void; |
| 68 | 72 | |
@@ -73,6 +77,7 @@ discard block |
||
| 73 | 77 | |
| 74 | 78 | /** |
| 75 | 79 | * @param string|null $status |
| 80 | + * @return void |
|
| 76 | 81 | */ |
| 77 | 82 | public function setStatus(?string $status): void; |
| 78 | 83 | |
@@ -83,6 +88,7 @@ discard block |
||
| 83 | 88 | |
| 84 | 89 | /** |
| 85 | 90 | * @param ReviewableInterface|null $reviewSubject |
| 91 | + * @return void |
|
| 86 | 92 | */ |
| 87 | 93 | public function setReviewSubject(?ReviewableInterface $reviewSubject): void; |
| 88 | 94 | } |
@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | * file that was distributed with this source code. |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -declare(strict_types=1); |
|
| 12 | +declare(strict_types = 1); |
|
| 13 | 13 | |
| 14 | 14 | namespace Sylius\Component\Review\Model; |
| 15 | 15 | |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | /** |
| 35 | 35 | * @param string|null $title |
| 36 | 36 | */ |
| 37 | - public function setTitle(?string $title): void; |
|
| 37 | + public function setTitle(?string $title) : void; |
|
| 38 | 38 | |
| 39 | 39 | /** |
| 40 | 40 | * @return int|null |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | /** |
| 45 | 45 | * @param int|null $rating |
| 46 | 46 | */ |
| 47 | - public function setRating(?int $rating): void; |
|
| 47 | + public function setRating(?int $rating) : void; |
|
| 48 | 48 | |
| 49 | 49 | /** |
| 50 | 50 | * @return string|null |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | /** |
| 55 | 55 | * @param string|null $comment |
| 56 | 56 | */ |
| 57 | - public function setComment(?string $comment): void; |
|
| 57 | + public function setComment(?string $comment) : void; |
|
| 58 | 58 | |
| 59 | 59 | /** |
| 60 | 60 | * @return ReviewerInterface|null |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | /** |
| 65 | 65 | * @param ReviewerInterface|null $author |
| 66 | 66 | */ |
| 67 | - public function setAuthor(?ReviewerInterface $author): void; |
|
| 67 | + public function setAuthor(?ReviewerInterface $author) : void; |
|
| 68 | 68 | |
| 69 | 69 | /** |
| 70 | 70 | * @return string|null |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | /** |
| 75 | 75 | * @param string|null $status |
| 76 | 76 | */ |
| 77 | - public function setStatus(?string $status): void; |
|
| 77 | + public function setStatus(?string $status) : void; |
|
| 78 | 78 | |
| 79 | 79 | /** |
| 80 | 80 | * @return ReviewableInterface|null |
@@ -84,5 +84,5 @@ discard block |
||
| 84 | 84 | /** |
| 85 | 85 | * @param ReviewableInterface|null $reviewSubject |
| 86 | 86 | */ |
| 87 | - public function setReviewSubject(?ReviewableInterface $reviewSubject): void; |
|
| 87 | + public function setReviewSubject(?ReviewableInterface $reviewSubject) : void; |
|
| 88 | 88 | } |
@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | * file that was distributed with this source code. |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -declare(strict_types=1); |
|
| 12 | +declare(strict_types = 1); |
|
| 13 | 13 | |
| 14 | 14 | namespace Sylius\Component\Review\Factory; |
| 15 | 15 | |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | /** |
| 60 | 60 | * {@inheritdoc} |
| 61 | 61 | */ |
| 62 | - public function createForSubjectWithReviewer(ReviewableInterface $subject, ?ReviewerInterface $reviewer): ReviewInterface |
|
| 62 | + public function createForSubjectWithReviewer(ReviewableInterface $subject, ?ReviewerInterface $reviewer) : ReviewInterface |
|
| 63 | 63 | { |
| 64 | 64 | /** @var ReviewInterface $review */ |
| 65 | 65 | $review = $this->createForSubject($subject); |
@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | * file that was distributed with this source code. |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -declare(strict_types=1); |
|
| 12 | +declare(strict_types = 1); |
|
| 13 | 13 | |
| 14 | 14 | namespace Sylius\Component\Review\Factory; |
| 15 | 15 | |
@@ -36,5 +36,5 @@ discard block |
||
| 36 | 36 | * |
| 37 | 37 | * @return ReviewInterface |
| 38 | 38 | */ |
| 39 | - public function createForSubjectWithReviewer(ReviewableInterface $subject, ?ReviewerInterface $reviewer): ReviewInterface; |
|
| 39 | + public function createForSubjectWithReviewer(ReviewableInterface $subject, ?ReviewerInterface $reviewer) : ReviewInterface; |
|
| 40 | 40 | } |
@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | * file that was distributed with this source code. |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -declare(strict_types=1); |
|
| 12 | +declare(strict_types = 1); |
|
| 13 | 13 | |
| 14 | 14 | namespace Sylius\Component\Review\Model; |
| 15 | 15 | |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | /** |
| 84 | 84 | * {@inheritdoc} |
| 85 | 85 | */ |
| 86 | - public function setTitle(?string $title): void |
|
| 86 | + public function setTitle(?string $title) : void |
|
| 87 | 87 | { |
| 88 | 88 | $this->title = $title; |
| 89 | 89 | } |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | /** |
| 100 | 100 | * {@inheritdoc} |
| 101 | 101 | */ |
| 102 | - public function setRating(?int $rating): void |
|
| 102 | + public function setRating(?int $rating) : void |
|
| 103 | 103 | { |
| 104 | 104 | $this->rating = $rating; |
| 105 | 105 | } |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | /** |
| 116 | 116 | * {@inheritdoc} |
| 117 | 117 | */ |
| 118 | - public function setComment(?string $comment): void |
|
| 118 | + public function setComment(?string $comment) : void |
|
| 119 | 119 | { |
| 120 | 120 | $this->comment = $comment; |
| 121 | 121 | } |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | /** |
| 132 | 132 | * {@inheritdoc} |
| 133 | 133 | */ |
| 134 | - public function setAuthor(?ReviewerInterface $author): void |
|
| 134 | + public function setAuthor(?ReviewerInterface $author) : void |
|
| 135 | 135 | { |
| 136 | 136 | $this->author = $author; |
| 137 | 137 | } |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | /** |
| 148 | 148 | * {@inheritdoc} |
| 149 | 149 | */ |
| 150 | - public function setStatus(?string $status): void |
|
| 150 | + public function setStatus(?string $status) : void |
|
| 151 | 151 | { |
| 152 | 152 | $this->status = $status; |
| 153 | 153 | } |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | /** |
| 164 | 164 | * {@inheritdoc} |
| 165 | 165 | */ |
| 166 | - public function setReviewSubject(?ReviewableInterface $reviewSubject): void |
|
| 166 | + public function setReviewSubject(?ReviewableInterface $reviewSubject) : void |
|
| 167 | 167 | { |
| 168 | 168 | $this->reviewSubject = $reviewSubject; |
| 169 | 169 | } |
@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | * file that was distributed with this source code. |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -declare(strict_types=1); |
|
| 12 | +declare(strict_types = 1); |
|
| 13 | 13 | |
| 14 | 14 | namespace Sylius\Bundle\ReviewBundle\DependencyInjection\Compiler; |
| 15 | 15 | |
@@ -29,10 +29,10 @@ discard block |
||
| 29 | 29 | public function process(ContainerBuilder $container): void |
| 30 | 30 | { |
| 31 | 31 | foreach ($container->getParameter('sylius.review.subjects') as $subject => $configuration) { |
| 32 | - $factory = $container->findDefinition('sylius.factory.'.$subject.'_review'); |
|
| 32 | + $factory = $container->findDefinition('sylius.factory.' . $subject . '_review'); |
|
| 33 | 33 | $reviewFactoryDefinition = new Definition(ReviewFactory::class); |
| 34 | 34 | |
| 35 | - $reviewFactory = $container->setDefinition(sprintf('sylius.factory.'.$subject.'_review'), $reviewFactoryDefinition); |
|
| 35 | + $reviewFactory = $container->setDefinition(sprintf('sylius.factory.' . $subject . '_review'), $reviewFactoryDefinition); |
|
| 36 | 36 | $reviewFactory->addArgument($factory); |
| 37 | 37 | } |
| 38 | 38 | } |
@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | * file that was distributed with this source code. |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -declare(strict_types=1); |
|
| 12 | +declare(strict_types = 1); |
|
| 13 | 13 | |
| 14 | 14 | namespace Sylius\Bundle\ReviewBundle\DependencyInjection; |
| 15 | 15 | |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | public function load(array $config, ContainerBuilder $container): void |
| 35 | 35 | { |
| 36 | 36 | $config = $this->processConfiguration($this->getConfiguration([], $container), $config); |
| 37 | - $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
| 37 | + $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
| 38 | 38 | |
| 39 | 39 | $this->registerResources('sylius', $config['driver'], $this->resolveResources($config['resources'], $container), $container); |
| 40 | 40 | |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | foreach ($resources as $subjectName => $subjectConfig) { |
| 60 | 60 | foreach ($subjectConfig as $resourceName => $resourceConfig) { |
| 61 | 61 | if (is_array($resourceConfig)) { |
| 62 | - $resolvedResources[$subjectName.'_'.$resourceName] = $resourceConfig; |
|
| 62 | + $resolvedResources[$subjectName . '_' . $resourceName] = $resourceConfig; |
|
| 63 | 63 | } |
| 64 | 64 | } |
| 65 | 65 | } |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | */ |
| 44 | 44 | public function registerContainerConfiguration(LoaderInterface $loader): void |
| 45 | 45 | { |
| 46 | - $loader->load(__DIR__.'/config/config.yml'); |
|
| 46 | + $loader->load(__DIR__ . '/config/config.yml'); |
|
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | /** |