Skip to content

Commit 9bf0703

Browse files
committed
Use static property for default chunk size
1 parent 0475749 commit 9bf0703

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/InterfaxMessage.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ class InterfaxMessage
2020
const POLLING_INTERVAL_DEFAULT = 15;
2121
const POLLING_INTERVAL_MINIMUM = 10;
2222

23+
protected static $DEFAULT_CHUNK_SIZE = 1048576;
24+
2325
public function file(string $file)
2426
{
2527
$this->files = Arr::wrap($file);
@@ -94,7 +96,7 @@ public function makeFiles(): array
9496
[
9597
'name' => $this->filename,
9698
'mime_type' => app('files')->mimeType($this->filename),
97-
'chunk_size' => config('services.interfax.chunk_size', 1048576),
99+
'chunk_size' => config('services.interfax.chunk_size', static::$DEFAULT_CHUNK_SIZE),
98100
],
99101
],
100102
];
@@ -111,7 +113,7 @@ public function sleep(): void
111113

112114
protected static function setChunkSize($file)
113115
{
114-
$chunk_size = config('services.interfax.chunk_size', 1048576);
116+
$chunk_size = config('services.interfax.chunk_size', static::$DEFAULT_CHUNK_SIZE);
115117

116118
if (is_string($file)) {
117119
return [

0 commit comments

Comments
 (0)