1 | <?php |
||
22 | class SiteProcess extends ProcessBase |
||
23 | { |
||
24 | /** @var AliasRecord */ |
||
25 | protected $siteAlias; |
||
26 | /** @var string[] */ |
||
27 | protected $args; |
||
28 | /** @var string[] */ |
||
29 | protected $options; |
||
30 | /** @var string[] */ |
||
31 | protected $optionsPassedAsArgs; |
||
32 | /** @var string */ |
||
33 | protected $cd; |
||
34 | /** @var TransportInterface */ |
||
35 | protected $transport; |
||
36 | |||
37 | /** |
||
38 | * Process arguments and options per the site alias and build the |
||
39 | * actual command to run. |
||
40 | */ |
||
41 | public function __construct(AliasRecord $siteAlias, TransportInterface $transport, $args, $options = [], $optionsPassedAsArgs = []) |
||
51 | |||
52 | /** |
||
53 | * @return string |
||
54 | */ |
||
55 | public function getCd() |
||
59 | |||
60 | /** |
||
61 | * @param string $cwd |
||
|
|||
62 | */ |
||
63 | public function setCd($cd) |
||
67 | |||
68 | /** |
||
69 | * |
||
70 | * @param bool $shouldUseSiteRoot |
||
71 | * @return $this|\Symfony\Component\Process\Process |
||
72 | * @throws \Exception |
||
73 | * @deprecated. |
||
74 | */ |
||
75 | public function chdirToSiteRoot($shouldUseSiteRoot = true) |
||
83 | |||
84 | /** |
||
85 | * Take all of our individual arguments and process them for use. |
||
86 | */ |
||
87 | protected function processArgs() |
||
112 | |||
113 | public function setTransport($transport) |
||
117 | |||
118 | /** |
||
119 | * Ask the transport manager for the correct transport for the |
||
120 | * provided alias. |
||
121 | */ |
||
122 | protected function getTransport(AliasRecord $siteAlias) |
||
126 | |||
127 | /** |
||
128 | * @inheritDoc |
||
129 | */ |
||
130 | public function getCommandLine() |
||
141 | |||
142 | /** |
||
143 | * @inheritDoc |
||
144 | */ |
||
145 | public function start(callable $callback = null, $env = array()) |
||
150 | |||
151 | /** |
||
152 | * @inheritDoc |
||
153 | */ |
||
154 | public function wait(callable $callback = null) |
||
159 | |||
160 | /** |
||
161 | * interpolate examines each of the arguments in the provided argument list |
||
162 | * and replaces any token found therein with the value for that key as |
||
163 | * pulled from the given site alias. |
||
164 | * |
||
165 | * Example: "git -C {{root}} status" |
||
166 | * |
||
167 | * The token "{{root}}" will be converted to a value via $siteAlias->get('root'). |
||
168 | * The result will replace the token. |
||
169 | * |
||
170 | * It is possible to use dot notation in the keys to access nested elements |
||
171 | * within the site alias record. |
||
172 | * |
||
173 | * @param AliasRecord $siteAlias |
||
174 | * @param type $args |
||
175 | * @return type |
||
176 | */ |
||
177 | protected function interpolate($args) |
||
190 | } |
||
191 |
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
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.