Skip to content

Commit

Permalink
Fixed issue #61: Replacing all occurrences of 'self' return type anno…
Browse files Browse the repository at this point in the history
…tations in GitRepository with 'static' for static methods and IGit for non-static methods.
  • Loading branch information
JohanFredrikVaren committed Feb 15, 2021
1 parent db664a8 commit cb3bfc6
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions src/GitRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function getRepositoryPath()
* @param string
* @param array|NULL
* @throws GitException
* @return self
* @return IGit
*/
public function createTag($name, $options = NULL)
{
Expand All @@ -67,7 +67,7 @@ public function createTag($name, $options = NULL)
* `git tag -d <name>`
* @param string
* @throws GitException
* @return self
* @return IGit
*/
public function removeTag($name)
{
Expand All @@ -86,7 +86,7 @@ public function removeTag($name)
* @param string
* @param string
* @throws GitException
* @return self
* @return IGit
*/
public function renameTag($oldName, $newName)
{
Expand Down Expand Up @@ -117,7 +117,7 @@ public function getTags()
* @param string
* @param array|NULL
* @throws GitException
* @return self
* @return IGit
*/
public function merge($branch, $options = NULL)
{
Expand All @@ -134,7 +134,7 @@ public function merge($branch, $options = NULL)
* @param string
* @param bool
* @throws GitException
* @return self
* @return IGit
*/
public function createBranch($name, $checkout = FALSE)
{
Expand All @@ -157,7 +157,7 @@ public function createBranch($name, $checkout = FALSE)
* `git branch -d <name>`
* @param string
* @throws GitException
* @return self
* @return IGit
*/
public function removeBranch($name)
{
Expand Down Expand Up @@ -242,7 +242,7 @@ public function getLocalBranches()
* `git checkout <branch>`
* @param string
* @throws GitException
* @return self
* @return IGit
*/
public function checkout($name)
{
Expand All @@ -257,7 +257,7 @@ public function checkout($name)
* `git rm <file>`
* @param string|string[]
* @throws GitException
* @return self
* @return IGit
*/
public function removeFile($file)
{
Expand All @@ -282,7 +282,7 @@ public function removeFile($file)
* `git add <file>`
* @param string|string[]
* @throws GitException
* @return self
* @return IGit
*/
public function addFile($file)
{
Expand Down Expand Up @@ -314,7 +314,7 @@ public function addFile($file)
* Adds all created, modified & removed files.
* `git add --all`
* @throws GitException
* @return self
* @return IGit
*/
public function addAllChanges()
{
Expand All @@ -330,7 +330,7 @@ public function addAllChanges()
* @param string|string[] from: array('from' => 'to', ...) || (from, to)
* @param string|NULL
* @throws GitException
* @return self
* @return IGit
*/
public function renameFile($file, $to = NULL)
{
Expand Down Expand Up @@ -358,7 +358,7 @@ public function renameFile($file, $to = NULL)
* @param string
* @param string[] param => value
* @throws GitException
* @return self
* @return IGit
*/
public function commit($message, $params = NULL)
{
Expand Down Expand Up @@ -425,7 +425,7 @@ public function isChanges()
* Pull changes from a remote
* @param string|NULL
* @param array|NULL
* @return self
* @return IGit
* @throws GitException
*/
public function pull($remote = NULL, array $params = NULL)
Expand All @@ -445,7 +445,7 @@ public function pull($remote = NULL, array $params = NULL)
* Push changes to a remote
* @param string|NULL
* @param array|NULL
* @return self
* @return IGit
* @throws GitException
*/
public function push($remote = NULL, array $params = NULL)
Expand All @@ -465,7 +465,7 @@ public function push($remote = NULL, array $params = NULL)
* Run fetch command to get latest branches
* @param string|NULL
* @param array|NULL
* @return self
* @return IGit
* @throws GitException
*/
public function fetch($remote = NULL, array $params = NULL)
Expand All @@ -486,7 +486,7 @@ public function fetch($remote = NULL, array $params = NULL)
* @param string
* @param string
* @param array|NULL
* @return self
* @return IGit
* @throws GitException
*/
public function addRemote($name, $url, array $params = NULL)
Expand All @@ -501,7 +501,7 @@ public function addRemote($name, $url, array $params = NULL)
* Renames remote repository
* @param string
* @param string
* @return self
* @return IGit
* @throws GitException
*/
public function renameRemote($oldName, $newName)
Expand All @@ -515,7 +515,7 @@ public function renameRemote($oldName, $newName)
/**
* Removes remote repository
* @param string
* @return self
* @return IGit
* @throws GitException
*/
public function removeRemote($name)
Expand All @@ -531,7 +531,7 @@ public function removeRemote($name)
* @param string
* @param string
* @param array|NULL
* @return self
* @return IGit
* @throws GitException
*/
public function setRemoteUrl($name, $url, array $params = NULL)
Expand Down Expand Up @@ -570,7 +570,7 @@ public function execute($cmd)


/**
* @return self
* @return IGit
*/
protected function begin()
{
Expand All @@ -585,7 +585,7 @@ protected function begin()


/**
* @return self
* @return IGit
*/
protected function end()
{
Expand Down Expand Up @@ -650,7 +650,7 @@ protected function extractFromCommand($cmd, $filter = NULL)
/**
* Runs command.
* @param string|array
* @return self
* @return IGit
* @throws GitException
*/
protected function run($cmd/*, $options = NULL*/)
Expand Down Expand Up @@ -704,7 +704,7 @@ protected static function processCommand(array $args)
* Init repo in directory
* @param string
* @param array|NULL
* @return self
* @return static
* @throws GitException
*/
public static function init($directory, array $params = NULL)
Expand Down Expand Up @@ -744,7 +744,7 @@ public static function init($directory, array $params = NULL)
* @param string
* @param string|NULL
* @param array|NULL
* @return self
* @return static
* @throws GitException
*/
public static function cloneRepository($url, $directory = NULL, array $params = NULL)
Expand Down

0 comments on commit cb3bfc6

Please sign in to comment.