You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Commands/CreateHookCommand.php
+47-26Lines changed: 47 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,12 @@ class CreateHookCommand extends Command
11
11
{
12
12
protected$signature = 'hook {hook=pre-commit : The hook to be setted} {scriptFile? : The custom script to be setted as the hook (default:GitHooks)}';
13
13
protected$description = 'Copies the hook for the GitHooks execution. The default hook is pre-commit. You can pass scriptFile as argument to set custom scripts.';
14
+
15
+
/**
16
+
* Extra information about the command invoked with the --help flag.
17
+
*
18
+
* @var string
19
+
*/
14
20
protected$help = 'The default script is the default GitHooks execution. You can custom your script to execute what ever you want.
15
21
Even the default script and after, other tools which GitHooks not support or vice versa';
16
22
@@ -19,6 +25,27 @@ class CreateHookCommand extends Command
19
25
*/
20
26
protected$printer;
21
27
28
+
/**
29
+
* Path to the root project
30
+
*
31
+
* @var string
32
+
*/
33
+
protected$root;
34
+
35
+
/**
36
+
* First argument. The hook that will be setted.
37
+
*
38
+
* @var string
39
+
*/
40
+
protected$hook;
41
+
42
+
/**
43
+
* Second argument. The custom script to be setted as the hook. Per default is the GitHooks script to execute the tools setted in githooks.yml file.
44
+
*
45
+
* @var string
46
+
*/
47
+
protected$scriptFile;
48
+
22
49
publicfunction__construct(Printer$printer)
23
50
{
24
51
$this->printer = $printer;
@@ -27,46 +54,42 @@ public function __construct(Printer $printer)
0 commit comments