Skip to content

Commit

Permalink
fixed lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
Sumitmaithani committed Oct 15, 2023
1 parent 831ef73 commit 512cd37
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/Utopia/Messaging/Adapters/Push/PushBullet.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,17 @@
namespace Utopia\Messaging\Adapters\Push;

use Exception;

use GuzzleHttp\Client;
use Utopia\Messaging\Adapters\Push as PushAdapter;
use Utopia\Messaging\Messages\Push;
use GuzzleHttp\Client;

class PushBullet extends PushAdapter
{
/**
* @param string $apiKey The PushBullet API key.
*/
public function __construct(string $apiKey)
public function __construct(private string $apiKey)
{
private string $apiKey;
}

/**
Expand All @@ -35,6 +33,7 @@ public function getName(): string
*/
public function getMaxMessagesPerRequest(): int
{
//TODO:: Didn't find the limit in PushBullet documentation
return 1000;
}

Expand All @@ -57,7 +56,7 @@ public function process(Push $message): bool
'json' => $payload,
]);

return $response->getStatusCode() === 200;
return $response;
} catch (Exception $e) {
return false;
}
Expand Down

0 comments on commit 512cd37

Please sign in to comment.