@@ -67,7 +67,7 @@ |
||
67 | 67 | * |
68 | 68 | * @throws \RuntimeException |
69 | 69 | * |
70 | - * @return string |
|
70 | + * @return integer |
|
71 | 71 | */ |
72 | 72 | private function tryToMapPaymentMethodName($paymentMethodName) |
73 | 73 | { |
@@ -187,6 +187,7 @@ |
||
187 | 187 | |
188 | 188 | /** |
189 | 189 | * {@inheritdoc} |
190 | + * @param string $field |
|
190 | 191 | */ |
191 | 192 | private function getFieldName($field) |
192 | 193 | { |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | $parameterName = $this->getParameterName($field); |
66 | 66 | $this->queryBuilder->setParameter($parameterName, $value); |
67 | 67 | |
68 | - return $this->queryBuilder->expr()->eq($this->getFieldName($field), ':'.$parameterName); |
|
68 | + return $this->queryBuilder->expr()->eq($this->getFieldName($field), ':' . $parameterName); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | /** |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | $parameterName = $this->getParameterName($field); |
77 | 77 | $this->queryBuilder->setParameter($parameterName, $value); |
78 | 78 | |
79 | - return $this->queryBuilder->expr()->neq($this->getFieldName($field), ':'.$parameterName); |
|
79 | + return $this->queryBuilder->expr()->neq($this->getFieldName($field), ':' . $parameterName); |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | /** |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | $parameterName = $this->getParameterName($field); |
88 | 88 | $this->queryBuilder->setParameter($parameterName, $value); |
89 | 89 | |
90 | - $this->queryBuilder->andWhere($this->getFieldName($field).' < :'.$parameterName); |
|
90 | + $this->queryBuilder->andWhere($this->getFieldName($field) . ' < :' . $parameterName); |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | /** |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | $parameterName = $this->getParameterName($field); |
99 | 99 | $this->queryBuilder->setParameter($parameterName, $value); |
100 | 100 | |
101 | - $this->queryBuilder->andWhere($this->getFieldName($field).' <= :'.$parameterName); |
|
101 | + $this->queryBuilder->andWhere($this->getFieldName($field) . ' <= :' . $parameterName); |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | /** |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | $parameterName = $this->getParameterName($field); |
110 | 110 | $this->queryBuilder->setParameter($parameterName, $value); |
111 | 111 | |
112 | - $this->queryBuilder->andWhere($this->getFieldName($field).' > :'.$parameterName); |
|
112 | + $this->queryBuilder->andWhere($this->getFieldName($field) . ' > :' . $parameterName); |
|
113 | 113 | } |
114 | 114 | |
115 | 115 | /** |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | $parameterName = $this->getParameterName($field); |
121 | 121 | $this->queryBuilder->setParameter($parameterName, $value); |
122 | 122 | |
123 | - $this->queryBuilder->andWhere($this->getFieldName($field).' >= :'.$parameterName); |
|
123 | + $this->queryBuilder->andWhere($this->getFieldName($field) . ' >= :' . $parameterName); |
|
124 | 124 | } |
125 | 125 | |
126 | 126 | /** |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | private function getFieldName($field) |
194 | 194 | { |
195 | 195 | if (false === strpos($field, '.')) { |
196 | - return $this->queryBuilder->getRootAlias().'.'.$field; |
|
196 | + return $this->queryBuilder->getRootAlias() . '.' . $field; |
|
197 | 197 | } |
198 | 198 | |
199 | 199 | return $field; |
@@ -80,6 +80,7 @@ |
||
80 | 80 | |
81 | 81 | /** |
82 | 82 | * {@inheritdoc} |
83 | + * @param string|null $url |
|
83 | 84 | */ |
84 | 85 | public function redirect(RequestConfiguration $configuration, $url, $status = 302) |
85 | 86 | { |
@@ -85,11 +85,11 @@ |
||
85 | 85 | { |
86 | 86 | if ($configuration->isHeaderRedirection()) { |
87 | 87 | return new Response('', 200, [ |
88 | - 'X-SYLIUS-LOCATION' => $url.$configuration->getRedirectHash(), |
|
88 | + 'X-SYLIUS-LOCATION' => $url . $configuration->getRedirectHash(), |
|
89 | 89 | ]); |
90 | 90 | } |
91 | 91 | |
92 | - return new RedirectResponse($url.$configuration->getRedirectHash(), $status); |
|
92 | + return new RedirectResponse($url . $configuration->getRedirectHash(), $status); |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | /** |
@@ -70,7 +70,7 @@ |
||
70 | 70 | |
71 | 71 | /** |
72 | 72 | * @param ClassMetadataInfo $metadata |
73 | - * @param $configuration |
|
73 | + * @param \Doctrine\ORM\Configuration $configuration |
|
74 | 74 | */ |
75 | 75 | private function setAssociationMappings(ClassMetadataInfo $metadata, $configuration) |
76 | 76 | { |
@@ -153,7 +153,7 @@ |
||
153 | 153 | * Check if a unique constraint has been defined. |
154 | 154 | * |
155 | 155 | * @param ClassMetadata $metadata |
156 | - * @param array $columns |
|
156 | + * @param string[] $columns |
|
157 | 157 | * |
158 | 158 | * @return bool |
159 | 159 | */ |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | } |
135 | 135 | |
136 | 136 | /** @var MetadataInterface $translationResourceMetadata */ |
137 | - $translationResourceMetadata = $this->resourceMetadataRegistry->get($resourceMetadata->getAlias().'_translation'); |
|
137 | + $translationResourceMetadata = $this->resourceMetadataRegistry->get($resourceMetadata->getAlias() . '_translation'); |
|
138 | 138 | |
139 | 139 | $metadata->mapOneToMany([ |
140 | 140 | 'fieldName' => 'translations', |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | if (!$this->hasUniqueConstraint($metadata, $columns)) { |
195 | 195 | $constraints = isset($metadata->table['uniqueConstraints']) ? $metadata->table['uniqueConstraints'] : []; |
196 | 196 | |
197 | - $constraints[$metadata->getTableName().'_uniq_trans'] = [ |
|
197 | + $constraints[$metadata->getTableName() . '_uniq_trans'] = [ |
|
198 | 198 | 'columns' => $columns, |
199 | 199 | ]; |
200 | 200 |
@@ -40,7 +40,7 @@ |
||
40 | 40 | } |
41 | 41 | |
42 | 42 | /** |
43 | - * @param mixed $value |
|
43 | + * @param ToggleableInterface $value |
|
44 | 44 | */ |
45 | 45 | private function ensureValueImplementsToggleableInterface($value) |
46 | 46 | { |
@@ -16,8 +16,8 @@ |
||
16 | 16 | use Sylius\Bundle\ReviewBundle\Doctrine\ORM\ReviewRepository; |
17 | 17 | use Sylius\Bundle\ReviewBundle\Form\Type\ReviewType; |
18 | 18 | use Sylius\Component\Resource\Factory\Factory; |
19 | -use Sylius\Component\Review\Model\ReviewerInterface; |
|
20 | 19 | use Sylius\Component\Review\Model\ReviewInterface; |
20 | +use Sylius\Component\Review\Model\ReviewerInterface; |
|
21 | 21 | use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; |
22 | 22 | use Symfony\Component\Config\Definition\Builder\TreeBuilder; |
23 | 23 | use Symfony\Component\Config\Definition\ConfigurationInterface; |
@@ -75,7 +75,7 @@ |
||
75 | 75 | * @param ReviewInterface $review |
76 | 76 | * @param ReviewableInterface[] $reviewSubjectsToRecalculate |
77 | 77 | * |
78 | - * @return array |
|
78 | + * @return ReviewableInterface[] |
|
79 | 79 | */ |
80 | 80 | private function removeReviewsAndExtractSubject(ReviewInterface $review, array $reviewSubjectsToRecalculate) |
81 | 81 | { |
@@ -12,9 +12,9 @@ |
||
12 | 12 | namespace spec\Sylius\Component\Review\Model; |
13 | 13 | |
14 | 14 | use PhpSpec\ObjectBehavior; |
15 | +use Sylius\Component\Review\Model\ReviewInterface; |
|
15 | 16 | use Sylius\Component\Review\Model\ReviewableInterface; |
16 | 17 | use Sylius\Component\Review\Model\ReviewerInterface; |
17 | -use Sylius\Component\Review\Model\ReviewInterface; |
|
18 | 18 | |
19 | 19 | /** |
20 | 20 | * @author Mateusz Zalewski <[email protected]> |
@@ -33,6 +33,7 @@ discard block |
||
33 | 33 | * |
34 | 34 | * @throws FileNotFoundException When originFile doesn't exist |
35 | 35 | * @throws IOException When copy fails |
36 | + * @return void |
|
36 | 37 | */ |
37 | 38 | public function copy($originFile, $targetFile, $override = false); |
38 | 39 | |
@@ -43,13 +44,14 @@ discard block |
||
43 | 44 | * @param int $mode The directory mode |
44 | 45 | * |
45 | 46 | * @throws IOException On any directory creation failure |
47 | + * @return void |
|
46 | 48 | */ |
47 | 49 | public function mkdir($dirs, $mode = 0777); |
48 | 50 | |
49 | 51 | /** |
50 | 52 | * Checks the existence of files or directories. |
51 | 53 | * |
52 | - * @param string|array|\Traversable $files A filename, an array of files, or a \Traversable instance to check |
|
54 | + * @param string $files A filename, an array of files, or a \Traversable instance to check |
|
53 | 55 | * |
54 | 56 | * @return bool true if the file exists, false otherwise |
55 | 57 | */ |
@@ -63,6 +65,7 @@ discard block |
||
63 | 65 | * @param int $atime The access time as a Unix timestamp |
64 | 66 | * |
65 | 67 | * @throws IOException When touch fails |
68 | + * @return void |
|
66 | 69 | */ |
67 | 70 | public function touch($files, $time = null, $atime = null); |
68 | 71 | |
@@ -72,6 +75,7 @@ discard block |
||
72 | 75 | * @param string|array|\Traversable $files A filename, an array of files, or a \Traversable instance to remove |
73 | 76 | * |
74 | 77 | * @throws IOException When removal fails |
78 | + * @return void |
|
75 | 79 | */ |
76 | 80 | public function remove($files); |
77 | 81 | |
@@ -84,6 +88,7 @@ discard block |
||
84 | 88 | * @param bool $recursive Whether change the mod recursively or not |
85 | 89 | * |
86 | 90 | * @throws IOException When the change fail |
91 | + * @return void |
|
87 | 92 | */ |
88 | 93 | public function chmod($files, $mode, $umask = 0000, $recursive = false); |
89 | 94 | |
@@ -95,6 +100,7 @@ discard block |
||
95 | 100 | * @param bool $recursive Whether change the owner recursively or not |
96 | 101 | * |
97 | 102 | * @throws IOException When the change fail |
103 | + * @return void |
|
98 | 104 | */ |
99 | 105 | public function chown($files, $user, $recursive = false); |
100 | 106 | |
@@ -106,6 +112,7 @@ discard block |
||
106 | 112 | * @param bool $recursive Whether change the group recursively or not |
107 | 113 | * |
108 | 114 | * @throws IOException When the change fail |
115 | + * @return void |
|
109 | 116 | */ |
110 | 117 | public function chgrp($files, $group, $recursive = false); |
111 | 118 | |
@@ -118,6 +125,7 @@ discard block |
||
118 | 125 | * |
119 | 126 | * @throws IOException When target file or directory already exists |
120 | 127 | * @throws IOException When origin cannot be renamed |
128 | + * @return void |
|
121 | 129 | */ |
122 | 130 | public function rename($origin, $target, $overwrite = false); |
123 | 131 | |
@@ -129,6 +137,7 @@ discard block |
||
129 | 137 | * @param bool $copyOnWindows Whether to copy files if on Windows |
130 | 138 | * |
131 | 139 | * @throws IOException When symlink fails |
140 | + * @return void |
|
132 | 141 | */ |
133 | 142 | public function symlink($originDir, $targetDir, $copyOnWindows = false); |
134 | 143 | |
@@ -145,6 +154,7 @@ discard block |
||
145 | 154 | * - $options['delete'] Whether to delete files that are not in the source directory (defaults to false) |
146 | 155 | * |
147 | 156 | * @throws IOException When file type is unknown |
157 | + * @return void |
|
148 | 158 | */ |
149 | 159 | public function mirror($originDir, $targetDir, \Traversable $iterator = null, $options = []); |
150 | 160 |