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 44
55namespace DragonCode \GithubNotifications \Data ;
66
7- use Illuminate \Support \Str ;
8-
9- use function Termwind \terminal ;
10-
117class NotificationData extends Data
128{
139 public int $ id ;
@@ -39,7 +35,6 @@ public function __construct(array $data, int $index)
3935 $ this ->repository = $ this ->get ($ data , 'repository.name ' );
4036
4137 $ this ->title = $ this ->title ($ index );
42- $ this ->title .= $ this ->caption ($ data );
4338 }
4439
4540 protected function title (int $ index ): string
@@ -53,20 +48,6 @@ protected function title(int $index): string
5348 );
5449 }
5550
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-
7051 protected function issueId (array $ data ): int
7152 {
7253 if ($ values = $ this ->parseUrl ($ data )) {
@@ -84,9 +65,4 @@ protected function parseUrl(array $data): ?array
8465
8566 return null ;
8667 }
87-
88- protected function terminalWidth (): int
89- {
90- return terminal ()->width ();
91- }
9268}
You can’t perform that action at this time.
0 commit comments