@@ -49,7 +49,7 @@ |
||
49 | 49 | |
50 | 50 | public function getSubscribedEvents() |
51 | 51 | { |
52 | - return [ Events::onFlush ]; |
|
52 | + return [Events::onFlush]; |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | /** |
@@ -41,6 +41,9 @@ discard block |
||
41 | 41 | */ |
42 | 42 | protected $message; |
43 | 43 | |
44 | + /** |
|
45 | + * @param StatusInterface|null $status |
|
46 | + */ |
|
44 | 47 | public function __construct($status, $message = '[System]') |
45 | 48 | { |
46 | 49 | if (!$status instanceof StatusInterface) { |
@@ -116,7 +119,7 @@ discard block |
||
116 | 119 | /** |
117 | 120 | * Sets the history message |
118 | 121 | * |
119 | - * @param $message |
|
122 | + * @param string $message |
|
120 | 123 | * |
121 | 124 | * @return $this |
122 | 125 | */ |
@@ -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; |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | } elseif (isset($this->config['templateHalf'])) { |
226 | 226 | $template = $this->config['templateHalf']; |
227 | 227 | } else { |
228 | - throw new \InvalidArgumentException('No template provided for Mail.'); |
|
228 | + throw new \InvalidArgumentException('No template provided for Mail.'); |
|
229 | 229 | } |
230 | 230 | return $template; |
231 | 231 | } |
@@ -276,11 +276,11 @@ discard block |
||
276 | 276 | return $erg; |
277 | 277 | } |
278 | 278 | |
279 | - /** |
|
280 | - * @param ContainerInterface $container |
|
281 | - * |
|
282 | - * @return static |
|
283 | - */ |
|
279 | + /** |
|
280 | + * @param ContainerInterface $container |
|
281 | + * |
|
282 | + * @return static |
|
283 | + */ |
|
284 | 284 | public static function factory(ContainerInterface $container) |
285 | 285 | { |
286 | 286 | //@TODO: need to define transport to be use during ::send() |
@@ -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 = get_class($this->controller); |
|
167 | + $controller = get_class($this->controller); |
|
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 | } |
@@ -20,7 +20,7 @@ |
||
20 | 20 | * Set the View object |
21 | 21 | * |
22 | 22 | * @param Renderer $view |
23 | - * @return AbstractHelper |
|
23 | + * @return AbstractEventsHelper |
|
24 | 24 | */ |
25 | 25 | public function setView(Renderer $view) |
26 | 26 | { |
@@ -24,8 +24,8 @@ |
||
24 | 24 | public function init() |
25 | 25 | { |
26 | 26 | $this->setName('education') |
27 | - ->setHydrator(new EntityHydrator()) |
|
28 | - ->setObject(new EducationEntity()); |
|
27 | + ->setHydrator(new EntityHydrator()) |
|
28 | + ->setObject(new EducationEntity()); |
|
29 | 29 | |
30 | 30 | $this->add( |
31 | 31 | array( |
@@ -26,7 +26,7 @@ |
||
26 | 26 | { |
27 | 27 | $this->add([ |
28 | 28 | 'name' => 'endDate', |
29 | - 'required' => ! $data['currentIndicator'] |
|
29 | + 'required' => !$data['currentIndicator'] |
|
30 | 30 | ]); |
31 | 31 | |
32 | 32 | return parent::setData($data); |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | * |
53 | 53 | * @var string |
54 | 54 | */ |
55 | - protected $options="Cv/Options"; |
|
55 | + protected $options = "Cv/Options"; |
|
56 | 56 | |
57 | 57 | |
58 | 58 | /** |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | ->setIsDescriptionsEnabled(true) |
78 | 78 | ->setDescription( |
79 | 79 | /*@translate*/ 'Attach images or PDF Documents to your CV. Drag&drop them, or click into the attachement area. You can upload up to %sMB', |
80 | - [round($size/(1024*1024))>0? round($size/(1024*1024)):round($size/(1024*1024), 1)] |
|
80 | + [round($size / (1024 * 1024)) > 0 ? round($size / (1024 * 1024)) : round($size / (1024 * 1024), 1)] |
|
81 | 81 | ) |
82 | 82 | ->setParam('return', 'file-uri') |
83 | 83 | ->setLabel(/*@translate*/ 'Attachments'); |
@@ -74,14 +74,14 @@ |
||
74 | 74 | $count = $options->getAttachmentsCount(); |
75 | 75 | |
76 | 76 | $form->setIsDisableCapable(false) |
77 | - ->setIsDisableElementsCapable(false) |
|
78 | - ->setIsDescriptionsEnabled(true) |
|
79 | - ->setDescription( |
|
77 | + ->setIsDisableElementsCapable(false) |
|
78 | + ->setIsDescriptionsEnabled(true) |
|
79 | + ->setDescription( |
|
80 | 80 | /*@translate*/ 'Attach images or PDF Documents to your CV. Drag&drop them, or click into the attachement area. You can upload up to %sMB', |
81 | - [round($size/(1024*1024))>0? round($size/(1024*1024)):round($size/(1024*1024), 1)] |
|
82 | - ) |
|
83 | - ->setParam('return', 'file-uri') |
|
84 | - ->setLabel(/*@translate*/ 'Attachments'); |
|
81 | + [round($size/(1024*1024))>0? round($size/(1024*1024)):round($size/(1024*1024), 1)] |
|
82 | + ) |
|
83 | + ->setParam('return', 'file-uri') |
|
84 | + ->setLabel(/*@translate*/ 'Attachments'); |
|
85 | 85 | |
86 | 86 | /* @var $file \Core\Form\Element\FileUpload */ |
87 | 87 | $file = $form->get($this->fileName); |
@@ -50,7 +50,7 @@ |
||
50 | 50 | */ |
51 | 51 | public function getEmptySummaryNotice() |
52 | 52 | { |
53 | - if (! isset($this->emptySummaryNotice) && property_exists($this, 'defaultEmptySummaryNotice')) { |
|
53 | + if (!isset($this->emptySummaryNotice) && property_exists($this, 'defaultEmptySummaryNotice')) { |
|
54 | 54 | $this->emptySummaryNotice = $this->defaultEmptySummaryNotice; |
55 | 55 | } |
56 | 56 |
@@ -108,10 +108,10 @@ |
||
108 | 108 | } |
109 | 109 | |
110 | 110 | /** |
111 | - * @return string |
|
112 | - */ |
|
113 | - public function getDefaultLanguage() |
|
114 | - { |
|
115 | - return $this->defaultLanguage; |
|
116 | - } |
|
111 | + * @return string |
|
112 | + */ |
|
113 | + public function getDefaultLanguage() |
|
114 | + { |
|
115 | + return $this->defaultLanguage; |
|
116 | + } |
|
117 | 117 | } |