Skip to content

Commit 3df8534

Browse files
Fixed code-style
1 parent 51cb056 commit 3df8534

File tree

2 files changed

+20
-21
lines changed

2 files changed

+20
-21
lines changed

app/Commands/ReadCommand.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,20 @@
1414
class ReadCommand extends Command
1515
{
1616
protected $signature = 'read'
17-
. ' {repository?* : Full or partial repository names}'
18-
. ' {--r|except-repository=* : Exclude repositories from processing}'
19-
. ' {--i|except-issues : Exclude issues from processing}'
20-
. ' {--p|except-pulls : Exclude Pull Requests from processing}'
21-
. ' {--m|except-mentions : Exclude notifications with your mention from processing}'
22-
. ' {--o|with-open : Process including open Issues and Pull Requests}'
23-
. ' {--token= : Specifies the token to use}';
17+
. ' {repository?* : Full or partial repository names}'
18+
. ' {--r|except-repository=* : Exclude repositories from processing}'
19+
. ' {--i|except-issues : Exclude issues from processing}'
20+
. ' {--p|except-pulls : Exclude Pull Requests from processing}'
21+
. ' {--m|except-mentions : Exclude notifications with your mention from processing}'
22+
. ' {--o|with-open : Process including open Issues and Pull Requests}'
23+
. ' {--token= : Specifies the token to use}';
2424

2525
protected $description = 'Marks as read all notifications based on specified conditions';
2626

2727
public function handle(): void
2828
{
2929
$include = $this->repositories();
30-
$except = $this->exceptRepositories();
30+
$except = $this->exceptRepositories();
3131

3232
$this->welcome($include, $except);
3333

@@ -46,7 +46,7 @@ protected function welcome(array $repositories, ?array $exceptRepositories): voi
4646
$this->bulletList('You specified the following masks to exclude repositories:', $exceptRepositories);
4747
}
4848

49-
if (!$repositories && !$exceptRepositories) {
49+
if (! $repositories && ! $exceptRepositories) {
5050
Output::info('Mark as read all notifications except open ones');
5151
}
5252
}
@@ -75,10 +75,10 @@ protected function read(array $repositories): void
7575
protected function shouldBeAll(array $repositories): bool
7676
{
7777
return empty($repositories)
78-
&& !$this->exceptRepositories()
79-
&& !$this->exceptIssues()
80-
&& !$this->exceptPulls()
81-
&& !$this->exceptMentions()
78+
&& ! $this->exceptRepositories()
79+
&& ! $this->exceptIssues()
80+
&& ! $this->exceptPulls()
81+
&& ! $this->exceptMentions()
8282
&& $this->withOpen();
8383
}
8484

@@ -87,8 +87,8 @@ protected function gitHub(): GitHub
8787
$client = ClientFactory::make($this->token());
8888

8989
return app(GitHub::class, [
90-
'output' => $this->components,
91-
'github' => $client,
90+
'output' => $this->components,
91+
'github' => $client,
9292
'paginator' => new ResultPager($client),
9393
]);
9494
}

app/Services/GitHub.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ public function __construct(
3535
protected Factory $output,
3636
protected Client $github,
3737
protected ResultPager $paginator,
38-
) {
39-
}
38+
) {}
4039

4140
public function repositories(array $repositories): self
4241
{
@@ -94,7 +93,7 @@ public function markAll(): void
9493

9594
public function mark(): void
9695
{
97-
if (!$items = $this->paginated()) {
96+
if (! $items = $this->paginated()) {
9897
Output::success('No unread notifications');
9998

10099
return;
@@ -140,9 +139,9 @@ protected function notifications(): Notification
140139
protected function requestByType(NotificationData $notification): ?array
141140
{
142141
return match ($notification->type) {
143-
'Issue' => $this->issue($notification),
142+
'Issue' => $this->issue($notification),
144143
'PullRequest' => $this->pullRequest($notification),
145-
default => null
144+
default => null
146145
};
147146
}
148147

@@ -166,7 +165,7 @@ protected function pullRequest(NotificationData $notification): array
166165

167166
protected function shouldSkip(NotificationData $notification, ItemData $item): bool
168167
{
169-
if ($this->repositories && !Str::startsWith($notification->fullName, $this->repositories)) {
168+
if ($this->repositories && ! Str::startsWith($notification->fullName, $this->repositories)) {
170169
return true;
171170
}
172171

0 commit comments

Comments
 (0)