@@ -201,6 +201,7 @@ |
||
201 | 201 | * Try to create relative symlink. |
202 | 202 | * |
203 | 203 | * Falling back to absolute symlink and finally hard copy. |
204 | + * @param string $targetDir |
|
204 | 205 | */ |
205 | 206 | private function relativeSymlinkWithFallback($originDir, $targetDir) |
206 | 207 | { |
@@ -153,6 +153,9 @@ |
||
153 | 153 | $this->runCommand($command); |
154 | 154 | } |
155 | 155 | |
156 | + /** |
|
157 | + * @param string $command |
|
158 | + */ |
|
156 | 159 | private function runCommand($command) |
157 | 160 | { |
158 | 161 | if ($this->io->getVerbosity() === OutputInterface::VERBOSITY_DEBUG) { |
@@ -156,7 +156,7 @@ |
||
156 | 156 | private function runCommand($command) |
157 | 157 | { |
158 | 158 | if ($this->io->getVerbosity() === OutputInterface::VERBOSITY_DEBUG) { |
159 | - $command.=' --debug'; |
|
159 | + $command .= ' --debug'; |
|
160 | 160 | $this->io->writeln("Executing: <info>$command</info>"); |
161 | 161 | } |
162 | 162 | if ($this->dryRun) { |
@@ -128,7 +128,6 @@ |
||
128 | 128 | } |
129 | 129 | |
130 | 130 | /** |
131 | - * @param ControllerManager $controllerManager |
|
132 | 131 | * @return CreatePaginator |
133 | 132 | * @codeCoverageIgnore |
134 | 133 | */ |
@@ -121,8 +121,8 @@ |
||
121 | 121 | $paginator = $paginators->get($paginatorName, $params); |
122 | 122 | } |
123 | 123 | $paginator->setCurrentPageNumber(isset($params['page']) ? $params['page'] : 1) |
124 | - ->setItemCountPerPage(isset($params['count']) ? $params['count'] : 10) |
|
125 | - ->setPageRange(isset($params['range']) ? $params['range'] : 5); |
|
124 | + ->setItemCountPerPage(isset($params['count']) ? $params['count'] : 10) |
|
125 | + ->setPageRange(isset($params['range']) ? $params['range'] : 5); |
|
126 | 126 | |
127 | 127 | return $paginator; |
128 | 128 | } |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | * @param array $defaultParams |
47 | 47 | * @param bool $usePostParams |
48 | 48 | * |
49 | - * @return mixed |
|
49 | + * @return ZendPaginator |
|
50 | 50 | */ |
51 | 51 | public function __invoke($paginatorName, $defaultParams = array(), $usePostParams = false) |
52 | 52 | { |
@@ -106,7 +106,6 @@ discard block |
||
106 | 106 | } |
107 | 107 | |
108 | 108 | /** |
109 | - * @param ControllerManager $controllerManager |
|
110 | 109 | * @return CreatePaginatorService |
111 | 110 | */ |
112 | 111 | public static function factory(ContainerInterface $container) |
@@ -81,7 +81,7 @@ |
||
81 | 81 | |
82 | 82 | $adapter->setParams($params); |
83 | 83 | $paginator->setCurrentPageNumber($params->get('page', 1)) |
84 | - ->setItemCountPerPage($params->get('count', 10)); |
|
84 | + ->setItemCountPerPage($params->get('count', 10)); |
|
85 | 85 | |
86 | 86 | return $paginator; |
87 | 87 | } |
@@ -61,11 +61,11 @@ |
||
61 | 61 | $paginatorManager = $this->serviceManager->get('Core/PaginatorService'); |
62 | 62 | $paginator = $paginatorManager->get($paginatorName); |
63 | 63 | if (!isset($paginator) || !$paginator instanceof ZendPaginator) { |
64 | - throw new \RuntimeException('Could not create paginator ' . $paginatorName); |
|
64 | + throw new \RuntimeException('Could not create paginator '.$paginatorName); |
|
65 | 65 | } |
66 | 66 | $adapter = $paginator->getAdapter(); |
67 | 67 | if (!isset($adapter) || !$adapter instanceof AdapterInterface) { |
68 | - throw new \RuntimeException('Paginator ' . $paginatorName . ' has no Adapter'); |
|
68 | + throw new \RuntimeException('Paginator '.$paginatorName.' has no Adapter'); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | $params = $usePostParams |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | protected $generator; |
51 | 51 | |
52 | 52 | /** |
53 | - * @param $serviceLocator |
|
53 | + * @param \Interop\Container\ContainerInterface $serviceLocator |
|
54 | 54 | * @return $this |
55 | 55 | */ |
56 | 56 | public function setServiceLocator($serviceLocator) |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | } |
79 | 79 | |
80 | 80 | /** |
81 | - * @return mixed |
|
81 | + * @return RepositoryInterface |
|
82 | 82 | */ |
83 | 83 | public function getRepositories() |
84 | 84 | { |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | $target->__invoke($data); |
150 | 150 | $className = get_class($this->entity); |
151 | 151 | // @TODO, have to be abstract |
152 | - $snapShotMetaClassName = '\\' . $className . 'SnapshotMeta'; |
|
152 | + $snapShotMetaClassName = '\\'.$className.'SnapshotMeta'; |
|
153 | 153 | $meta = new $snapShotMetaClassName; |
154 | 154 | $meta->setEntity($target); |
155 | 155 | $meta->setSourceId($this->entity->id); |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | if (empty($dataHead) || empty($targetClass)) { |
178 | 178 | return null; |
179 | 179 | } |
180 | - $repositorySnapshotMeta = $this->getRepositories()->getRepository($targetClass . "Meta"); |
|
180 | + $repositorySnapshotMeta = $this->getRepositories()->getRepository($targetClass."Meta"); |
|
181 | 181 | $snapshot = $repositorySnapshotMeta->findSnapshot($this->entity); |
182 | 182 | // an snapshot has to be so simple that there is no need for a special hydrator |
183 | 183 | $hydrator = new EntityHydrator(); |
@@ -247,8 +247,8 @@ discard block |
||
247 | 247 | // the snapshotgenerator is a service defined by the name of the entity |
248 | 248 | // this is the highest means, all subsequent means just add what is not set |
249 | 249 | $className = get_class($this->entity); |
250 | - if ($serviceLocator->has('snapshotgenerator' . $className)) { |
|
251 | - $generator = $this->serviceLocator->get('snapshotgenerator' . $className); |
|
250 | + if ($serviceLocator->has('snapshotgenerator'.$className)) { |
|
251 | + $generator = $this->serviceLocator->get('snapshotgenerator'.$className); |
|
252 | 252 | if (is_array($generator)) { |
253 | 253 | $this->options = ArrayUtils::merge($generator, $this->options); |
254 | 254 | $generator = null; |
@@ -348,13 +348,13 @@ discard block |
||
348 | 348 | } |
349 | 349 | } else { |
350 | 350 | if ($array1[$key] != $array2[$key]) { |
351 | - $result[$key] = array( $array1[$key], $array2[$key]); |
|
351 | + $result[$key] = array($array1[$key], $array2[$key]); |
|
352 | 352 | } |
353 | 353 | } |
354 | 354 | if (!empty($subResult)) { |
355 | 355 | foreach ($subResult as $subKey => $subValue) { |
356 | 356 | if (!empty($subKey) && is_string($subKey)) { |
357 | - $result[$key . '.' . $subKey] = $subValue; |
|
357 | + $result[$key.'.'.$subKey] = $subValue; |
|
358 | 358 | } |
359 | 359 | } |
360 | 360 | } |
@@ -72,6 +72,9 @@ discard block |
||
72 | 72 | return $this; |
73 | 73 | } |
74 | 74 | |
75 | + /** |
|
76 | + * @param AddressList $header |
|
77 | + */ |
|
75 | 78 | protected function stringFromMailHeader($header) |
76 | 79 | { |
77 | 80 | $erg = ''; |
@@ -160,6 +163,9 @@ discard block |
||
160 | 163 | } |
161 | 164 | } |
162 | 165 | |
166 | + /** |
|
167 | + * @return string |
|
168 | + */ |
|
163 | 169 | protected function getTemplate() |
164 | 170 | { |
165 | 171 | $template = null; |
@@ -153,18 +153,18 @@ discard block |
||
153 | 153 | $replyTo = $this->stringFromMailHeader($this->getReplyTo()); |
154 | 154 | |
155 | 155 | return str_pad($template, 30) |
156 | - . 'to: ' . str_pad($to, 50) |
|
157 | - . 'cc: ' . str_pad($cc, 50) |
|
158 | - . 'bcc: ' . str_pad($bcc, 50) |
|
159 | - . 'from: ' . str_pad($from, 50) |
|
160 | - . 'replyTo: ' . str_pad($replyTo, 50) |
|
156 | + . 'to: '.str_pad($to, 50) |
|
157 | + . 'cc: '.str_pad($cc, 50) |
|
158 | + . 'bcc: '.str_pad($bcc, 50) |
|
159 | + . 'from: '.str_pad($from, 50) |
|
160 | + . 'replyTo: '.str_pad($replyTo, 50) |
|
161 | 161 | //. str_pad(implode(',', ArrayUtils::iteratorToArray($this->getSender())),50) |
162 | - . 'subject: ' . str_pad($this->getSubject(), 50); |
|
162 | + . 'subject: '.str_pad($this->getSubject(), 50); |
|
163 | 163 | } |
164 | 164 | |
165 | 165 | public function template($template) |
166 | 166 | { |
167 | - $controller = is_object($this->controller) ? get_class($this->controller):'null'; |
|
167 | + $controller = is_object($this->controller) ? get_class($this->controller) : 'null'; |
|
168 | 168 | |
169 | 169 | $event = new Event(); |
170 | 170 | $eventManager = $this->eventManager; |
@@ -181,11 +181,11 @@ discard block |
||
181 | 181 | $controllerIdentifier = strtolower(substr($controller, 0, strpos($controller, '\\'))); |
182 | 182 | $viewResolver = $this->viewResolver; |
183 | 183 | |
184 | - $templateHalf = 'mail/' . $template; |
|
184 | + $templateHalf = 'mail/'.$template; |
|
185 | 185 | $resource = $viewResolver->resolve($templateHalf); |
186 | 186 | |
187 | 187 | if (empty($resource)) { |
188 | - $templateFull = $controllerIdentifier . '/mail/' . $template; |
|
188 | + $templateFull = $controllerIdentifier.'/mail/'.$template; |
|
189 | 189 | $resource = $viewResolver->resolve($templateFull); |
190 | 190 | } |
191 | 191 | |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | unset($__vars[$key]); |
213 | 213 | } |
214 | 214 | } |
215 | - unset($__vars['content'],$__vars['controllerIdentifier'],$__vars['controller'],$__vars['resource'],$__vars['template'],$__vars['viewResolver']); |
|
215 | + unset($__vars['content'], $__vars['controllerIdentifier'], $__vars['controller'], $__vars['resource'], $__vars['template'], $__vars['viewResolver']); |
|
216 | 216 | $this->config = $__vars; |
217 | 217 | } |
218 | 218 | } |
@@ -237,20 +237,20 @@ discard block |
||
237 | 237 | if (isset($this->config['from'])) { |
238 | 238 | $from = $this->config['from']; |
239 | 239 | } else { |
240 | - $log->err('A from email address must be provided (Variable $from) in Template: ' . $template); |
|
241 | - throw new \InvalidArgumentException('A from email address must be provided (Variable $from) in Template: ' . $template); |
|
240 | + $log->err('A from email address must be provided (Variable $from) in Template: '.$template); |
|
241 | + throw new \InvalidArgumentException('A from email address must be provided (Variable $from) in Template: '.$template); |
|
242 | 242 | } |
243 | 243 | if (isset($this->config['fromName'])) { |
244 | 244 | $fromName = $this->config['fromName']; |
245 | 245 | } else { |
246 | - $log->err('A from name must be provided (Variable $fromName) in Template: ' . $template); |
|
247 | - throw new \InvalidArgumentException('A from name must be provided (Variable $fromName) in Template: ' . $template); |
|
246 | + $log->err('A from name must be provided (Variable $fromName) in Template: '.$template); |
|
247 | + throw new \InvalidArgumentException('A from name must be provided (Variable $fromName) in Template: '.$template); |
|
248 | 248 | } |
249 | 249 | if (isset($this->config['subject'])) { |
250 | 250 | $subject = $this->config['subject']; |
251 | 251 | } else { |
252 | - $log->err('A subject must be provided (Variable $subject) in Template: ' . $template); |
|
253 | - throw new \InvalidArgumentException('A subject must be provided (Variable $subject) in Template: ' . $template); |
|
252 | + $log->err('A subject must be provided (Variable $subject) in Template: '.$template); |
|
253 | + throw new \InvalidArgumentException('A subject must be provided (Variable $subject) in Template: '.$template); |
|
254 | 254 | } |
255 | 255 | $this->setFrom($from, $fromName); |
256 | 256 | $this->setSubject($subject); |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | $erg = true; |
272 | 272 | $log->info($this); |
273 | 273 | } catch (\Exception $e) { |
274 | - $log->err('Mail failure ' . $e->getMessage()); |
|
274 | + $log->err('Mail failure '.$e->getMessage()); |
|
275 | 275 | } |
276 | 276 | return $erg; |
277 | 277 | } |
@@ -288,6 +288,6 @@ discard block |
||
288 | 288 | $viewResolver = $container->get('ViewResolver'); |
289 | 289 | $eventManager = $container->get('EventManager'); |
290 | 290 | $moduleManager = $container->get('ModuleManager'); |
291 | - return new static($mailLog,$viewResolver,$eventManager,$moduleManager); |
|
291 | + return new static($mailLog, $viewResolver, $eventManager, $moduleManager); |
|
292 | 292 | } |
293 | 293 | } |
@@ -110,7 +110,6 @@ |
||
110 | 110 | * @see \Core\Controller\Plugin\SearchForm::get() |
111 | 111 | * |
112 | 112 | * @param $elementsFieldset |
113 | - * @param null $buttonsFieldset |
|
114 | 113 | * @param string $as The name of the key in the result array. |
115 | 114 | * |
116 | 115 | * @return self |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | } |
79 | 79 | |
80 | 80 | if (!is_array($stack)) { |
81 | - throw new \InvalidArgumentException('Expected argument to be of type array, but received ' . gettype($stack)); |
|
81 | + throw new \InvalidArgumentException('Expected argument to be of type array, but received '.gettype($stack)); |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | $stack = array_intersect_key($stack, ['params' => true, 'form' => true, 'paginator' => true]); |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | * |
148 | 148 | * @return self |
149 | 149 | */ |
150 | - public function params($namespace, $defaults = [ 'page' => 1 ]) |
|
150 | + public function params($namespace, $defaults = ['page' => 1]) |
|
151 | 151 | { |
152 | 152 | $this->stack['params'] = [$namespace, $defaults]; |
153 | 153 | return $this; |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | $queryArray[$match['name']][$v] = 1; |
243 | 243 | } |
244 | 244 | } else { |
245 | - $queryArray[ $match[ 'name' ] ] = $value; |
|
245 | + $queryArray[$match['name']] = $value; |
|
246 | 246 | } |
247 | 247 | unset($queryArray[$key]); |
248 | 248 | } |
@@ -46,10 +46,8 @@ |
||
46 | 46 | * |
47 | 47 | * Proxies to {@link get()} |
48 | 48 | * |
49 | - * @param string|array $elementsFieldset |
|
50 | - * @param null|string $buttonsFieldset |
|
51 | 49 | * |
52 | - * @return \Core\Form\TextSearchForm |
|
50 | + * @return \Core\Form\SearchForm |
|
53 | 51 | */ |
54 | 52 | public function __invoke($form, $options = null, $params = null) |
55 | 53 | { |
@@ -72,11 +72,11 @@ |
||
72 | 72 | public function get($form, $options = null, $params = null) |
73 | 73 | { |
74 | 74 | if (!is_object($form)) { |
75 | - $form = $this->formElementManager->get($form, $options); |
|
75 | + $form = $this->formElementManager->get($form, $options); |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | /** @noinspection PhpUndefinedMethodInspection */ |
79 | - $params = $params ?: clone $this->getController()->getRequest()->getQuery(); |
|
79 | + $params = $params ?: clone $this->getController()->getRequest()->getQuery(); |
|
80 | 80 | |
81 | 81 | /* I tried using form methods (bind, isValid)... |
82 | 82 | * but because the search form could be in an invalidated state |
@@ -55,7 +55,6 @@ |
||
55 | 55 | * Two-letter codes from the ISO 3166 standard as implemented by The Internet Assigned |
56 | 56 | *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SC'|'SD'|'SE'|'SG'|'SH'|'SI'|'SJ'|'SK'|'SL'|'SM'|'SN'|'SO'|'SR'|'ST'|'SU'|'SV'|'SY'|'SZ'|'TC'|'TD'|'TF'|'TG'|'TH'|'TJ'|'TK'|'TL'|'TM'|'TN'|'TO'|'TP'|'TR'|'TT'|'TV'|'TW'|'TZ'|'UA'|'UG'|'UK'|'UM'|'US'|'UY'|'UZ'|'VA'|'VC'|'VE'|'VG'|'VI'|'VN'|'VU'|'WF'|'WS'|'YE'|'YT'|'YU'|'ZA'|'ZM'|'ZW'} |
|
59 | 58 | * @return AddressInterface |
60 | 59 | */ |
61 | 60 | public function setCountryCode($countryCode); |
@@ -14,12 +14,12 @@ |
||
14 | 14 | interface AddressInterface extends EntityInterface |
15 | 15 | { |
16 | 16 | |
17 | - /** |
|
18 | - * Postal Code of the Address. |
|
19 | - * |
|
20 | - * @param string $postalCode |
|
21 | - * @return AddressInterface |
|
22 | - */ |
|
17 | + /** |
|
18 | + * Postal Code of the Address. |
|
19 | + * |
|
20 | + * @param string $postalCode |
|
21 | + * @return AddressInterface |
|
22 | + */ |
|
23 | 23 | public function setPostalCode($postalCode); |
24 | 24 | public function getPostalCode(); |
25 | 25 |