Skip to content

Commit

Permalink
Merge pull request #148 from justbetter/analysis-o7xnx5
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
royduin authored Oct 7, 2024
2 parents a5ac47e + 5defcae commit 2841ab0
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 25 deletions.
10 changes: 5 additions & 5 deletions Block/SentryScript.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,15 @@ public function useSessionReplay(): bool
}

/**
* Get the session replay sample rate
* Get the session replay sample rate.
*/
public function getReplaySessionSampleRate(): float
{
return $this->dataHelper->getReplaySessionSampleRate();
}

/**
* Get the session replay error sample rate
* Get the session replay error sample rate.
*/
public function getReplayErrorSampleRate(): float
{
Expand Down Expand Up @@ -185,7 +185,7 @@ public function stripStoreCode()
}

/**
* Get Store code
* Get Store code.
*
* @return string
*/
Expand All @@ -195,15 +195,15 @@ public function getStoreCode()
}

/**
* Whether tracing is enabled
* Whether tracing is enabled.
*/
public function isTracingEnabled(): bool
{
return $this->dataHelper->isTracingEnabled();
}

/**
* Get sample rate for tracing
* Get sample rate for tracing.
*/
public function getTracingSampleRate(): float
{
Expand Down
4 changes: 2 additions & 2 deletions Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -332,15 +332,15 @@ public function useSessionReplay(): bool
}

/**
* Get the session replay sample rate
* Get the session replay sample rate.
*/
public function getReplaySessionSampleRate(): float
{
return $this->getConfigValue(static::XML_PATH_SRS.'replay_session_sample_rate') ?? 0.1;
}

/**
* Get the session replay error sample rate
* Get the session replay error sample rate.
*/
public function getReplayErrorSampleRate(): float
{
Expand Down
2 changes: 1 addition & 1 deletion Model/Config/Source/LogLevel.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class LogLevel implements ArrayInterface
{
/**
* Mapping of Monolog values to Strings
* Mapping of Monolog values to Strings.
*
* @return array
*/
Expand Down
2 changes: 1 addition & 1 deletion Model/Config/Source/ScriptTagPlacement.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class ScriptTagPlacement implements ArrayInterface
{
/**
* Mapping of script include positions to strings
* Mapping of script include positions to strings.
*
* @return array
*/
Expand Down
2 changes: 1 addition & 1 deletion Model/SentryInteraction.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function initialize($config)
}

/**
* Capture passed exception
* Capture passed exception.
*
* @param \Throwable $ex
*
Expand Down
2 changes: 1 addition & 1 deletion Model/SentryLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function __construct(
}

/**
* Check and send log information to Sentry
* Check and send log information to Sentry.
*
* @param \Throwable|string $message
* @param int $logLevel
Expand Down
2 changes: 1 addition & 1 deletion Plugin/GlobalExceptionCatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function __construct(
* Wrap launch, start watching for exceptions.
*
* @param AppInterface $subject
* @param callable $proceed
* @param callable $proceed
*
* @return \Magento\Framework\App\ResponseInterface
*/
Expand Down
6 changes: 3 additions & 3 deletions Plugin/LogrocketCustomerInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class LogrocketCustomerInfo
* LogrocketCustomerInfo construct.
*
* @param CurrentCustomer $currentCustomer
* @param Session $customerSession
* @param Session $customerSession
*/
public function __construct(
protected CurrentCustomer $currentCustomer,
Expand All @@ -24,7 +24,7 @@ public function __construct(
* Add customer info to the section.
*
* @param Customer $subject
* @param array $result
* @param array $result
*
* @return array $result
*/
Expand All @@ -33,7 +33,7 @@ public function afterGetSectionData(Customer $subject, $result)
if (!$this->customerSession->isLoggedIn()) {
return $result;
}

$customer = $this->currentCustomer->getCustomer();

$result['email'] = $customer->getEmail();
Expand Down
20 changes: 10 additions & 10 deletions Plugin/MonologPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ class MonologPlugin extends Monolog
/**
* @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 Data $sentryHelper
* @param SentryLog $sentryLog
* @param DeploymentConfig $deploymentConfig
* @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 string $name The logging channel, a simple descriptive name that is attached to all log records
* @param Data $sentryHelper
* @param SentryLog $sentryLog
* @param DeploymentConfig $deploymentConfig
* @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 @@ -34,10 +34,10 @@ public function __construct(
/**
* Adds a log record to Sentry.
*
* @param int $level The logging level
* @param string $message The log message
* @param array $context The log context
* @param DateTimeImmutable $datetime Datetime of log
* @param int $level The logging level
* @param string $message The log message
* @param array $context The log context
* @param DateTimeImmutable $datetime Datetime of log
*
* @return bool Whether the record has been processed
*/
Expand Down

0 comments on commit 2841ab0

Please sign in to comment.