1 | <?php |
||
30 | class StashCommand extends BaseCommand |
||
31 | { |
||
32 | const STASH_COMMAND = 'stash'; |
||
33 | |||
34 | /** |
||
35 | * constructor |
||
36 | * |
||
37 | * @param \GitElephant\Repository $repo The repository object this command |
||
38 | * will interact with |
||
39 | */ |
||
40 | 9 | public function __construct(Repository $repo = null) |
|
44 | |||
45 | /** |
||
46 | * Save your local modifications to a new stash, and run git reset --hard to revert them. |
||
47 | * |
||
48 | * @param string|null $message |
||
49 | * @param boolean $includeUntracked |
||
50 | * @param boolean $keepIndex |
||
51 | */ |
||
52 | 1 | public function save($message = null, $includeUntracked = false, $keepIndex = false) |
|
70 | |||
71 | /** |
||
72 | * Shows stash list |
||
73 | * |
||
74 | * @param array|null $options |
||
75 | * |
||
76 | * @return string |
||
77 | */ |
||
78 | 1 | public function list(array $options = null) |
|
87 | |||
88 | /** |
||
89 | * Shows details for a specific stash |
||
90 | * |
||
91 | * @param string $stash |
||
92 | * |
||
93 | * @return string |
||
94 | */ |
||
95 | 1 | public function show($stash) |
|
103 | |||
104 | /** |
||
105 | * Drops a stash |
||
106 | * |
||
107 | * @param string $stash |
||
108 | * |
||
109 | * @return string |
||
110 | */ |
||
111 | 1 | public function drop($stash) |
|
119 | |||
120 | /** |
||
121 | * Applies a stash |
||
122 | * |
||
123 | * @param string $stash |
||
124 | * @param boolean $index |
||
125 | * |
||
126 | * @return string |
||
127 | */ |
||
128 | 1 | public function apply($stash, $index = false) |
|
139 | |||
140 | /** |
||
141 | * Applies a stash, then removes it from the stash |
||
142 | * |
||
143 | * @param string $stash |
||
144 | * @param boolean $index |
||
145 | * |
||
146 | * @return string |
||
147 | */ |
||
148 | 1 | public function pop($stash, $index = false) |
|
159 | |||
160 | /** |
||
161 | * Creates and checks out a new branch named <branchname> starting from the commit at which the <stash> was originally created |
||
162 | * |
||
163 | * @param string $branch |
||
164 | * @param string $stash |
||
165 | */ |
||
166 | 1 | public function branch($branch, $stash) |
|
175 | |||
176 | /** |
||
177 | * Remove all the stashed states. |
||
178 | * |
||
179 | */ |
||
180 | 1 | public function clear() |
|
186 | |||
187 | /** |
||
188 | * Create a stash (which is a regular commit object) and return its object name, without storing it anywhere in the |
||
189 | * ref namespace. |
||
190 | * |
||
191 | */ |
||
192 | 1 | public function create() |
|
198 | |||
199 | /** |
||
200 | * @param $stash |
||
201 | * |
||
202 | * @return string |
||
203 | */ |
||
204 | 5 | private function normalizeStashName($stash) |
|
211 | |||
212 | } |
||
213 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: