1 | <?php |
||
20 | class SiteProcess extends ProcessBase |
||
21 | { |
||
22 | /** @var AliasRecord */ |
||
23 | protected $siteAlias; |
||
24 | /** @var string */ |
||
25 | protected $args; |
||
26 | /** @var string */ |
||
27 | protected $options; |
||
28 | /** @var string */ |
||
29 | protected $optionsPassedAsArgs; |
||
30 | /** @var string */ |
||
31 | protected $cd; |
||
32 | |||
33 | /** |
||
34 | * Process arguments and options per the site alias and build the |
||
35 | * actual command to run. |
||
36 | */ |
||
37 | public function __construct(AliasRecord $siteAlias, $args, $options = [], $optionsPassedAsArgs = []) |
||
46 | |||
47 | /** |
||
48 | * @inheritdoc |
||
49 | */ |
||
50 | public function setWorkingDirectory($cwd) |
||
55 | |||
56 | public function chdirToSiteRoot($shouldUseSiteRoot = true) |
||
64 | |||
65 | /** |
||
66 | * Take all of our individual arguments and process them for use. |
||
67 | */ |
||
68 | protected function processArgs() |
||
93 | |||
94 | /** |
||
95 | * TODO: Could we perhaps support variable transport mechanisms? |
||
96 | */ |
||
97 | protected static function getTransport(AliasRecord $siteAlias) |
||
105 | |||
106 | /** |
||
107 | * @inheritDoc |
||
108 | */ |
||
109 | public function getCommandLine() |
||
120 | |||
121 | /** |
||
122 | * @inheritDoc |
||
123 | */ |
||
124 | public function start(callable $callback = null) |
||
129 | |||
130 | /** |
||
131 | * @inheritDoc |
||
132 | */ |
||
133 | public function wait(callable $callback = null) |
||
138 | |||
139 | /** |
||
140 | * interpolate examines each of the arguments in the provided argument list |
||
141 | * and replaces any token found therein with the value for that key as |
||
142 | * pulled from the given site alias. |
||
143 | * |
||
144 | * Example: "git -C {{root}} status" |
||
145 | * |
||
146 | * The token "{{root}}" will be converted to a value via $siteAlias->get('root'). |
||
147 | * The result will replace the token. |
||
148 | * |
||
149 | * It is possible to use dot notation in the keys to access nested elements |
||
150 | * within the site alias record. |
||
151 | * |
||
152 | * @param AliasRecord $siteAlias |
||
153 | * @param type $args |
||
154 | * @return type |
||
155 | */ |
||
156 | protected function interpolate($args) |
||
169 | } |
||
170 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..