Skip to content

Commit

Permalink
phpstan update
Browse files Browse the repository at this point in the history
  • Loading branch information
Rudloff committed Feb 7, 2021
1 parent 50fe879 commit 36ba147
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 11 deletions.
9 changes: 8 additions & 1 deletion classes/Stream/PlaylistArchiveStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,14 @@ public function read($length)
}
} 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;
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
14 changes: 7 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 11 additions & 2 deletions tests/UglyRouterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,16 @@ protected function setUp(): void
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()
{
}

/**
Expand All @@ -54,7 +63,7 @@ public function testDispatch()
Environment::mock(
[
'REQUEST_METHOD' => 'GET',
'QUERY_STRING' => 'page=foo',
'QUERY_STRING' => 'page=foo',
]
)
)
Expand Down

0 comments on commit 36ba147

Please sign in to comment.