|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Laravel\Forge\Sites\Commands; |
|
4
|
|
|
|
|
5
|
|
|
class CreateSiteCommand extends SiteCommand |
|
6
|
|
|
{ |
|
7
|
|
|
/** |
|
8
|
|
|
* Set domain name. |
|
9
|
|
|
* |
|
10
|
|
|
* @param string $domain |
|
11
|
|
|
* |
|
12
|
|
|
* @return static |
|
13
|
|
|
*/ |
|
14
|
|
|
public function identifiedAs(string $domain) |
|
15
|
|
|
{ |
|
16
|
|
|
return $this->attachPayload('domain', $domain); |
|
17
|
|
|
} |
|
18
|
|
|
|
|
19
|
|
|
/** |
|
20
|
|
|
* Indicates that site will be created as General PHP/Laravel Application. |
|
21
|
|
|
* |
|
22
|
|
|
* @return static |
|
23
|
|
|
*/ |
|
24
|
|
|
public function asPhp() |
|
25
|
|
|
{ |
|
26
|
|
|
return $this->attachPayload('project_type', 'php'); |
|
27
|
|
|
} |
|
28
|
|
|
|
|
29
|
|
|
/** |
|
30
|
|
|
* Identifies which web directory the public app will reside at |
|
31
|
|
|
* |
|
32
|
|
|
* @param string $directory |
|
33
|
|
|
* |
|
34
|
|
|
* @return static |
|
35
|
|
|
*/ |
|
36
|
|
|
public function withDirectory(string $directory) |
|
37
|
|
|
{ |
|
38
|
|
|
return $this->attachPayload('directory', $directory); |
|
39
|
|
|
} |
|
40
|
|
|
|
|
41
|
|
|
/** |
|
42
|
|
|
* Isolates site and create a new user. |
|
43
|
|
|
* |
|
44
|
|
|
* @param string $directory |
|
|
|
|
|
|
45
|
|
|
* |
|
46
|
|
|
* @return static |
|
47
|
|
|
*/ |
|
48
|
|
|
public function isolated(string $username) |
|
49
|
|
|
{ |
|
50
|
|
|
$this->attachPayload('isolated', true); |
|
51
|
|
|
$this->attachPayload('username', $username); |
|
52
|
|
|
|
|
53
|
|
|
return $this; |
|
54
|
|
|
} |
|
55
|
|
|
|
|
56
|
|
|
/** |
|
57
|
|
|
* Indicates that site will be created as Static HTML site. |
|
58
|
|
|
* |
|
59
|
|
|
* @return static |
|
60
|
|
|
*/ |
|
61
|
|
|
public function asStatic() |
|
62
|
|
|
{ |
|
63
|
|
|
return $this->attachPayload('project_type', 'html'); |
|
64
|
|
|
} |
|
65
|
|
|
|
|
66
|
|
|
/** |
|
67
|
|
|
* Indicates that site will be created as Symfony Application. |
|
68
|
|
|
* |
|
69
|
|
|
* @return static |
|
70
|
|
|
*/ |
|
71
|
|
|
public function asSymfony() |
|
72
|
|
|
{ |
|
73
|
|
|
return $this->attachPayload('project_type', 'symfony'); |
|
74
|
|
|
} |
|
75
|
|
|
|
|
76
|
|
|
/** |
|
77
|
|
|
* Indicates that site will be created as Symfony (Dev) Application. |
|
78
|
|
|
* |
|
79
|
|
|
* @return static |
|
80
|
|
|
*/ |
|
81
|
|
|
public function asSymfonyDev() |
|
82
|
|
|
{ |
|
83
|
|
|
return $this->attachPayload('project_type', 'symfony_dev'); |
|
84
|
|
|
} |
|
85
|
|
|
|
|
86
|
|
|
/** |
|
87
|
|
|
* Alias for "asPhp" method. |
|
88
|
|
|
* |
|
89
|
|
|
* @return static |
|
90
|
|
|
*/ |
|
91
|
|
|
public function asLaravel() |
|
92
|
|
|
{ |
|
93
|
|
|
return $this->asPhp(); |
|
94
|
|
|
} |
|
95
|
|
|
|
|
96
|
|
|
/** |
|
97
|
|
|
* Alias for "asPhp" method. |
|
98
|
|
|
* |
|
99
|
|
|
* @return static |
|
100
|
|
|
*/ |
|
101
|
|
|
public function asGeneralPhp() |
|
102
|
|
|
{ |
|
103
|
|
|
return $this->asPhp(); |
|
104
|
|
|
} |
|
105
|
|
|
|
|
106
|
|
|
/** |
|
107
|
|
|
* Alias for "asStatic" method. |
|
108
|
|
|
* |
|
109
|
|
|
* @return static |
|
110
|
|
|
*/ |
|
111
|
|
|
public function asHtml() |
|
112
|
|
|
{ |
|
113
|
|
|
return $this->asStatic(); |
|
114
|
|
|
} |
|
115
|
|
|
} |
|
116
|
|
|
|
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.