@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | /** |
80 | 80 | * Class constructor |
81 | 81 | * |
82 | - * @param array $lines output lines for the diff |
|
82 | + * @param string $lines output lines for the diff |
|
83 | 83 | * |
84 | 84 | * @throws \InvalidArgumentException |
85 | 85 | */ |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | /** |
115 | 115 | * toString magic method |
116 | 116 | * |
117 | - * @return mixed |
|
117 | + * @return string |
|
118 | 118 | */ |
119 | 119 | public function __toString(): string |
120 | 120 | { |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | * create a repository from a remote git url, or a local filesystem |
144 | 144 | * and save it in a temp folder |
145 | 145 | * |
146 | - * @param string|Repository $git the git remote url, or the filesystem path |
|
146 | + * @param string $git the git remote url, or the filesystem path |
|
147 | 147 | * @param null $repositoryPath path |
148 | 148 | * @param string|null $binary the path to the git binary |
149 | 149 | * @param null $name repository name |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | /** |
192 | 192 | * Stage the working tree content |
193 | 193 | * |
194 | - * @param string|NodeObject $path the path to store |
|
194 | + * @param string $path the path to store |
|
195 | 195 | * |
196 | 196 | * @throws \RuntimeException |
197 | 197 | * @throws \Symfony\Component\Process\Exception\LogicException |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | /** |
210 | 210 | * Unstage a tree content |
211 | 211 | * |
212 | - * @param string|NodeObject $path the path to unstage |
|
212 | + * @param string $path the path to unstage |
|
213 | 213 | * |
214 | 214 | * @throws \RuntimeException |
215 | 215 | * @throws \Symfony\Component\Process\Exception\LogicException |
@@ -227,8 +227,8 @@ discard block |
||
227 | 227 | /** |
228 | 228 | * Move a file/directory |
229 | 229 | * |
230 | - * @param string|NodeObject $from source path |
|
231 | - * @param string|NodeObject $to destination path |
|
230 | + * @param string $from source path |
|
231 | + * @param string $to destination path |
|
232 | 232 | * |
233 | 233 | * @throws \RuntimeException |
234 | 234 | * @throws \Symfony\Component\Process\Exception\LogicException |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | /** |
248 | 248 | * Remove a file/directory |
249 | 249 | * |
250 | - * @param string|NodeObject $path the path to remove |
|
250 | + * @param string $path the path to remove |
|
251 | 251 | * @param bool $recursive recurse |
252 | 252 | * @param bool $force force |
253 | 253 | * |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | * rev-parse command - often used to return a commit tag. |
302 | 302 | * |
303 | 303 | * @param array $options the options to apply to rev-parse |
304 | - * @param string|NodeObject|Commit $arg the argument (may be a branch head, etc) |
|
304 | + * @param string $arg the argument (may be a branch head, etc) |
|
305 | 305 | * |
306 | 306 | * @throws \RuntimeException |
307 | 307 | * @throws \InvalidArgumentException |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | } |
330 | 330 | |
331 | 331 | /** |
332 | - * @param TreeishInterface|Commit|string $arg |
|
332 | + * @param Commit $arg |
|
333 | 333 | * @param array $options |
334 | 334 | */ |
335 | 335 | public function reset($arg, $options): void |
@@ -597,7 +597,7 @@ discard block |
||
597 | 597 | * |
598 | 598 | * @param string $name The new tag name |
599 | 599 | * @param null $startPoint The reference to create the tag from |
600 | - * @param null $message the tag message |
|
600 | + * @param null|string $message the tag message |
|
601 | 601 | * |
602 | 602 | * @throws \RuntimeException |
603 | 603 | * @throws \Symfony\Component\Process\Exception\RuntimeException |
@@ -818,7 +818,7 @@ discard block |
||
818 | 818 | * |
819 | 819 | * @param string|TreeishInterface|array $ref the treeish to check, as a string, as an object or as an array |
820 | 820 | * @param string|NodeObject $path the physical path to the tree relative to the repository root |
821 | - * @param int|null $limit limit to n entries |
|
821 | + * @param integer $limit limit to n entries |
|
822 | 822 | * @param int|null $offset skip n entries |
823 | 823 | * @param boolean|false $firstParent skip commits brought in to branch by a merge |
824 | 824 | * |
@@ -840,7 +840,7 @@ discard block |
||
840 | 840 | * @param string $refStart |
841 | 841 | * @param string $refEnd |
842 | 842 | * @param string|NodeObject $path the physical path to the tree relative to the repository root |
843 | - * @param int|null $limit limit to n entries |
|
843 | + * @param integer $limit limit to n entries |
|
844 | 844 | * @param int|null $offset skip n entries |
845 | 845 | * @param boolean|false $firstParent skip commits brought in to branch by a merge |
846 | 846 | * |
@@ -871,7 +871,7 @@ discard block |
||
871 | 871 | * Get a log for an object |
872 | 872 | * |
873 | 873 | * @param \GitElephant\Objects\NodeObject $obj The Object instance |
874 | - * @param null|string|\GitElephant\Objects\Branch $branch The branch to read from |
|
874 | + * @param string|null $branch The branch to read from |
|
875 | 875 | * @param int $limit Limit to n entries |
876 | 876 | * @param int|null $offset Skip n entries |
877 | 877 | * |
@@ -941,9 +941,9 @@ discard block |
||
941 | 941 | /** |
942 | 942 | * Get a Diff object for a commit with its parent, by default the diff is between the current head and its parent |
943 | 943 | * |
944 | - * @param \GitElephant\Objects\Commit|string $commit1 A TreeishInterface instance |
|
945 | - * @param \GitElephant\Objects\Commit|string|null $commit2 A TreeishInterface instance |
|
946 | - * @param null|string|NodeObject $path The path to get the diff for or a Object instance |
|
944 | + * @param string $commit1 A TreeishInterface instance |
|
945 | + * @param null|string $commit2 A TreeishInterface instance |
|
946 | + * @param null|string $path The path to get the diff for or a Object instance |
|
947 | 947 | * |
948 | 948 | * @throws \RuntimeException |
949 | 949 | * @throws \InvalidArgumentException |
@@ -958,7 +958,7 @@ discard block |
||
958 | 958 | * Clone a repository |
959 | 959 | * |
960 | 960 | * @param string $url the repository url (i.e. git://github.com/matteosister/GitElephant.git) |
961 | - * @param null $to where to clone the repo |
|
961 | + * @param null|string $to where to clone the repo |
|
962 | 962 | * @param string|null $repoReference Repo reference to clone. Required if performing a shallow clone. |
963 | 963 | * @param int|null $depth Depth to clone repo. Specify 1 to perform a shallow clone |
964 | 964 | * @param bool $recursive Whether to recursively clone child repos. |
@@ -1101,7 +1101,7 @@ discard block |
||
1101 | 1101 | * output a node content as an array of lines |
1102 | 1102 | * |
1103 | 1103 | * @param \GitElephant\Objects\NodeObject $obj The Object of type BLOB |
1104 | - * @param \GitElephant\Objects\TreeishInterface|string $treeish A treeish object |
|
1104 | + * @param null|Branch $treeish A treeish object |
|
1105 | 1105 | * |
1106 | 1106 | * @throws \RuntimeException |
1107 | 1107 | * @throws \Symfony\Component\Process\Exception\LogicException |
@@ -343,7 +343,7 @@ |
||
343 | 343 | * NOTE: this will do an assertion in the hope to ensure |
344 | 344 | * sanity of the test double |
345 | 345 | * |
346 | - * @return \GitElephant\Objects\Remote |
|
346 | + * @return \PHPUnit\Framework\MockObject\MockObject |
|
347 | 347 | */ |
348 | 348 | public function getMockRemote() |
349 | 349 | { |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | /** |
126 | 126 | * @param string $name file name |
127 | 127 | * @param string|null $folder folder name |
128 | - * @param null $content content |
|
128 | + * @param null|string $content content |
|
129 | 129 | * @param Repository $repository repository to add file to |
130 | 130 | * |
131 | 131 | * @return void |
@@ -281,6 +281,17 @@ discard block |
||
281 | 281 | return $mockRepo; |
282 | 282 | } |
283 | 283 | |
284 | + /** |
|
285 | + * @param string $sha |
|
286 | + * @param string $tree |
|
287 | + * @param string $author |
|
288 | + * @param string $committer |
|
289 | + * @param string $emailAuthor |
|
290 | + * @param string $emailCommitter |
|
291 | + * @param string $datetimeAuthor |
|
292 | + * @param string $datetimeCommitter |
|
293 | + * @param string $message |
|
294 | + */ |
|
284 | 295 | protected function doCommitTest( |
285 | 296 | Commit $commit, |
286 | 297 | $sha, |
@@ -71,7 +71,7 @@ |
||
71 | 71 | * @param string $cmd the command to execute |
72 | 72 | * @param bool $git if the command is git or a generic command |
73 | 73 | * @param string $cwd the directory where the command must be executed |
74 | - * @param array $acceptedExitCodes exit codes accepted to consider the command execution successful |
|
74 | + * @param integer[] $acceptedExitCodes exit codes accepted to consider the command execution successful |
|
75 | 75 | * |
76 | 76 | * @throws \RuntimeException |
77 | 77 | * @throws \Symfony\Component\Process\Exception\InvalidArgumentException |
@@ -13,7 +13,6 @@ |
||
13 | 13 | |
14 | 14 | namespace GitElephant\Command; |
15 | 15 | |
16 | -use GitElephant\Command\BranchCommand; |
|
17 | 16 | use GitElephant\TestCase; |
18 | 17 | |
19 | 18 | /** |
@@ -9,7 +9,6 @@ |
||
9 | 9 | |
10 | 10 | namespace GitElephant\Command; |
11 | 11 | |
12 | -use GitElephant\Objects\Commit; |
|
13 | 12 | use GitElephant\TestCase; |
14 | 13 | |
15 | 14 | class ResetCommandTest extends TestCase |
@@ -17,7 +17,6 @@ |
||
17 | 17 | use GitElephant\Objects\Commit; |
18 | 18 | use GitElephant\Command\ShowCommand; |
19 | 19 | use GitElephant\Command\MainCommand; |
20 | -use GitElephant\Command\CommandContainer; |
|
21 | 20 | |
22 | 21 | /** |
23 | 22 | * CommitTest |
@@ -18,13 +18,8 @@ |
||
18 | 18 | use GitElephant\Objects\Diff\DiffObject; |
19 | 19 | use GitElephant\Objects\Diff\DiffChunk; |
20 | 20 | use GitElephant\Objects\Diff\DiffChunkLine; |
21 | -use GitElephant\Objects\Diff\DiffChunkLineAdded; |
|
22 | -use GitElephant\Objects\Diff\DiffChunkLineDeleted; |
|
23 | -use GitElephant\Objects\Diff\DiffChunkLineUnchanged; |
|
24 | -use GitElephant\Objects\Commit; |
|
25 | 21 | use GitElephant\Command\MainCommand; |
26 | 22 | use GitElephant\Command\DiffCommand; |
27 | -use GitElephant\Command\ShowCommand; |
|
28 | 23 | |
29 | 24 | /** |
30 | 25 | * DiffTest |