refactor(phpstan): Various code improvements
This commit is contained in:
parent
80b44af772
commit
ac3b768b50
2 changed files with 9 additions and 9 deletions
|
@ -89,12 +89,12 @@ class VideoDownload
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
private function getProp($url, $format = null, $prop = 'dump-json', $password = null)
|
private function getProp($url = null, $format = null, $prop = 'dump-json', $password = null)
|
||||||
{
|
{
|
||||||
$arguments = [
|
$arguments = ['--'.$prop];
|
||||||
'--'.$prop,
|
if (isset($url)) {
|
||||||
$url,
|
$arguments[] = $url;
|
||||||
];
|
}
|
||||||
if (isset($format)) {
|
if (isset($format)) {
|
||||||
$arguments[] = '-f '.$format;
|
$arguments[] = '-f '.$format;
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,9 +79,9 @@ class FrontController
|
||||||
/**
|
/**
|
||||||
* FrontController constructor.
|
* FrontController constructor.
|
||||||
*
|
*
|
||||||
* @param Container $container Slim dependency container
|
* @param ContainerInterface $container Slim dependency container
|
||||||
* @param Config $config Config instance
|
* @param Config $config Config instance
|
||||||
* @param array $cookies Cookie array
|
* @param array $cookies Cookie array
|
||||||
*/
|
*/
|
||||||
public function __construct(ContainerInterface $container, Config $config = null, array $cookies = [])
|
public function __construct(ContainerInterface $container, Config $config = null, array $cookies = [])
|
||||||
{
|
{
|
||||||
|
@ -112,7 +112,7 @@ class FrontController
|
||||||
*/
|
*/
|
||||||
public function index(Request $request, Response $response)
|
public function index(Request $request, Response $response)
|
||||||
{
|
{
|
||||||
$uri = $request->getUri()->withUserInfo(null);
|
$uri = $request->getUri()->withUserInfo('');
|
||||||
$this->view->render(
|
$this->view->render(
|
||||||
$response,
|
$response,
|
||||||
'index.tpl',
|
'index.tpl',
|
||||||
|
|
Loading…
Reference in a new issue