Skip to content

Apply fixes from StyleCI #164

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Logger/Handler/Sentry.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
/**
* Construct.
*
* @param Data $sentryHelper
* @param SentryLog $sentryLog
* @param Data $sentryHelper
* @param SentryLog $sentryLog
* @param DeploymentConfig $deploymentConfig
*/
public function __construct(
Expand All @@ -27,18 +27,18 @@
/**
* @inheritDoc
*/
public function isHandling(array $record): bool

Check failure on line 30 in Logger/Handler/Sentry.php

View workflow job for this annotation

GitHub Actions / analyse

Parameter #1 $record (array) of method JustBetter\Sentry\Logger\Handler\Sentry::isHandling() is not contravariant with parameter #1 $record (Monolog\LogRecord) of method Monolog\Handler\AbstractHandler::isHandling().
{
$config = $this->sentryHelper->collectModuleConfig();
$this->setLevel((int) $config['log_level']); // @phpstan-ignore-line

return parent::isHandling($record) && $this->deploymentConfig->isAvailable() && $this->sentryHelper->isActive();

Check failure on line 35 in Logger/Handler/Sentry.php

View workflow job for this annotation

GitHub Actions / analyse

Parameter #1 $record of method Monolog\Handler\AbstractHandler::isHandling() expects Monolog\LogRecord, array given.
}

/**
* @inheritDoc
*/
public function handle(array $record): bool

Check failure on line 41 in Logger/Handler/Sentry.php

View workflow job for this annotation

GitHub Actions / analyse

Parameter #1 $record (array) of method JustBetter\Sentry\Logger\Handler\Sentry::handle() is not contravariant with parameter #1 $record (Monolog\LogRecord) of method Monolog\Handler\HandlerInterface::handle().
{
if (!$this->isHandling($record)) {
return false;
Expand Down
6 changes: 3 additions & 3 deletions Plugin/MonologPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
/**
* @psalm-param array<callable(array): array> $processors
*
* @param string $name The logging channel, a simple descriptive name that is attached to all log records
* @param string $name The logging channel, a simple descriptive name that is attached to all log records
* @param Sentry $sentryHandler
* @param \Monolog\Handler\HandlerInterface[] $handlers Optional stack of handlers, the first one in the array is called first, etc.
* @param callable[] $processors Optional array of processors
* @param \Monolog\Handler\HandlerInterface[] $handlers Optional stack of handlers, the first one in the array is called first, etc.
* @param callable[] $processors Optional array of processors
*/
public function __construct(
$name,
Expand All @@ -23,6 +23,6 @@
) {
$handlers['sentry'] = $sentryHandler;

parent::__construct($name, $handlers, $processors);

Check failure on line 26 in Plugin/MonologPlugin.php

View workflow job for this annotation

GitHub Actions / analyse

Parameter #3 $processors of method Magento\Framework\Logger\Monolog::__construct() expects array<callable(Monolog\LogRecord): Monolog\LogRecord>, array<callable(array): array> given.
}
}
Loading