Skip to content

Commit

Permalink
Added method to find repository without creating it
Browse files Browse the repository at this point in the history
  • Loading branch information
thelfensdrfer authored Mar 29, 2017
1 parent aaa08ea commit a0d49dd
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,20 @@ public function createOrFindRepository($name)
return $this->_repositories[$name];
}

/**
* Find repository.
*
* @param string $name
* @return Repository|null
*/
public function findRepository($name)
{
if (isset($this->_repositories[$name]))
return $this->_repositories[$name];

return null;
}

/**
* Delete repository.
*
Expand Down Expand Up @@ -359,6 +373,11 @@ protected function parseLine($line, $i)
}
}

/**
* Generate config contents based on currently stored settings.
*
* @return string
*/
protected function generateConfig()
{
$config = '';
Expand Down

0 comments on commit a0d49dd

Please sign in to comment.