Skip to content

Commit

Permalink
Remove slug from constructor (#330)
Browse files Browse the repository at this point in the history
  • Loading branch information
eiriksm committed Mar 26, 2024
1 parent 7f26f79 commit b7588f3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
8 changes: 1 addition & 7 deletions src/CosyComposer.php
Original file line number Diff line number Diff line change
Expand Up @@ -351,14 +351,8 @@ public function setProviderFactory(ProviderFactory $providerFactory)
/**
* CosyComposer constructor.
*/
public function __construct($slug, CommandExecuter $executer)
public function __construct(CommandExecuter $executer)
{
if ($slug) {
// @todo: Move to create from URL.
$this->slug = new Slug();
$this->slug->setProvider('github.com');
$this->slug->setSlug($slug);
}
$tmpdir = uniqid();
$this->tmpDir = sprintf('/tmp/%s', $tmpdir);
$this->messageFactory = new ViolinistMessages();
Expand Down
3 changes: 2 additions & 1 deletion test/GetCosyTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ trait GetCosyTrait
protected function getMockCosy($dir = null)
{
$executer = $this->createMock(CommandExecuter::class);
$c = new CosyComposer('a/b', $executer);
$c = new CosyComposer($executer);
$c->setUrl('https://github.com/a/b');
$p = new ProjectData();
$p->setNid(123);
$c->setProject($p);
Expand Down

0 comments on commit b7588f3

Please sign in to comment.