Completed
Pull Request — develop (#155)
by
unknown
02:38
created
src/GitElephant/Objects/Diff/Diff.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      *
56 56
      * @param \GitElephant\Repository                 $repository repository
57 57
      * @param null|string|\GitElephant\Objects\Commit $commit1    first commit
58
-     * @param null|string|\GitElephant\Objects\Commit $commit2    second commit
58
+     * @param null|string $commit2    second commit
59 59
      * @param null|string                             $path       path to consider
60 60
      *
61 61
      * @throws \RuntimeException
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
      *
91 91
      * @param null $commit1 commit 1
92 92
      * @param null $commit2 commit 2
93
-     * @param null $path    path
93
+     * @param null|string $path    path
94 94
      *
95 95
      * @throws \RuntimeException
96 96
      * @throws \Symfony\Component\Process\Exception\InvalidArgumentException
Please login to merge, or discard this patch.
src/GitElephant/Objects/LogRange.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      * @param string                  $refEnd      ending reference
55 55
      * @param null                    $path        path
56 56
      * @param int                     $limit       limit
57
-     * @param null                    $offset      offset
57
+     * @param null|integer                    $offset      offset
58 58
      * @param boolean                 $firstParent first parent
59 59
      *
60 60
      * @throws \RuntimeException
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
      * @param string  $refEnd      treeish reference
82 82
      * @param string  $path        path
83 83
      * @param int     $limit       limit
84
-     * @param string  $offset      offset
84
+     * @param integer  $offset      offset
85 85
      * @param boolean $firstParent first parent
86 86
      *
87 87
      * @throws \RuntimeException
Please login to merge, or discard this patch.
src/GitElephant/Status/Status.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@
 block discarded – undo
165 165
     /**
166 166
      * @param string $line
167 167
      *
168
-     * @return mixed
168
+     * @return string[]
169 169
      */
170 170
     protected function splitStatusLine(string $line)
171 171
     {
Please login to merge, or discard this patch.
src/GitElephant/Repository.php 1 patch
Doc Comments   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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)
@@ -597,7 +597,7 @@  discard block
 block discarded – undo
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
@@ -820,7 +820,7 @@  discard block
 block discarded – undo
820 820
      *
821 821
      * @param string|TreeishInterface|array $ref         the treeish to check, as a string, as an object or as an array
822 822
      * @param string|NodeObject             $path        the physical path to the tree relative to the repository root
823
-     * @param int|null                      $limit       limit to n entries
823
+     * @param integer                      $limit       limit to n entries
824 824
      * @param int|null                      $offset      skip n entries
825 825
      * @param boolean|false                 $firstParent skip commits brought in to branch by a merge
826 826
      *
@@ -842,7 +842,7 @@  discard block
 block discarded – undo
842 842
      * @param string            $refStart
843 843
      * @param string            $refEnd
844 844
      * @param string|NodeObject $path        the physical path to the tree relative to the repository root
845
-     * @param int|null          $limit       limit to n entries
845
+     * @param integer          $limit       limit to n entries
846 846
      * @param int|null          $offset      skip n entries
847 847
      * @param boolean|false     $firstParent skip commits brought in to branch by a merge
848 848
      *
@@ -873,7 +873,7 @@  discard block
 block discarded – undo
873 873
      * Get a log for an object
874 874
      *
875 875
      * @param \GitElephant\Objects\NodeObject         $obj    The Object instance
876
-     * @param null|string|\GitElephant\Objects\Branch $branch The branch to read from
876
+     * @param string|null $branch The branch to read from
877 877
      * @param int                                     $limit  Limit to n entries
878 878
      * @param int|null                                $offset Skip n entries
879 879
      *
@@ -943,9 +943,9 @@  discard block
 block discarded – undo
943 943
     /**
944 944
      * Get a Diff object for a commit with its parent, by default the diff is between the current head and its parent
945 945
      *
946
-     * @param \GitElephant\Objects\Commit|string      $commit1 A TreeishInterface instance
947
-     * @param \GitElephant\Objects\Commit|string|null $commit2 A TreeishInterface instance
948
-     * @param null|string|NodeObject                  $path    The path to get the diff for or a Object instance
946
+     * @param string      $commit1 A TreeishInterface instance
947
+     * @param null|string $commit2 A TreeishInterface instance
948
+     * @param null|string                  $path    The path to get the diff for or a Object instance
949 949
      *
950 950
      * @throws \RuntimeException
951 951
      * @throws \InvalidArgumentException
@@ -960,7 +960,7 @@  discard block
 block discarded – undo
960 960
      * Clone a repository
961 961
      *
962 962
      * @param string      $url           the repository url (i.e. git://github.com/matteosister/GitElephant.git)
963
-     * @param null        $to            where to clone the repo
963
+     * @param null|string        $to            where to clone the repo
964 964
      * @param string|null $repoReference Repo reference to clone. Required if performing a shallow clone.
965 965
      * @param int|null    $depth         Depth to clone repo. Specify 1 to perform a shallow clone
966 966
      * @param bool        $recursive     Whether to recursively clone child repos.
@@ -1104,7 +1104,7 @@  discard block
 block discarded – undo
1104 1104
      * output a node content as an array of lines
1105 1105
      *
1106 1106
      * @param \GitElephant\Objects\NodeObject              $obj     The Object of type BLOB
1107
-     * @param \GitElephant\Objects\TreeishInterface|string $treeish A treeish object
1107
+     * @param null|Branch $treeish A treeish object
1108 1108
      *
1109 1109
      * @throws \RuntimeException
1110 1110
      * @throws \Symfony\Component\Process\Exception\LogicException
Please login to merge, or discard this patch.
tests/GitElephant/TestCase.php 1 patch
Doc Comments   +17 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     protected $finder;
50 50
 
51 51
     /**
52
-     * @param null $name
52
+     * @param integer $name
53 53
      *
54 54
      * @return \GitElephant\Repository
55 55
      */
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
     /**
121 121
      * @param string      $name       file name
122 122
      * @param string|null $folder     folder name
123
-     * @param null        $content    content
123
+     * @param string|null        $content    content
124 124
      * @param Repository  $repository repository to add file to
125 125
      *
126 126
      * @return void
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
     }
202 202
 
203 203
     /**
204
-     * @param $classname
204
+     * @param string $classname
205 205
      *
206 206
      * @return \PHPUnit\Framework\MockObject\MockObject
207 207
      */
@@ -250,6 +250,9 @@  discard block
 block discarded – undo
250 250
             ->will($this->returnValue($this->getMockCommand()));
251 251
     }
