Skip to content

Commit ee3cc60

Browse files
authored
Merge pull request #3 from cybercog/fix/repository-class
Fix return types & fix package typo
2 parents 6b14230 + 3e48ba3 commit ee3cc60

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Json/Repository.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function __construct(array $data = [])
4545
$this->url = (array_key_exists('url', $data) ? $data['url'] : '');
4646
$this->options = (array_key_exists('options', $data) ? $data['options'] : []);
4747

48-
$this->package = (array_key_exists('package', $data) ? new ComposerJson($data['pacakge']) : null);
48+
$this->package = (array_key_exists('package', $data) ? new ComposerJson($data['package']) : null);
4949
}
5050

5151
/**
@@ -70,7 +70,7 @@ public function getUrl() : string
7070
* Gets the additional options of the repository.
7171
* @return array
7272
*/
73-
public function getOptions() : string
73+
public function getOptions() : array
7474
{
7575
return $this->options;
7676
}
@@ -79,7 +79,7 @@ public function getOptions() : string
7979
* Gets the parsed "package" key of the repository.
8080
* @return ComposerJson|null
8181
*/
82-
public function getPackage() : ComposerJson
82+
public function getPackage() : ?ComposerJson
8383
{
8484
return $this->package;
8585
}

0 commit comments

Comments
 (0)