Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/GraphQL/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/GraphQL/Models/Contribution.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
10 changes: 10 additions & 0 deletions src/GraphQL/Models/Work.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
3 changes: 3 additions & 0 deletions tests/GraphQL/Models/WorkTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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());
Expand Down
Loading