@@ -87,6 +87,7 @@ discard block |
||
| 87 | 87 | * @param string repository path |
| 88 | 88 | * @param bool create if not exists? |
| 89 | 89 | * @param bool initialize new Git repo if not exists? |
| 90 | + * @param string $repositoryPath |
|
| 90 | 91 | * @return void |
| 91 | 92 | */ |
| 92 | 93 | public function set_repositoryPath($repositoryPath, $create_new = false, $_init = true) |
@@ -192,6 +193,7 @@ discard block |
||
| 192 | 193 | * |
| 193 | 194 | * @access protected |
| 194 | 195 | * @param string command to run |
| 196 | + * @param string $command |
|
| 195 | 197 | * @return string |
| 196 | 198 | */ |
| 197 | 199 | protected function run_command($command) |
@@ -342,6 +344,7 @@ discard block |
||
| 342 | 344 | * |
| 343 | 345 | * @access public |
| 344 | 346 | * @param string source directory |
| 347 | + * @param string $source |
|
| 345 | 348 | * @return string |
| 346 | 349 | */ |
| 347 | 350 | public function clone_from($source) |
@@ -358,6 +361,7 @@ discard block |
||
| 358 | 361 | * @access public |
| 359 | 362 | * @param string source url |
| 360 | 363 | * @param string reference path |
| 364 | + * @param string $source |
|
| 361 | 365 | * @return string |
| 362 | 366 | */ |
| 363 | 367 | public function clone_remote($source, $reference) |
@@ -413,7 +417,7 @@ discard block |
||
| 413 | 417 | * |
| 414 | 418 | * @access public |
| 415 | 419 | * @param bool keep asterisk mark on active branch |
| 416 | - * @return array |
|
| 420 | + * @return string[] |
|
| 417 | 421 | */ |
| 418 | 422 | public function list_branches($keep_asterisk = false) |
| 419 | 423 | { |
@@ -44,6 +44,7 @@ |
||
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | /** |
| 47 | + * @param null|string $rawDiff |
|
| 47 | 48 | * @return Diff |
| 48 | 49 | */ |
| 49 | 50 | public static function parse($rawDiff) |
@@ -634,6 +634,7 @@ |
||
| 634 | 634 | /** |
| 635 | 635 | * @param string |
| 636 | 636 | * @param callback|NULL |
| 637 | + * @param string $cmd |
|
| 637 | 638 | * @return string[]|NULL |
| 638 | 639 | * @throws GitException |
| 639 | 640 | */ |
@@ -120,6 +120,9 @@ |
||
| 120 | 120 | unlink($this->getPath($name)); |
| 121 | 121 | } |
| 122 | 122 | |
| 123 | + /** |
|
| 124 | + * @param string $name |
|
| 125 | + */ |
|
| 123 | 126 | protected function getPath($name) |
| 124 | 127 | { |
| 125 | 128 | return $this->repository->getGitDir().'/hooks/'.$name; |
@@ -76,7 +76,7 @@ |
||
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | /** |
| 79 | - * @return Diff |
|
| 79 | + * @return Diff\Diff |
|
| 80 | 80 | */ |
| 81 | 81 | public function getDiff() |
| 82 | 82 | { |
@@ -11,9 +11,9 @@ |
||
| 11 | 11 | */ |
| 12 | 12 | namespace Fabrica\Tools\Programs\Git; |
| 13 | 13 | |
| 14 | +use Fabrica\Tools\Programs\Git\Util\StringHelper; |
|
| 14 | 15 | use Pedreiro\Exceptions\ProcessException; |
| 15 | 16 | use Pedreiro\Exceptions\ReferenceNotFoundException; |
| 16 | -use Fabrica\Tools\Programs\Git\Util\StringHelper; |
|
| 17 | 17 | |
| 18 | 18 | /** |
| 19 | 19 | * @author Alexandre Salomé <[email protected]> |
@@ -147,6 +147,7 @@ |
||
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | /** |
| 150 | + * @param string $reference |
|
| 150 | 151 | * @return bool |
| 151 | 152 | */ |
| 152 | 153 | protected function isZero($reference) |
@@ -38,6 +38,9 @@ |
||
| 38 | 38 | $this->repository->getReferences()->delete($this->getFullname()); |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | + /** |
|
| 42 | + * @return string |
|
| 43 | + */ |
|
| 41 | 44 | public function getCommitHash() |
| 42 | 45 | { |
| 43 | 46 | if (null !== $this->commitHash) { |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | /** |
| 64 | 64 | * Constructor. |
| 65 | 65 | * |
| 66 | - * @param Fabrica\Tools\Programs\Git\Repository $repository The repository |
|
| 66 | + * @param Repository $repository The repository |
|
| 67 | 67 | */ |
| 68 | 68 | public function __construct($repository) |
| 69 | 69 | { |
@@ -91,6 +91,9 @@ discard block |
||
| 91 | 91 | return $this->references[$fullname]; |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | + /** |
|
| 95 | + * @param string $fullname |
|
| 96 | + */ |
|
| 94 | 97 | public function has($fullname) |
| 95 | 98 | { |
| 96 | 99 | $this->initialize(); |
@@ -124,6 +127,9 @@ discard block |
||
| 124 | 127 | return $this->update($tag); |
| 125 | 128 | } |
| 126 | 129 | |
| 130 | + /** |
|
| 131 | + * @param string $fullname |
|
| 132 | + */ |
|
| 127 | 133 | public function delete($fullname) |
| 128 | 134 | { |
| 129 | 135 | $this->repository->run('update-ref', array('-d', $fullname)); |
@@ -138,6 +144,9 @@ discard block |
||
| 138 | 144 | return count($this->branches) > 0; |
| 139 | 145 | } |
| 140 | 146 | |
| 147 | + /** |
|
| 148 | + * @param string $name |
|
| 149 | + */ |
|
| 141 | 150 | public function hasBranch($name) |
| 142 | 151 | { |
| 143 | 152 | return $this->has('refs/heads/'.$name); |
@@ -204,6 +213,7 @@ discard block |
||
| 204 | 213 | } |
| 205 | 214 | |
| 206 | 215 | /** |
| 216 | + * @param Commit $hash |
|
| 207 | 217 | * @return array An array of references |
| 208 | 218 | */ |
| 209 | 219 | public function resolve($hash) |
@@ -11,11 +11,11 @@ |
||
| 11 | 11 | */ |
| 12 | 12 | namespace Fabrica\Tools\Programs\Git; |
| 13 | 13 | |
| 14 | -use Pedreiro\Exceptions\ReferenceNotFoundException; |
|
| 15 | -use Pedreiro\Exceptions\RuntimeException; |
|
| 16 | 14 | use Fabrica\Tools\Programs\Git\Reference\Branch; |
| 17 | 15 | use Fabrica\Tools\Programs\Git\Reference\Stash; |
| 18 | 16 | use Fabrica\Tools\Programs\Git\Reference\Tag; |
| 17 | +use Pedreiro\Exceptions\ReferenceNotFoundException; |
|
| 18 | +use Pedreiro\Exceptions\RuntimeException; |
|
| 19 | 19 | |
| 20 | 20 | /** |
| 21 | 21 | * Reference set associated to a repository. |
@@ -394,6 +394,7 @@ discard block |
||
| 394 | 394 | } |
| 395 | 395 | |
| 396 | 396 | /** |
| 397 | + * @param null|RevisionList $revisions |
|
| 397 | 398 | * @return Diff |
| 398 | 399 | */ |
| 399 | 400 | public function getDiff($revisions) |
@@ -413,7 +414,7 @@ discard block |
||
| 413 | 414 | /** |
| 414 | 415 | * Returns the size of repository, in kilobytes. |
| 415 | 416 | * |
| 416 | - * @return int A sum, in kilobytes |
|
| 417 | + * @return null|string A sum, in kilobytes |
|
| 417 | 418 | * |
| 418 | 419 | * @throws RuntimeException An error occurred while computing size |
| 419 | 420 | */ |
@@ -612,6 +613,7 @@ discard block |
||
| 612 | 613 | * run method ensures logging and debug. |
| 613 | 614 | * |
| 614 | 615 | * @see self::run |
| 616 | + * @param string $command |
|
| 615 | 617 | */ |
| 616 | 618 | private function getProcess($command, $args = array()) |
| 617 | 619 | { |