44
55use Exception ;
66use Illuminate \Container \Container ;
7- use Symfony \Component \Process \Process ;
8- use Symfony \Component \Console \Output \ConsoleOutput ;
97use Symfony \Component \Console \Helper \Table ;
8+ use Symfony \Component \Console \Output \ConsoleOutput ;
109
1110/**
12- * Define the ~/.config/valet path as a constant.
11+ * Define constants
1312 */
14- define ('VALET_LOOPBACK ' , '127.0.0.1 ' );
15- define ('VALET_HOME_PATH ' , $ _SERVER ['HOME ' ].'/.config/valet ' );
16- define ('VALET_SERVER_PATH ' , realpath (__DIR__ . '/../../server.php ' ));
17- define ('VALET_STATIC_PREFIX ' , '41c270e4-5535-4daa-b23e-c269744c2f45 ' );
13+ if (! defined ('VALET_LOOPBACK ' )) {
14+ define ('VALET_LOOPBACK ' , '127.0.0.1 ' );
15+ define ('VALET_HOME_PATH ' , $ _SERVER ['HOME ' ] . '/.config/valet ' );
16+ define ('VALET_SERVER_PATH ' , realpath (__DIR__ . '/../../server.php ' ));
17+ define ('VALET_STATIC_PREFIX ' , '41c270e4-5535-4daa-b23e-c269744c2f45 ' );
1818
19- define ('VALET_LEGACY_HOME_PATH ' , $ _SERVER ['HOME ' ]. '/.valet ' );
19+ define ('VALET_LEGACY_HOME_PATH ' , $ _SERVER ['HOME ' ] . '/.valet ' );
2020
21- define ('BREW_PREFIX ' , (new CommandLine ())->runAsUser ('printf $(brew --prefix) ' ));
21+ define ('BREW_PREFIX ' , (new CommandLine ())->runAsUser ('printf $(brew --prefix) ' ));
22+ }
2223
2324/**
2425 * Output the given text to the console.
2829 */
2930function info ($ output )
3031{
31- output ('<info> ' . $ output. '</info> ' );
32+ output ('<info> ' . $ output . '</info> ' );
3233}
3334
3435/**
@@ -39,7 +40,7 @@ function info($output)
3940 */
4041function warning ($ output )
4142{
42- output ('<fg=red> ' . $ output. '</> ' );
43+ output ('<fg=red> ' . $ output . '</> ' );
4344}
4445
4546/**
@@ -70,7 +71,7 @@ function output($output)
7071 return ;
7172 }
7273
73- (new ConsoleOutput )->writeln ($ output );
74+ (new ConsoleOutput () )->writeln ($ output );
7475}
7576
7677if (! function_exists ('resolve ' )) {
0 commit comments