@@ -26,8 +26,8 @@ |
||
| 26 | 26 | */ |
| 27 | 27 | protected function newHandlerInstanceFor($name) |
| 28 | 28 | { |
| 29 | - if ( ! $handler = config('inbounder.gateways.' . $name)) |
|
| 30 | - throw new UndefinedGatewayException('The gateway \''.$name.'\' is not defined'); |
|
| 29 | + if (!$handler = config('inbounder.gateways.' . $name)) |
|
| 30 | + throw new UndefinedGatewayException('The gateway \'' . $name . '\' is not defined'); |
|
| 31 | 31 | |
| 32 | 32 | return $this->app->make($handler); |
| 33 | 33 | } |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | */ |
| 22 | 22 | public function register() |
| 23 | 23 | { |
| 24 | - $this->app->bind('inbounder', function ($app) { |
|
| 24 | + $this->app->bind('inbounder', function($app) { |
|
| 25 | 25 | return new Inbounder($app); |
| 26 | 26 | }); |
| 27 | 27 | } |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | public function boot() |
| 35 | 35 | { |
| 36 | 36 | $this->publishes([ |
| 37 | - __DIR__.'/../config.php' => config_path('inbounder.php') |
|
| 37 | + __DIR__ . '/../config.php' => config_path('inbounder.php') |
|
| 38 | 38 | ], 'config'); |
| 39 | 39 | } |
| 40 | 40 | } |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | */ |
| 24 | 24 | public function __set($name, $value) |
| 25 | 25 | { |
| 26 | - $this->attributes[$name] = $value; |
|
| 26 | + $this->attributes[ $name ] = $value; |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | /** |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | public function __get($name) |
| 33 | 33 | { |
| 34 | 34 | if (array_key_exists($name, $this->attributes)) |
| 35 | - return $this->attributes[$name]; |
|
| 35 | + return $this->attributes[ $name ]; |
|
| 36 | 36 | |
| 37 | 37 | return null; |
| 38 | 38 | } |
@@ -17,9 +17,9 @@ discard block |
||
| 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 | /** |
@@ -35,10 +35,10 @@ discard block |
||
| 35 | 35 | */ |
| 36 | 36 | public function __get($name) |
| 37 | 37 | { |
| 38 | - if ( ! array_key_exists($name, $this->attributes)) |
|
| 38 | + if (!array_key_exists($name, $this->attributes)) |
|
| 39 | 39 | throw new MissingAttributeException("The attribute $name does not exists.", 1); |
| 40 | 40 | |
| 41 | - return $this->attributes[$name]; |
|
| 41 | + return $this->attributes[ $name ]; |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | /** |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | */ |
| 42 | 42 | protected function address(Array $input) : Address |
| 43 | 43 | { |
| 44 | - return new Address($input['Email'], $input['Name'], $input['MailboxHash']); |
|
| 44 | + return new Address($input[ 'Email' ], $input[ 'Name' ], $input[ 'MailboxHash' ]); |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | /** |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | */ |
| 165 | 165 | public function bodyIsText() |
| 166 | 166 | { |
| 167 | - return ! $this->bodyIsHtml(); |
|
| 167 | + return !$this->bodyIsHtml(); |
|
| 168 | 168 | } |
| 169 | 169 | |
| 170 | 170 | /** |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | */ |
| 175 | 175 | public function bodyIsHtml() |
| 176 | 176 | { |
| 177 | - return ! is_null($this->input('HtmlBody')) || $this->input('HtmlBody') !== ''; |
|
| 177 | + return !is_null($this->input('HtmlBody')) || $this->input('HtmlBody') !== ''; |
|
| 178 | 178 | } |
| 179 | 179 | |
| 180 | 180 | /** |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | $collection = new Collection; |
| 188 | 188 | |
| 189 | 189 | foreach ($this->input('Headers') as $header) |
| 190 | - $collection->push(new Header($header['Name'], $header['Value'])); |
|
| 190 | + $collection->push(new Header($header[ 'Name' ], $header[ 'Value' ])); |
|
| 191 | 191 | |
| 192 | 192 | return $collection; |
| 193 | 193 | } |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | */ |
| 200 | 200 | public function header($name) : Header |
| 201 | 201 | { |
| 202 | - return $this->headers()->filter(function ($header) use ($name) { |
|
| 202 | + return $this->headers()->filter(function($header) use ($name) { |
|
| 203 | 203 | return $header->name === $name; |
| 204 | 204 | })->first(); |
| 205 | 205 | } |
@@ -237,10 +237,10 @@ discard block |
||
| 237 | 237 | foreach ($this->input('Attachments') as $attachment) |
| 238 | 238 | $collection->push( |
| 239 | 239 | new Attachment( |
| 240 | - $attachment['Name'], |
|
| 241 | - ( isset($attachment['Content']) ? $attachment['Content'] : '' ), |
|
| 242 | - $attachment['ContentType'], |
|
| 243 | - $attachment['ContentLength'] |
|
| 240 | + $attachment[ 'Name' ], |
|
| 241 | + (isset($attachment[ 'Content' ]) ? $attachment[ 'Content' ] : ''), |
|
| 242 | + $attachment[ 'ContentType' ], |
|
| 243 | + $attachment[ 'ContentLength' ] |
|
| 244 | 244 | ) |
| 245 | 245 | ); |
| 246 | 246 | |