Skip to content

Commit

Permalink
Apply PHP-CS-Fixer style patch
Browse files Browse the repository at this point in the history
  • Loading branch information
shadoWalker89 committed Sep 21, 2024
1 parent 5a90d31 commit 9c23907
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion example/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@

$driver = $notifier->getDriver();

echo 'Notification ', $result ? 'successfully sent' : 'failed', ' with ', str_replace('Joli\\JoliNotif\\Driver\\', '', $driver::class), \PHP_EOL;
echo 'Notification ', $result ? 'successfully sent' : 'failed', ' with ', str_replace('Joli\JoliNotif\Driver\\', '', $driver::class), \PHP_EOL;
2 changes: 1 addition & 1 deletion src/DefaultNotifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function __construct(
?LoggerInterface $logger = null,
/** @var list<DriverInterface> $additionalDrivers */
private readonly array $additionalDrivers = [],
private readonly bool $useOnlyAdditionalDrivers = false
private readonly bool $useOnlyAdditionalDrivers = false,
) {
$this->logger = $logger ?? new NullLogger();
}
Expand Down
8 changes: 4 additions & 4 deletions src/Driver/AppleScriptDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,18 @@ public function getPriority(): int

protected function getCommandLineArguments(Notification $notification): array
{
$script = 'display notification "' . str_replace('"', '\\"', $notification->getBody() ?? '') . '"';
$script = 'display notification "' . str_replace('"', '\"', $notification->getBody() ?? '') . '"';

if ($notification->getTitle()) {
$script .= ' with title "' . str_replace('"', '\\"', $notification->getTitle()) . '"';
$script .= ' with title "' . str_replace('"', '\"', $notification->getTitle()) . '"';
}

if ($notification->getOption('subtitle')) {
$script .= ' subtitle "' . str_replace('"', '\\"', (string) $notification->getOption('subtitle')) . '"';
$script .= ' subtitle "' . str_replace('"', '\"', (string) $notification->getOption('subtitle')) . '"';
}

if ($notification->getOption('sound')) {
$script .= ' sound name "' . str_replace('"', '\\"', (string) $notification->getOption('sound')) . '"';
$script .= ' sound name "' . str_replace('"', '\"', (string) $notification->getOption('sound')) . '"';
}

return [
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/InvalidNotificationException.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function __construct(
Notification $notification,
string $message = '',
int $code = 0,
?\Throwable $previous = null
?\Throwable $previous = null,
) {
$this->notification = $notification;

Expand Down
2 changes: 1 addition & 1 deletion src/Exception/NoSupportedNotifierException.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class NoSupportedNotifierException extends \RuntimeException implements Exceptio
public function __construct(
string $message = 'No supported notifier',
int $code = 0,
?\Throwable $previous = null
?\Throwable $previous = null,
) {
parent::__construct($message, $code, $previous);
}
Expand Down

0 comments on commit 9c23907

Please sign in to comment.