File tree Expand file tree Collapse file tree 1 file changed +0
-24
lines changed Expand file tree Collapse file tree 1 file changed +0
-24
lines changed Original file line number Diff line number Diff line change 4
4
5
5
namespace DragonCode \GithubNotifications \Data ;
6
6
7
- use Illuminate \Support \Str ;
8
-
9
- use function Termwind \terminal ;
10
-
11
7
class NotificationData extends Data
12
8
{
13
9
public int $ id ;
@@ -39,7 +35,6 @@ public function __construct(array $data, int $index)
39
35
$ this ->repository = $ this ->get ($ data , 'repository.name ' );
40
36
41
37
$ this ->title = $ this ->title ($ index );
42
- $ this ->title .= $ this ->caption ($ data );
43
38
}
44
39
45
40
protected function title (int $ index ): string
@@ -53,20 +48,6 @@ protected function title(int $index): string
53
48
);
54
49
}
55
50
56
- public function caption (array $ data ): string
57
- {
58
- $ title = Str::length (strip_tags ($ this ->title ));
59
-
60
- return Str::of (strip_tags ((string ) $ this ->get ($ data , 'subject.title ' )))
61
- ->trim ()
62
- ->squish ()
63
- ->limit ($ this ->terminalWidth () - $ title - 50 )
64
- ->prepend ('<fg=yellow>( ' )
65
- ->append (')</> ' )
66
- ->prepend (' ' )
67
- ->toString ();
68
- }
69
-
70
51
protected function issueId (array $ data ): int
71
52
{
72
53
if ($ values = $ this ->parseUrl ($ data )) {
@@ -84,9 +65,4 @@ protected function parseUrl(array $data): ?array
84
65
85
66
return null ;
86
67
}
87
-
88
- protected function terminalWidth (): int
89
- {
90
- return terminal ()->width ();
91
- }
92
68
}
You can’t perform that action at this time.
0 commit comments