File tree 2 files changed +21
-0
lines changed 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,11 @@ class App
9
9
{
10
10
public function __construct (protected Client $ client ) {}
11
11
12
+ public function quit (): void
13
+ {
14
+ $ this ->client ->post ('app/quit ' );
15
+ }
16
+
12
17
public function focus (): void
13
18
{
14
19
$ this ->client ->post ('app/focus ' );
@@ -62,5 +67,19 @@ public function clearRecentDocuments(): void
62
67
public function isRunningBundled (): bool
63
68
{
64
69
return Phar::running () !== '' ;
70
+
71
+ }
72
+
73
+ public function openAtLogin (?bool $ open = null ): bool
74
+ {
75
+ if ($ open === null ) {
76
+ return (bool ) $ this ->client ->get ('app/open-at-login ' )->json ('open ' );
77
+ }
78
+
79
+ $ this ->client ->post ('app/open-at-login ' , [
80
+ 'open ' => $ open ,
81
+ ]);
82
+
83
+ return $ open ;
65
84
}
66
85
}
Original file line number Diff line number Diff line change 5
5
use Illuminate \Support \Facades \Facade ;
6
6
7
7
/**
8
+ * @method static void quit()
8
9
* @method static void focus()
9
10
* @method static void hide()
10
11
* @method static bool isHidden()
14
15
* @method static array recentDocuments()
15
16
* @method static void clearRecentDocuments()
16
17
* @method static bool isRunningBundled()
18
+ * @method static bool openAtLogin(?bool $open = null)
17
19
*/
18
20
class App extends Facade
19
21
{
You can’t perform that action at this time.
0 commit comments