Skip to content

Commit 6a094e5

Browse files
committed
feat: add phpstan webhook
1 parent 565c186 commit 6a094e5

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

.github/workflows/phpstan.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: PHPStan
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
phpstan:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v4
11+
12+
- name: Setup PHP
13+
uses: shivammathur/setup-php@2.26.0
14+
with:
15+
php-version: '8.1'
16+
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Install dependencies
21+
run: |
22+
composer install --no-interaction --no-progress --no-suggest
23+
24+
- name: Run PHPStan
25+
run: |
26+
composer analyse --error-format=github

src/Http/Actions/WebhookAction.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace CSlant\LaravelTelegramGitNotifier\Http\Actions;
44

5+
use CSlant\TelegramGitNotifier\Exceptions\WebhookException;
56
use CSlant\TelegramGitNotifier\Webhook;
67

78
class WebhookAction
@@ -19,6 +20,8 @@ public function __construct()
1920
* Set webhook for telegram bot.
2021
*
2122
* @return false|string
23+
*
24+
* @throws WebhookException
2225
*/
2326
public function set(): false|string
2427
{
@@ -29,6 +32,8 @@ public function set(): false|string
2932
* Delete webhook for telegram bot.
3033
*
3134
* @return false|string
35+
*
36+
* @throws WebhookException
3237
*/
3338
public function delete(): false|string
3439
{
@@ -39,6 +44,8 @@ public function delete(): false|string
3944
* Get webhook update.
4045
*
4146
* @return false|string
47+
*
48+
* @throws WebhookException
4249
*/
4350
public function getUpdates(): false|string
4451
{

0 commit comments

Comments
 (0)