Passed
Push — master ( a35b7f...01b82d )
by Kirill
07:08 queued 11s
created
src/Http/src/Traits/JsonTrait.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,11 +29,11 @@
 block discarded – undo
29 29
      */
30 30
     private function writeJson(ResponseInterface $response, $payload, int $code = 200): ResponseInterface
31 31
     {
32
-        if ($payload instanceof JsonSerializable) {
32
+        if ($payload instanceof JsonSerializable){
33 33
             $payload = $payload->jsonSerialize();
34 34
         }
35 35
 
36
-        if (is_array($payload) && isset($payload['status']) && is_int($payload['status'])) {
36
+        if (is_array($payload) && isset($payload['status']) && is_int($payload['status'])){
37 37
             $code = $payload['status'];
38 38
         }
39 39
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,11 +29,13 @@
 block discarded – undo
29 29
      */
30 30
     private function writeJson(ResponseInterface $response, $payload, int $code = 200): ResponseInterface
31 31
     {
32
-        if ($payload instanceof JsonSerializable) {
32
+        if ($payload instanceof JsonSerializable)
33
+        {
33 34
             $payload = $payload->jsonSerialize();
34 35
         }
35 36
 
36
-        if (is_array($payload) && isset($payload['status']) && is_int($payload['status'])) {
37
+        if (is_array($payload) && isset($payload['status']) && is_int($payload['status']))
38
+        {
37 39
             $code = $payload['status'];
38 40
         }
39 41
 
Please login to merge, or discard this patch.
src/SendIt/src/Renderer/ViewRenderer.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -37,9 +37,9 @@  discard block
 block discarded – undo
37 37
      */
38 38
     public function render(MessageInterface $message): Email
39 39
     {
40
-        try {
40
+        try{
41 41
             $view = $this->views->get($message->getSubject());
42
-        } catch (ViewException $e) {
42
+        }catch (ViewException $e){
43 43
             throw new MailerException(
44 44
                 sprintf('Invalid email template `%s`: %s', $message->getSubject(), $e->getMessage()),
45 45
                 $e->getCode(),
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
         $msg = new Email();
51 51
 
52
-        if ($message->getFrom() !== null) {
52
+        if ($message->getFrom() !== null){
53 53
             $msg->from([$message->getFrom()]);
54 54
         }
55 55
 
@@ -57,10 +57,10 @@  discard block
 block discarded – undo
57 57
         $msg->cc(...$message->getCC());
58 58
         $msg->bcc(...$message->getBCC());
59 59
 
60
-        try {
60
+        try{
61 61
             // render message partials
62 62
             $view->render(array_merge(['_msg_' => $msg], $message->getData()));
63
-        } catch (ViewException $e) {
63
+        }catch (ViewException $e){
64 64
             throw new MailerException(
65 65
                 sprintf('Unable to render email `%s`: %s', $message->getSubject(), $e->getMessage()),
66 66
                 $e->getCode(),
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
      */
81 81
     public static function escapeSubject(string $subject): string
82 82
     {
83
-        if (!preg_match('/[^\x20-\x7e]/', $subject)) {
83
+        if (!preg_match('/[^\x20-\x7e]/', $subject)){
84 84
             // ascii-only subject, return as-is
85 85
             return $subject;
86 86
         }
@@ -90,6 +90,6 @@  discard block
 block discarded – undo
90 90
         $prefix = '=?UTF-8?B?';
91 91
         $suffix = '?=';
92 92
 
93
-        return $prefix . str_replace("=\r\n", $suffix . "\r\n  " . $prefix, $encoded) . $suffix;
93
+        return $prefix.str_replace("=\r\n", $suffix."\r\n  ".$prefix, $encoded).$suffix;
94 94
     }
95 95
 }
Please login to merge, or discard this patch.