A few minor fixes
All checks were successful
timw4mail/HummingBirdAnimeClient/pipeline/head This commit looks good
All checks were successful
timw4mail/HummingBirdAnimeClient/pipeline/head This commit looks good
This commit is contained in:
parent
97df64bf7a
commit
a338a43e43
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
@ -37,7 +37,7 @@ pipeline {
|
||||
stage('Code Cleanliness') {
|
||||
agent any
|
||||
steps {
|
||||
sh "php8 ./vendor/bin/phpstan analyse -c phpstan.neon -n --no-progress --no-ansi --error-format=checkstyle | awk '{\$1=\$1;print}' > build/logs/phpstan.log"
|
||||
sh "php ./vendor/bin/phpstan analyse -c phpstan.neon -n --no-progress --no-ansi --error-format=checkstyle | awk '{\$1=\$1;print}' > build/logs/phpstan.log"
|
||||
recordIssues(
|
||||
failOnError: false,
|
||||
tools: [phpStan(reportEncoding: 'UTF-8', pattern: 'build/logs/phpstan.log')]
|
||||
|
2
console
2
console
@ -26,7 +26,7 @@ try
|
||||
'sync:lists' => Command\SyncLists::class
|
||||
]))->run();
|
||||
}
|
||||
catch (\Exception $e)
|
||||
catch (\Throwable)
|
||||
{
|
||||
|
||||
}
|
||||
|
11
index.php
11
index.php
@ -17,9 +17,9 @@
|
||||
namespace Aviat\AnimeClient;
|
||||
|
||||
use Aviat\AnimeClient\Types\Config as ConfigType;
|
||||
use Whoops\Handler\PrettyPageHandler;
|
||||
use Whoops\Handler;
|
||||
use Whoops\Run;
|
||||
|
||||
use Whoops\Util;
|
||||
use function Aviat\Ion\_dir;
|
||||
|
||||
setlocale(LC_CTYPE, 'en_US');
|
||||
@ -30,7 +30,12 @@ require_once __DIR__ . '/vendor/autoload.php';
|
||||
if (file_exists('.is-dev'))
|
||||
{
|
||||
$whoops = new Run;
|
||||
$whoops->pushHandler(new PrettyPageHandler);
|
||||
$whoops->pushHandler(new Handler\PrettyPageHandler);
|
||||
|
||||
if (Util\Misc::isAjaxRequest()) {
|
||||
$whoops->pushHandler(new Handler\JsonResponseHandler);
|
||||
}
|
||||
|
||||
$whoops->register();
|
||||
}
|
||||
|
||||
|
@ -61,14 +61,16 @@ abstract class BaseCommand extends Command {
|
||||
|
||||
if ($fgColor !== NULL)
|
||||
{
|
||||
$fgColor = (string)$fgColor;
|
||||
$fgColor = (int)$fgColor;
|
||||
}
|
||||
if ($bgColor !== NULL)
|
||||
{
|
||||
$bgColor = (string)$bgColor;
|
||||
$bgColor = (int)$bgColor;
|
||||
}
|
||||
|
||||
// color message
|
||||
// Colorize the CLI output
|
||||
// the documented type for the function is wrong
|
||||
// @phpstan-ignore-next-line
|
||||
$message = Colors::colorize($message, $fgColor, $bgColor);
|
||||
|
||||
// create the box
|
||||
|
Loading…
Reference in New Issue
Block a user