Skip to content

Commit 8f52331

Browse files
szepeviktorpionl
authored andcommitted
Introduce static analysis + Fixes
1 parent dcf5cf4 commit 8f52331

File tree

7 files changed

+11
-9
lines changed

7 files changed

+11
-9
lines changed

composer.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@
2424
"phpunit/phpunit": "5.7 | 6.0 | 7.0 | 7.5 | 8.4 | ^8.5 | ^9.3 | ^10.0",
2525
"mockery/mockery": "^1.1.0 | ^1.3.0",
2626
"friendsofphp/php-cs-fixer": "^2.16.0",
27-
"overtrue/phplint": "^1.1 | ^2.0"
27+
"overtrue/phplint": "^1.1",
28+
"nunomaduro/larastan": "^0.4.3",
29+
"phpstan/phpstan-shim": "^0.11.19",
30+
"orchestra/testbench": "^4.3"
2831
},
2932
"autoload": {
3033
"psr-4": {

src/Config/AbstractConfig.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ abstract public function clearTimestampString();
4747
/**
4848
* Returns the schedule config array.
4949
*
50-
* @return array<enable,cron>
50+
* @return array{enable: bool, cron: string}
5151
*/
5252
abstract public function scheduleConfig();
5353

src/Config/FileConfig.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function clearTimestampString()
6161
/**
6262
* Returns the shedule config array.
6363
*
64-
* @return array<enable,cron>
64+
* @return array{enable: bool, cron: string}
6565
*/
6666
public function scheduleConfig()
6767
{

src/Handler/SingleUploadHandler.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ class SingleUploadHandler extends AbstractHandler
1717
* Returns the chunks ave instance for saving.
1818
*
1919
* @param ChunkStorage $chunkStorage the chunk storage
20-
* @param AbstractConfig $config the config manager
2120
*
2221
* @return SingleSave
2322
*/

src/Receiver/FileReceiver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,6 @@ public function receive()
9797
return false;
9898
}
9999

100-
return $this->handler->startSaving($this->chunkStorage, $this->config);
100+
return $this->handler->startSaving($this->chunkStorage);
101101
}
102102
}

src/Save/AbstractSave.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ public function getUploadedFile()
105105
/**
106106
* Passes all the function into the file.
107107
*
108-
* @param $name string
109-
* @param $arguments array
108+
* @param string $name
109+
* @param array $arguments
110110
*
111111
* @return mixed
112112
*

src/Storage/ChunkStorage.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public function config()
187187
}
188188

189189
/**
190-
* @return FilesystemAdapter
190+
* @return \Illuminate\Filesystem\FilesystemAdapter
191191
*/
192192
public function disk()
193193
{
@@ -197,7 +197,7 @@ public function disk()
197197
/**
198198
* Returns the driver.
199199
*
200-
* @return FilesystemOperator|FilesystemInterface
200+
* @return FilesystemInterface
201201
*/
202202
public function driver()
203203
{

0 commit comments

Comments
 (0)