diff --git a/src/ncc/Managers/RepositoryManager.php b/src/ncc/Managers/RepositoryManager.php index d70e4cb..e3a7558 100644 --- a/src/ncc/Managers/RepositoryManager.php +++ b/src/ncc/Managers/RepositoryManager.php @@ -119,7 +119,7 @@ throw new InvalidArgumentException(sprintf('The remote source \'%s\' already exists', $source->getName())); } - Console::outVerbose(sprintf('Adding repository \'%s\' as %s (type: %s)', $source->getHost(), $source->getName(), $source->getType())); + Console::outVerbose(sprintf('Adding repository \'%s\' as %s (type: %s)', $source->getHost(), $source->getName(), $source->getType()->value)); $this->repositories[] = $source; if($update) diff --git a/src/ncc/Objects/ProjectConfiguration/UpdateSource.php b/src/ncc/Objects/ProjectConfiguration/UpdateSource.php index db8e64d..ddb222c 100644 --- a/src/ncc/Objects/ProjectConfiguration/UpdateSource.php +++ b/src/ncc/Objects/ProjectConfiguration/UpdateSource.php @@ -116,7 +116,6 @@ $repository = Repository::fromArray($repository); } - return new self($source, $repository); } } \ No newline at end of file diff --git a/src/ncc/Objects/RepositoryConfiguration.php b/src/ncc/Objects/RepositoryConfiguration.php index d74d46d..313df4b 100644 --- a/src/ncc/Objects/RepositoryConfiguration.php +++ b/src/ncc/Objects/RepositoryConfiguration.php @@ -224,7 +224,7 @@ { return [ ($bytecode ? Functions::cbc('name') : 'name') => $this->name, - ($bytecode ? Functions::cbc('type') : 'type') => ($this->type ? null : $this->type->value), + ($bytecode ? Functions::cbc('type') : 'type') => ($this->type?->value), ($bytecode ? Functions::cbc('host') : 'host') => $this->host, ($bytecode ? Functions::cbc('ssl') : 'ssl') => $this->ssl ];