Skip to content

Commit 3a4dbd7

Browse files
author
Tom Swinkels
committed
Code format and fixes
1 parent 339db61 commit 3a4dbd7

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/Prepr.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -129,35 +129,35 @@ public function url(string $url): self
129129
return $this;
130130
}
131131

132-
public function get()
132+
public function get(): self
133133
{
134134
$this->method = 'get';
135135

136136
return $this->request();
137137
}
138138

139-
public function post()
139+
public function post(): self
140140
{
141141
$this->method = 'post';
142142

143143
return $this->request();
144144
}
145145

146-
public function put()
146+
public function put(): self
147147
{
148148
$this->method = 'put';
149149

150150
return $this->request();
151151
}
152152

153-
public function delete()
153+
public function delete(): self
154154
{
155155
$this->method = 'delete';
156156

157157
return $this->request();
158158
}
159159

160-
public function path(string $path = null, array $array = []): self
160+
public function path(?string $path = null, array $array = []): self
161161
{
162162
foreach ($array as $key => $value) {
163163
$path = str_replace('{'.$key.'}', $value, $path);
@@ -168,7 +168,7 @@ public function path(string $path = null, array $array = []): self
168168
return $this;
169169
}
170170

171-
public function method(string $method = null): self
171+
public function method(?string $method = null): self
172172
{
173173
$this->method = $method;
174174

@@ -215,13 +215,13 @@ public function getStatusCode(): int
215215
return $this->request->getStatusCode();
216216
}
217217

218-
public function file($file, string $filename = null)
218+
public function file($file, ?string $filename = null)
219219
{
220220
$original = Utils::streamFor($file);
221221
$fileSize = $original->getSize();
222222

223223
if ($fileSize > $this->chunkSize) {
224-
return $this->chunkUpload($original, $fileSize);
224+
return $this->chunkUpload($original, $fileSize, $filename);
225225
} else {
226226
$this->attach = [
227227
'name' => 'source',
@@ -233,7 +233,7 @@ public function file($file, string $filename = null)
233233
}
234234
}
235235

236-
private function chunkUpload($original, int $fileSize, string $filename = null)
236+
private function chunkUpload($original, int $fileSize, ?string $filename = null)
237237
{
238238
$chunks = (int) floor($fileSize / $this->chunkSize);
239239

0 commit comments

Comments
 (0)