@@ -40,7 +40,7 @@ |
||
40 | 40 | } |
41 | 41 | |
42 | 42 | /** @var array $files */ |
43 | - $files = $view->getVariable('assets'.ucfirst($type)); |
|
43 | + $files = $view->getVariable('assets' . ucfirst($type)); |
|
44 | 44 | |
45 | 45 | if (empty($files)) { |
46 | 46 | return ''; |
@@ -94,7 +94,7 @@ |
||
94 | 94 | /** |
95 | 95 | * Get response body and set headers |
96 | 96 | * |
97 | - * @return mixed |
|
97 | + * @return string |
|
98 | 98 | */ |
99 | 99 | public function getContent() |
100 | 100 | { |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | class XmlResponse extends Response |
13 | 13 | { |
14 | 14 | |
15 | - public function __construct ($content = []) |
|
15 | + public function __construct($content = []) |
|
16 | 16 | { |
17 | 17 | parent::__construct($content); |
18 | 18 | |
@@ -27,15 +27,15 @@ discard block |
||
27 | 27 | * @param \SimpleXMLElement $xml |
28 | 28 | * @codeCoverageIgnore |
29 | 29 | */ |
30 | - private function convertArrayToXml(\SimpleXMLElement &$xml, $data) |
|
30 | + private function convertArrayToXml(\SimpleXMLElement & $xml, $data) |
|
31 | 31 | { |
32 | 32 | foreach ($data as $key=>$value) { |
33 | 33 | |
34 | - if(is_numeric($key)) { |
|
34 | + if (is_numeric($key)) { |
|
35 | 35 | $key = 'item' . $key; |
36 | 36 | } |
37 | 37 | |
38 | - if(!empty($value['value']) && is_array($value['value'])) { |
|
38 | + if (!empty($value['value']) && is_array($value['value'])) { |
|
39 | 39 | |
40 | 40 | $node = $this->generateNode($xml, $key, $value); |
41 | 41 | $this->convertArrayToXml($node, $value['value']); |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | * @return null|\SimpleXMLElement |
55 | 55 | * @codeCoverageIgnore |
56 | 56 | */ |
57 | - private function generateNode(\SimpleXMLElement &$xml, $key, $value = null) |
|
57 | + private function generateNode(\SimpleXMLElement & $xml, $key, $value = null) |
|
58 | 58 | { |
59 | 59 | $node = null; |
60 | 60 |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | $headers .= 'Content-Type: multipart/mixed; boundary=' . $boundary . $eol; |
189 | 189 | |
190 | 190 | if (!empty($this->from)) { |
191 | - $headers .= 'From: ' .$this->from . $eol; |
|
191 | + $headers .= 'From: ' . $this->from . $eol; |
|
192 | 192 | } |
193 | 193 | |
194 | 194 | if (!empty($this->replyTo)) { |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | } |
247 | 247 | |
248 | 248 | $body .= 'Content-Transfer-Encoding: base64' . $eol; |
249 | - $body .= 'X-Attachment-Id: ' . rand(1000,99999) . $eol . $eol; |
|
249 | + $body .= 'X-Attachment-Id: ' . rand(1000, 99999) . $eol . $eol; |
|
250 | 250 | $body .= $encodedContent . $eol; |
251 | 251 | |
252 | 252 | } |
@@ -40,7 +40,7 @@ |
||
40 | 40 | { |
41 | 41 | if (!$this->process($this->field->getValue())) { |
42 | 42 | |
43 | - $this->field->addAttribute('class', 'error'); |
|
43 | + $this->field->addAttribute('class', 'error'); |
|
44 | 44 | $this->field->setErrorMessages([$this->getMessage()]); |
45 | 45 | return false; |
46 | 46 |