Skip to content

Commit c9ddd6b

Browse files
committed
Merge branch 'main' of https://github.com/laravelwebdev/simpede into main
2 parents d5b7a0d + c57233e commit c9ddd6b

File tree

3 files changed

+22
-17
lines changed

3 files changed

+22
-17
lines changed

app/Helpers/Api.php

+8-7
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
namespace App\Helpers;
44

5-
use Symfony\Component\Process\Process;
65
use GuzzleHttp\Client;
6+
use Symfony\Component\Process\Process;
77

88
class Api
99
{
@@ -16,13 +16,14 @@ public static function getSentryUnreolvedIssues()
1616
$client = new Client;
1717
try {
1818
$response = $client->request('GET', "https://sentry.io/api/0/projects/$organization/$project/issues/", [
19-
'headers' => [
20-
'Authorization' => "Bearer $token",
21-
],
22-
'query' => [
23-
'query' => 'is:unresolved',
24-
],
19+
'headers' => [
20+
'Authorization' => "Bearer $token",
21+
],
22+
'query' => [
23+
'query' => 'is:unresolved',
24+
],
2525
]);
26+
2627
return json_decode($response->getBody()->getContents(), true);
2728
} catch (\Exception $e) {
2829
return [];

app/Nova/Metrics/IssuesTable.php

+7-5
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ public function __construct($data = [])
1818

1919
public function name(): string
2020
{
21-
return 'Issues' . ' (' . count($this->data) . ')';
21+
return 'Issues'.' ('.count($this->data).')';
2222
}
23+
2324
/**
2425
* Calculate the value of the metric.
2526
*
@@ -30,11 +31,12 @@ public function calculate(NovaRequest $request): array
3031
$rows = [];
3132
foreach ($this->data as $issue) {
3233
$rows[] = MetricTableRow::make()
33-
->icon($issue['level'] === 'error' ? 'x-circle' : 'exclamation-circle')
34-
->iconClass($issue['level'] === 'error' ? 'text-red-500' : 'text-yellow-500')
35-
->title(ucwords($issue['type']) . ' (' . $issue['count'] . ')')
36-
->subtitle($issue['title']);
34+
->icon($issue['level'] === 'error' ? 'x-circle' : 'exclamation-circle')
35+
->iconClass($issue['level'] === 'error' ? 'text-red-500' : 'text-yellow-500')
36+
->title(ucwords($issue['type']).' ('.$issue['count'].')')
37+
->subtitle($issue['title']);
3738
}
39+
3840
return $rows;
3941
}
4042

app/Nova/Metrics/OutdatedTable.php

+7-5
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ public function __construct($data = [])
1818

1919
public function name(): string
2020
{
21-
return 'Outdated Packages' . ' (' . count($this->data) . ')';
21+
return 'Outdated Packages'.' ('.count($this->data).')';
2222
}
23+
2324
/**
2425
* Calculate the value of the metric.
2526
*
@@ -30,11 +31,12 @@ public function calculate(NovaRequest $request): array
3031
$rows = [];
3132
foreach ($this->data as $package) {
3233
$rows[] = MetricTableRow::make()
33-
->icon('exclamation-circle')
34-
->iconClass('text-yellow-500')
35-
->title($package['name'])
36-
->subtitle('Installed: '.$package['version'].' | Latest: '.$package['latest']);
34+
->icon('exclamation-circle')
35+
->iconClass('text-yellow-500')
36+
->title($package['name'])
37+
->subtitle('Installed: '.$package['version'].' | Latest: '.$package['latest']);
3738
}
39+
3840
return $rows;
3941
}
4042

0 commit comments

Comments
 (0)