diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index fb68798..2819371 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -20,8 +20,7 @@ jobs: tools: composer:v2 coverage: pcov - - name: Install dependencies - run: composer update --prefer-stable --prefer-dist --no-interaction --no-progress + - uses: ramsey/composer-install@v1 - name: Execute tests run: vendor/bin/phpunit --verbose diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b18fa1c..73200c7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,10 +10,12 @@ jobs: strategy: fail-fast: true matrix: - php: [7.2, 7.3, 7.4, 8.0] - stability: [prefer-lowest, prefer-stable] + php: [7.2, 7.3, 7.4, 8.0, 8.1] + dependencies: + - lowest + - highest - name: Tests on PHP ${{ matrix.php }} - ${{ matrix.stability }} + name: Tests on PHP ${{ matrix.php }} - ${{ matrix.dependencies }} steps: - name: Checkout code @@ -26,8 +28,9 @@ jobs: tools: composer:v2 coverage: none - - name: Install dependencies - run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress + - uses: "ramsey/composer-install@v1" + with: + dependency-versions: "${{ matrix.dependencies }}" - name: Execute tests run: vendor/bin/phpunit --verbose diff --git a/composer.json b/composer.json index a84075f..4441509 100644 --- a/composer.json +++ b/composer.json @@ -12,14 +12,14 @@ } ], "require": { - "php": ">=7.2", + "php": "^7.2 | ~8.0.0 | ~8.1.0", "guzzlehttp/guzzle": "^6.2 || ^7.0", "illuminate/notifications": "~5.5 || ~6.0 || ~7.0 || ~8.0", "illuminate/support": "~5.5 || ~6.0 || ~7.0 || ~8.0" }, "require-dev": { "mockery/mockery": "^1.2.0", - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^8.5.21 | ^9.4.4" }, "autoload": { "psr-4": { diff --git a/src/Pushbullet.php b/src/Pushbullet.php index b0b2f45..5f2ac09 100644 --- a/src/Pushbullet.php +++ b/src/Pushbullet.php @@ -56,7 +56,6 @@ private function getHeaders(): array * Send request to Pushbullet API. * * @param array $params - * * @return \Psr\Http\Message\ResponseInterface */ public function send($params): ResponseInterface diff --git a/src/PushbulletChannel.php b/src/PushbulletChannel.php index e077349..d9bfd66 100644 --- a/src/PushbulletChannel.php +++ b/src/PushbulletChannel.php @@ -25,8 +25,8 @@ public function __construct(Pushbullet $pushbullet) /** * Send the given notification. * - * @param mixed $notifiable - * @param \Illuminate\Notifications\Notification $notification + * @param mixed $notifiable + * @param \Illuminate\Notifications\Notification $notification * * @throws \NotificationChannels\Pushbullet\Exceptions\CouldNotSendNotification */ @@ -44,8 +44,7 @@ public function send($notifiable, Notification $notification): void /** * @param $notifiable - * - * @return \NotificationChannels\Pushbullet\Targets\Targetable|void + * @return \NotificationChannels\Pushbullet\Targets\Targetable|void */ private function getTarget($notifiable): ?Targetable { diff --git a/src/PushbulletMessage.php b/src/PushbulletMessage.php index 4426e15..9db6b26 100644 --- a/src/PushbulletMessage.php +++ b/src/PushbulletMessage.php @@ -43,8 +43,7 @@ class PushbulletMessage public $url; /** - * @param string $message - * + * @param string $message * @return static */ public static function create($message): self @@ -53,7 +52,7 @@ public static function create($message): self } /** - * @param string $message + * @param string $message */ public function __construct($message) { @@ -62,7 +61,6 @@ public function __construct($message) /** * @param \NotificationChannels\Pushbullet\Targets\Targetable $targetable - * * @return $this */ public function target(Targetable $targetable): self @@ -100,7 +98,6 @@ public function link(): self * Set notification title. * * @param string $title - * * @return $this */ public function title($title): self @@ -114,7 +111,6 @@ public function title($title): self * Set notification message. * * @param string $message - * * @return $this */ public function message($message): self @@ -128,7 +124,6 @@ public function message($message): self * Set notification url (if notification is of `link` type). * * @param string $url - * * @return $this */ public function url($url): self