diff --git a/.gitignore b/.gitignore index 49706e86a..ce6e03611 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ vendor/ composer.lock .phpunit.result.cache -.phpcs-cache \ No newline at end of file +/.phpcs-cache +/.credentials.json diff --git a/README.md b/README.md index 0138eeda8..8393d27c9 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Forked from [php-gitlab-api](https://github.com/jeroeny/gitlab-api) and based on Installation ------------ -Via [composer](https://getcomposer.org) +Using [composer](https://getcomposer.org): ```bash composer require jeroeny/gitlab-api diff --git a/composer.json b/composer.json index e17e48c2c..c4f0d4e68 100644 --- a/composer.json +++ b/composer.json @@ -9,6 +9,10 @@ ], "license": "MIT", "authors": [ + { + "name": "Jeroen Spee", + "homepage": "https://github.com/Jeroeny" + }, { "name": "Matt Humphrey", "homepage": "http://m4tt.io" diff --git a/src/Api/Repositories.php b/src/Api/Repositories.php index 7ca060153..5317c8b1e 100644 --- a/src/Api/Repositories.php +++ b/src/Api/Repositories.php @@ -135,8 +135,6 @@ public function updateRelease(int $project_id, string $tag_name, string $descrip */ public function releases(int $project_id) { - $resolver = $this->createOptionsResolver(); - return $this->get($this->getProjectPath($project_id, 'releases')); } diff --git a/src/Model/Commit.php b/src/Model/Commit.php index 342d70e33..197d2d2f7 100644 --- a/src/Model/Commit.php +++ b/src/Model/Commit.php @@ -69,7 +69,7 @@ public static function fromArray(?Client $client, Project $project, array $data) return $commit->hydrate($data); } - public function __construct(Project $project, ?int $id = null, ?Client $client = null) + public function __construct(Project $project, ?string $id = null, ?Client $client = null) { $this->setClient($client); $this->setData('project', $project); diff --git a/src/Model/Model.php b/src/Model/Model.php index 7e4244b8d..111412393 100644 --- a/src/Model/Model.php +++ b/src/Model/Model.php @@ -100,11 +100,7 @@ public function __get(string $property) )); } - if (isset($this->data[$property])) { - return $this->data[$property]; - } - - return null; + return $this->data[$property] ?? null; } public function __isset(string $property): bool