Skip to content

Commit

Permalink
Remove obsolete getter
Browse files Browse the repository at this point in the history
LinaKind committed Jan 10, 2025
1 parent cb9bd20 commit a7a04c3
Showing 3 changed files with 4 additions and 27 deletions.
8 changes: 0 additions & 8 deletions src/Model/ArticleVoR.php
Original file line number Diff line number Diff line change
@@ -226,14 +226,6 @@ public function getAuthorResponse()
return $this->authorResponse->wait();
}

/**
* @return ArticleSection|null
*/
public function getElifeAssessmentArticleSection()
{
return $this->elifeAssessmentArticleSection;
}

/**
* @return string|null
*/
7 changes: 4 additions & 3 deletions src/Serializer/ArticleVoRNormalizer.php
Original file line number Diff line number Diff line change
@@ -458,7 +458,8 @@ protected function normalizeArticle(
'title' => $article->getElifeAssessment()->getTitle(),
];
$data['elifeAssessment']['content'] = $article
->getElifeAssessmentArticleSection()
->getElifeAssessment()
->getArticleSection()
->getContent()
->map(function (Block $block) use ($format, $context) {
return $this->normalizer->normalize($block, $format, $context);
@@ -469,8 +470,8 @@ protected function normalizeArticle(
$data['elifeAssessment']['scietyUri'] = $article->getElifeAssessmentScietyUri();
}

$data['elifeAssessment']['doi'] = $article->getElifeAssessmentArticleSection()->getDoi();
$data['elifeAssessment']['id'] = $article->getElifeAssessmentArticleSection()->getId();
$data['elifeAssessment']['doi'] = $article->getElifeAssessment()->getArticleSection()->getDoi();
$data['elifeAssessment']['id'] = $article->getElifeAssessment()->getArticleSection()->getId();

if ($article->getElifeAssessment()->getSignificance() !== null) {
$data['elifeAssessment']['significance'] = $article->getElifeAssessment()->getSignificance();
16 changes: 0 additions & 16 deletions test/Model/ArticleVoRTest.php
Original file line number Diff line number Diff line change
@@ -322,22 +322,6 @@ public function it_may_have_an_elife_assessment()
$this->assertNull($withOut->getElifeAssessment());
}

/**
* @test
*/
public function it_may_have_an_elife_assessment_article_section()
{
$with = $this->builder
->withElifeAssessmentArticleSection($elifeAssessment = new ArticleSection(new ArraySequence([new Paragraph('eLife assessment')])))
->__invoke();
$withOut = $this->builder
->withElifeAssessmentArticleSection(null)
->__invoke();

$this->assertEquals($elifeAssessment, $with->getElifeAssessmentArticleSection());
$this->assertNull($withOut->getElifeAssessmentArticleSection());
}

/**
* @test
*/

0 comments on commit a7a04c3

Please sign in to comment.