@@ -153,7 +153,7 @@ |
||
| 153 | 153 | */ |
| 154 | 154 | public function setBody($body) |
| 155 | 155 | { |
| 156 | - $this->body = $body; |
|
| 156 | + $this->body = $body; |
|
| 157 | 157 | } |
| 158 | 158 | |
| 159 | 159 | /** |
@@ -248,7 +248,7 @@ |
||
| 248 | 248 | * @return boolean |
| 249 | 249 | * @codeCoverageIgnore |
| 250 | 250 | */ |
| 251 | - private function addValidators(AbstractType &$typeClass, array $definition) |
|
| 251 | + private function addValidators(AbstractType & $typeClass, array $definition) |
|
| 252 | 252 | { |
| 253 | 253 | if (!empty($definition['validator'])) { |
| 254 | 254 | |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | $id = ' id="' . implode(' ', $elementAttributes['id']) . '" '; |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | - if (!empty($elementAttributes['class'])){ |
|
| 58 | + if (!empty($elementAttributes['class'])) { |
|
| 59 | 59 | $class = 'class="' . implode(' ', $elementAttributes['class']) . '" '; |
| 60 | 60 | } |
| 61 | 61 | |
@@ -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 | |
@@ -302,7 +302,7 @@ |
||
| 302 | 302 | } |
| 303 | 303 | |
| 304 | 304 | /** |
| 305 | - * @param $type |
|
| 305 | + * @param string $type |
|
| 306 | 306 | * @return bool |
| 307 | 307 | */ |
| 308 | 308 | private function translateType($type) |
@@ -13,7 +13,6 @@ |
||
| 13 | 13 | use Faulancer\Service\SessionManagerService; |
| 14 | 14 | use Faulancer\ServiceLocator\ServiceLocator; |
| 15 | 15 | use Faulancer\Form\Validator\ValidatorChain; |
| 16 | -use Faulancer\ServiceLocator\ServiceLocatorAwareInterface; |
|
| 17 | 16 | use Faulancer\ServiceLocator\ServiceLocatorInterface; |
| 18 | 17 | use Faulancer\Session\SessionManager; |
| 19 | 18 | |