@@ -87,7 +87,7 @@ |
||
| 87 | 87 | /** |
| 88 | 88 | * Attachments. |
| 89 | 89 | * |
| 90 | - * @return Array[Array['name', 'content', 'type']] |
|
| 90 | + * @return Collection 'content', 'type']] |
|
| 91 | 91 | */ |
| 92 | 92 | public function attachements(); |
| 93 | 93 | } |
@@ -201,6 +201,7 @@ |
||
| 201 | 201 | * retrieve a email header. |
| 202 | 202 | * |
| 203 | 203 | * return Array |
| 204 | + * @param string $name |
|
| 204 | 205 | */ |
| 205 | 206 | public function header($name) : Header |
| 206 | 207 | { |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | */ |
| 43 | 43 | protected function address(array $input) : Address |
| 44 | 44 | { |
| 45 | - return new Address($input['Email'], $input['Name'], $input['MailboxHash']); |
|
| 45 | + return new Address($input[ 'Email' ], $input[ 'Name' ], $input[ 'MailboxHash' ]); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | /** |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | $collection = new Collection(); |
| 192 | 192 | |
| 193 | 193 | foreach ($this->input('Headers') as $header) { |
| 194 | - $collection->push(new Header($header['Name'], $header['Value'])); |
|
| 194 | + $collection->push(new Header($header[ 'Name' ], $header[ 'Value' ])); |
|
| 195 | 195 | } |
| 196 | 196 | |
| 197 | 197 | return $collection; |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | */ |
| 205 | 205 | public function header($name) : Header |
| 206 | 206 | { |
| 207 | - return $this->headers()->filter(function ($header) use ($name) { |
|
| 207 | + return $this->headers()->filter(function($header) use ($name) { |
|
| 208 | 208 | return $header->name === $name; |
| 209 | 209 | })->first(); |
| 210 | 210 | } |
@@ -243,10 +243,10 @@ discard block |
||
| 243 | 243 | foreach ($this->input('Attachments') as $attachment) { |
| 244 | 244 | $collection->push( |
| 245 | 245 | new Attachment( |
| 246 | - $attachment['Name'], |
|
| 247 | - (isset($attachment['Content']) ? $attachment['Content'] : ''), |
|
| 248 | - $attachment['ContentType'], |
|
| 249 | - $attachment['ContentLength'] |
|
| 246 | + $attachment[ 'Name' ], |
|
| 247 | + (isset($attachment[ 'Content' ]) ? $attachment[ 'Content' ] : ''), |
|
| 248 | + $attachment[ 'ContentType' ], |
|
| 249 | + $attachment[ 'ContentLength' ] |
|
| 250 | 250 | ) |
| 251 | 251 | ); |
| 252 | 252 | } |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | public function register() |
| 22 | 22 | { |
| 23 | - $this->app->bind('inbounder', function ($app) { |
|
| 23 | + $this->app->bind('inbounder', function($app) { |
|
| 24 | 24 | return new Inbounder($app); |
| 25 | 25 | }); |
| 26 | 26 | } |
@@ -10,16 +10,16 @@ discard block |
||
| 10 | 10 | /** |
| 11 | 11 | * Attributes. |
| 12 | 12 | */ |
| 13 | - protected $attributes = []; |
|
| 13 | + protected $attributes = [ ]; |
|
| 14 | 14 | |
| 15 | 15 | /** |
| 16 | 16 | * Constructor. |
| 17 | 17 | */ |
| 18 | 18 | public function __construct($email, $name = null, $mailboxHash = null) |
| 19 | 19 | { |
| 20 | - $this->attributes['email'] = $email; |
|
| 21 | - $this->attributes['name'] = $name; |
|
| 22 | - $this->attributes['mailboxHash'] = $mailboxHash; |
|
| 20 | + $this->attributes[ 'email' ] = $email; |
|
| 21 | + $this->attributes[ 'name' ] = $name; |
|
| 22 | + $this->attributes[ 'mailboxHash' ] = $mailboxHash; |
|
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | /** |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | */ |
| 28 | 28 | public function __set($name, $value) |
| 29 | 29 | { |
| 30 | - $this->attributes[$name] = $value; |
|
| 30 | + $this->attributes[ $name ] = $value; |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | /** |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | throw new MissingAttributeException("The attribute $name does not exists.", 1); |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | - return $this->attributes[$name]; |
|
| 42 | + return $this->attributes[ $name ]; |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /** |