@@ -401,7 +401,7 @@ |
||
401 | 401 | /** |
402 | 402 | * Attempts to create a slack\Attachment instance based on the $attachment data given. |
403 | 403 | * |
404 | - * @param mixed $attachment |
|
404 | + * @param callable $attachment |
|
405 | 405 | * @return mixed Either an instantiated slack\Attachment, or a passthrough of the input data. |
406 | 406 | */ |
407 | 407 | protected function resolveAttachment($attachment) |
@@ -104,7 +104,7 @@ |
||
104 | 104 | $this->setIcon($attributes['icon']); |
105 | 105 | } |
106 | 106 | |
107 | - foreach($attributes['attachments'] as $attachment) { |
|
107 | + foreach ($attributes['attachments'] as $attachment) { |
|
108 | 108 | $this->attach($attachment); |
109 | 109 | } |
110 | 110 |
@@ -705,7 +705,7 @@ |
||
705 | 705 | } |
706 | 706 | |
707 | 707 | throw new \InvalidArgumentException("Expected an array or an instance of ".attachment\Action::class.", got [".diagnostics\Debug::getTypeName($action)."] instead."); |
708 | - } |
|
708 | + } |
|
709 | 709 | |
710 | 710 | /** |
711 | 711 | * {@inheritDoc} |
@@ -147,7 +147,7 @@ |
||
147 | 147 | $message['endpoint'] = $message['endpoint'] ?? $this->endpoint; |
148 | 148 | $message['username'] = $message['username'] ?? $this->username; |
149 | 149 | $message['parse'] = $message['parse'] ?? $this->parse; |
150 | - $message['link_names'] = $this->linkNames ? 1 : 0; |
|
150 | + $message['link_names'] = $this->linkNames ? 1 : 0; |
|
151 | 151 | $message['unfurl_links'] = $this->unfurlLinks; |
152 | 152 | $message['unfurl_media'] = $this->unfurlMedia; |
153 | 153 | $message['mrkdwn'] = $this->allowMarkdown; |
@@ -73,7 +73,7 @@ |
||
73 | 73 | 'api', $this->key |
74 | 74 | ], |
75 | 75 | 'multipart' => [ |
76 | - ['name' => 'to', 'contents' => implode(',', $recipients)], |
|
76 | + ['name' => 'to', 'contents' => implode(',', $recipients)], |
|
77 | 77 | ['name' => 'message', 'contents' => $message->toString(), 'filename' => 'message.mime'], |
78 | 78 | ] |
79 | 79 | ]); |
@@ -52,10 +52,10 @@ |
||
52 | 52 | */ |
53 | 53 | protected function getMimeEntityString(\Swift_Mime_MimeEntity $entity) : string |
54 | 54 | { |
55 | - $result = (string) $entity->getHeaders() . PHP_EOL . $entity->getBody(); |
|
55 | + $result = (string) $entity->getHeaders().PHP_EOL.$entity->getBody(); |
|
56 | 56 | |
57 | 57 | foreach ($entity->getChildren() as $child) { |
58 | - $result .= PHP_EOL . PHP_EOL . $this->getMimeEntityString($child); |
|
58 | + $result .= PHP_EOL.PHP_EOL.$this->getMimeEntityString($child); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | return $result; |