@@ -59,16 +59,19 @@ discard block |
||
59 | 59 | public function __construct($auth, $params) |
60 | 60 | { |
61 | 61 | // We require the AWS key to be passed in $auth. |
62 | - if(!isset($auth['key'])) |
|
63 | - throw new InvalidParameterException('$auth parameter to constructor requires a `key` attribute'); |
|
62 | + if(!isset($auth['key'])) { |
|
63 | + throw new InvalidParameterException('$auth parameter to constructor requires a `key` attribute'); |
|
64 | + } |
|
64 | 65 | |
65 | 66 | // We require the AWS secret to be passed in $auth. |
66 | - if(!isset($auth['secret'])) |
|
67 | - throw new InvalidParameterException('$auth parameter to constructor requires a `secret` attribute'); |
|
67 | + if(!isset($auth['secret'])) { |
|
68 | + throw new InvalidParameterException('$auth parameter to constructor requires a `secret` attribute'); |
|
69 | + } |
|
68 | 70 | |
69 | 71 | // We require the AWS S3 bucket to be passed in $params. |
70 | - if(!isset($params['Bucket'])) |
|
71 | - throw new InvalidParameterException('$params parameter to constructor requires a `Bucket` attribute (with a capital B)'); |
|
72 | + if(!isset($params['Bucket'])) { |
|
73 | + throw new InvalidParameterException('$params parameter to constructor requires a `Bucket` attribute (with a capital B)'); |
|
74 | + } |
|
72 | 75 | |
73 | 76 | $this->auth = $auth; |
74 | 77 | $this->params = $params; |
@@ -88,8 +91,9 @@ discard block |
||
88 | 91 | public function send($filename, $params = array()) |
89 | 92 | { |
90 | 93 | // Set default values for the optional $params argument |
91 | - if(!isset($params['expiration'])) |
|
92 | - $params['expiration'] = '+10 minutes'; |
|
94 | + if(!isset($params['expiration'])) { |
|
95 | + $params['expiration'] = '+10 minutes'; |
|
96 | + } |
|
93 | 97 | |
94 | 98 | // Initialize the ZipStream object and pass in the file name which |
95 | 99 | // will be what is sent in the content-disposition header. |