Skip to content

Commit

Permalink
Remove all knowledge of ElifeAssessment ArticleSection from ArticleVoR
Browse files Browse the repository at this point in the history
  • Loading branch information
LinaKind committed Jan 10, 2025
1 parent 400a61b commit 86ae597
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 13 deletions.
3 changes: 0 additions & 3 deletions src/Model/ArticleVoR.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ final class ArticleVoR extends ArticleVersion implements HasContent, HasImpactSt
private $decisionLetter;
private $decisionLetterDescription;
private $authorResponse;
private $elifeAssessmentArticleSection;
private $elifeAssessmentScietyUri;
private $recommendationsForAuthors;
private $recommendationsForAuthorsTitle;
Expand Down Expand Up @@ -80,7 +79,6 @@ public function __construct(
PromiseInterface $decisionLetter,
Sequence $decisionLetterDescription,
PromiseInterface $authorResponse,
ArticleSection $elifeAssessmentArticleSection = null,
string $elifeAssessmentScietyUri = null,
PromiseInterface $recommendationsForAuthors = null,
PromiseInterface $recommendationsForAuthorsTitle = null,
Expand All @@ -107,7 +105,6 @@ public function __construct(
$this->decisionLetter = $decisionLetter;
$this->decisionLetterDescription = $decisionLetterDescription;
$this->authorResponse = $authorResponse;
$this->elifeAssessmentArticleSection = $elifeAssessmentArticleSection;
$this->elifeAssessmentScietyUri = $elifeAssessmentScietyUri;
$this->recommendationsForAuthors = $recommendationsForAuthors;
$this->recommendationsForAuthorsTitle = $recommendationsForAuthorsTitle;
Expand Down
9 changes: 0 additions & 9 deletions src/Serializer/ArticleVoRNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,8 @@ protected function denormalizeArticle(

if (empty($data['elifeAssessment']) || !isset($data['elifeAssessment'])) {
$elifeAssessmentScietyUri = null;
$elifeAssessmentArticleSection = null;
} else {
$elifeAssessmentScietyUri = $data['elifeAssessment']['scietyUri'] ?? null;
$elifeAssessmentArticleSection = new ArticleSection(
new ArraySequence(array_map(function (array $block) use ($format, $context) {
return $this->denormalizer->denormalize($block, Block::class, $format, $context);
}, $data['elifeAssessment']['content'])),
$data['elifeAssessment']['doi'] ?? null,
$data['elifeAssessment']['id'] ?? null
);
$elifeAssessment = $this->denormalizer->denormalize($data['elifeAssessment'], ElifeAssessment::class, $format, $context);
}

Expand Down Expand Up @@ -305,7 +297,6 @@ protected function denormalizeArticle(
$data['decisionLetter'],
$decisionLetterDescription,
$data['authorResponse'],
$elifeAssessmentArticleSection,
$elifeAssessmentScietyUri,
$data['recommendationsForAuthors'],
$recommendationsForAuthorsTitle,
Expand Down
1 change: 0 additions & 1 deletion test/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,6 @@ private function defaultTestData()
'curationLabels' => [],
'reviewedDate' => null,
'elifeAssessment' => null,
'elifeAssessmentArticleSection' => new ArticleSection(new ArraySequence([new Paragraph('eLife Assessment')])),
'elifeAssessmentScietyUri' => 'https://elife-assessment.com',
'recommendationsForAuthors' => promise_for(new ArticleSection(new ArraySequence([new Paragraph('Recommendations For Authors')]))),
'recommendationsForAuthorsTitle' => promise_for('Recommendations for authors'),
Expand Down

0 comments on commit 86ae597

Please sign in to comment.