phpstan update

This commit is contained in:
Pierre Rudloff 2021-02-07 12:42:03 +01:00
parent 50fe879f16
commit 36ba147430
4 changed files with 27 additions and 11 deletions

View File

@ -301,7 +301,14 @@ class PlaylistArchiveStream extends ZipArchive implements StreamInterface
}
} else {
// Start streaming the first video.
$this->startVideoStream(current($this->videos));
$video = current($this->videos);
if ($video) {
$this->startVideoStream($video);
} else {
$this->push_error('Playlist was empty');
$this->finish();
$this->isComplete = true;
}
}
}

View File

@ -49,7 +49,7 @@
"maximebf/debugbar": "^1.16",
"php-mock/php-mock-mockery": "^1.3",
"phpro/grumphp": "^1.1",
"phpstan/phpstan": "^0.12.25",
"phpstan/phpstan": "^0.12.72",
"phpunit/phpunit": "^8.4",
"smarty-gettext/smarty-gettext": "^1.6",
"squizlabs/php_codesniffer": "^3.5",

14
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "d67f3db130b0bdbf050c34630c130cab",
"content-hash": "92c9a9ffac023cb7e7d0d1603a3e0d65",
"packages": [
{
"name": "aura/session",
@ -5247,20 +5247,20 @@
},
{
"name": "phpstan/phpstan",
"version": "0.12.25",
"version": "0.12.72",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
"reference": "9619551d68b2d4c0d681a8df73f3c847c798ee64"
"reference": "ae32fb1c5e97979f424c3ccec4ee435a35754769"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/9619551d68b2d4c0d681a8df73f3c847c798ee64",
"reference": "9619551d68b2d4c0d681a8df73f3c847c798ee64",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/ae32fb1c5e97979f424c3ccec4ee435a35754769",
"reference": "ae32fb1c5e97979f424c3ccec4ee435a35754769",
"shasum": ""
},
"require": {
"php": "^7.1"
"php": "^7.1|^8.0"
},
"conflict": {
"phpstan/phpstan-shim": "*"
@ -5285,7 +5285,7 @@
"MIT"
],
"description": "PHPStan - PHP Static Analysis Tool",
"time": "2020-05-10T20:36:16+00:00"
"time": "2021-02-06T18:34:03+00:00"
},
{
"name": "phpunit/php-code-coverage",

View File

@ -37,7 +37,16 @@ class UglyRouterTest extends ContainerTest
parent::setUp();
$this->router = new UglyRouter();
$this->router->map(['GET'], '/foo', 'print')->setName('foo');
$this->router->map(['GET'], '/foo', [$this, 'fakeHandler'])->setName('foo');
}
/**
* Empty function that only exists so that our route can have a handler.
*
* @return void
*/
private function fakeHandler()
{
}
/**
@ -54,7 +63,7 @@ class UglyRouterTest extends ContainerTest
Environment::mock(
[
'REQUEST_METHOD' => 'GET',
'QUERY_STRING' => 'page=foo',
'QUERY_STRING' => 'page=foo',
]
)
)