diff --git a/composer.lock b/composer.lock index 4cf65de..eed719e 100644 --- a/composer.lock +++ b/composer.lock @@ -8,7 +8,7 @@ "packages": [ { "name": "guzzlehttp/guzzle", - "version": "6.5.5", + "version": "6.5.8", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", diff --git a/src/GraphQL/Account.php b/src/GraphQL/Account.php index 7e78d22..0016d87 100644 --- a/src/GraphQL/Account.php +++ b/src/GraphQL/Account.php @@ -25,7 +25,7 @@ public function login(string $email, string $password): string public function details(string $token): array { $response = $this->request->execute('GET', self::THOTH_ACCOUNT_ENDPOINT, ['headers' => [ - 'Authorization' => 'Bearer' . $token + 'Authorization' => 'Bearer ' . $token ]]); return json_decode($response->getBody(), true); diff --git a/src/GraphQL/Models/Contribution.php b/src/GraphQL/Models/Contribution.php index 02b8454..75818aa 100644 --- a/src/GraphQL/Models/Contribution.php +++ b/src/GraphQL/Models/Contribution.php @@ -111,11 +111,11 @@ public function setFullName(?string $fullName): void public function getContributionOrdinal(): ?int { - return $this->getData('ContributionOrdinal'); + return $this->getData('contributionOrdinal'); } public function setContributionOrdinal(?int $ContributionOrdinal): void { - $this->setData('ContributionOrdinal', $ContributionOrdinal); + $this->setData('contributionOrdinal', $ContributionOrdinal); } } diff --git a/src/GraphQL/Models/Work.php b/src/GraphQL/Models/Work.php index a8b408a..a4dd9b4 100644 --- a/src/GraphQL/Models/Work.php +++ b/src/GraphQL/Models/Work.php @@ -98,6 +98,16 @@ public function setEdition(?int $edition): void $this->setData('edition', $edition); } + public function getImprintId(): ?string + { + return $this->getData('imprintId'); + } + + public function setImprintId(?string $imprintId): void + { + $this->setData('imprintId', $imprintId); + } + public function getDoi(): ?string { return $this->getData('doi'); diff --git a/tests/GraphQL/Models/WorkTest.php b/tests/GraphQL/Models/WorkTest.php index 905d4ae..88ee252 100644 --- a/tests/GraphQL/Models/WorkTest.php +++ b/tests/GraphQL/Models/WorkTest.php @@ -17,6 +17,7 @@ public function testGettersAndSetters(): void $subtitle = 'Neque porro quisquam est'; $reference = 'foo'; $edition = 1; + $imprintId = 'ec3aff35-11df-4bd3-8dd6-1e186ca8c165'; $doi = 'https://doi.org/10.00000/00000000'; $publicationDate = '2020-01-01'; $withdrawnDate = '2020-12-12'; @@ -56,6 +57,7 @@ public function testGettersAndSetters(): void $work->setSubtitle($subtitle); $work->setReference($reference); $work->setEdition($edition); + $work->setImprintId($imprintId); $work->setDoi($doi); $work->setPublicationDate($publicationDate); $work->setWithdrawnDate($withdrawnDate); @@ -90,6 +92,7 @@ public function testGettersAndSetters(): void $this->assertSame($subtitle, $work->getSubtitle()); $this->assertSame($reference, $work->getReference()); $this->assertSame($edition, $work->getEdition()); + $this->assertSame($imprintId, $work->getImprintId()); $this->assertSame($doi, $work->getDoi()); $this->assertSame($publicationDate, $work->getPublicationDate()); $this->assertSame($withdrawnDate, $work->getWithdrawnDate());