252 252
 
253
+    /**
254
+     * @param string[] $output
255
+     */
253 256
     protected function addOutputToMockRepo(\PHPUnit\Framework\MockObject\MockObject $repo, $output)
254 257
     {
255 258
         $repo
@@ -281,6 +284,17 @@  discard block
 block discarded – undo
281 284
         );
282 285
     }
283 286
 
287
+    /**
288
+     * @param string $sha
289
+     * @param string $tree
290
+     * @param string $author
291
+     * @param string $committer
292
+     * @param string $emailAuthor
293
+     * @param string $emailCommitter
294
+     * @param string $datetimeAuthor
295
+     * @param string $datetimeCommitter
296
+     * @param string $message
297
+     */
284 298
     protected function doCommitTest(
285 299
         Commit $commit,
286 300
         $sha,
Please login to merge, or discard this patch.
src/GitElephant/Objects/Diff/DiffChunk.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
     /**
79 79
      * Class constructor
80 80
      *
81
-     * @param array $lines output lines from git binary
81
+     * @param string $lines output lines from git binary
82 82
      *
83 83
      * @throws \Exception
84 84
      */
Please login to merge, or discard this patch.
src/GitElephant/Objects/Diff/DiffObject.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
114 114
     /**
115 115
      * toString magic method
116 116
      *
117
-     * @return mixed
117
+     * @return string
118 118
      */
119 119
     public function __toString()
120 120
     {
Please login to merge, or discard this patch.
src/GitElephant/Objects/Log.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@
 block discarded – undo
95 95
      * @param string  $ref         treeish reference
96 96
      * @param string  $path        path
97 97
      * @param int     $limit       limit
98
-     * @param string  $offset      offset
98
+     * @param integer  $offset      offset
99 99
      * @param boolean $firstParent first parent
100 100
      *
101 101
      * @throws \RuntimeException
Please login to merge, or discard this patch.
src/GitElephant/Command/Caller/Caller.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,8 +70,8 @@
 block discarded – undo
70 70
      *
71 71
      * @param string $cmd               the command to execute
72 72
      * @param bool   $git               if the command is git or a generic command
73
-     * @param null   $cwd               the directory where the command must be executed
74
-     * @param array  $acceptedExitCodes exit codes accepted to consider the command execution successful
73
+     * @param string|null   $cwd               the directory where the command must be executed
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
Please login to merge, or discard this patch.