/** * @param \Prooph\Done\Story\ChapterName $chapterName * @param StoryName $storyName * @return ChapterName */ public static function isDuplicateForStory(\Prooph\Done\Story\ChapterName $chapterName, StoryName $storyName) { return new self(sprintf('Duplicate Chapter name %s for story %s detected', $chapterName->toString(), $storyName->toString())); }
/** * @param ChapterName $other * @return bool */ public function equals(ChapterName $other) { return $this->toString() === $other->toString(); }
/** * @param ChapterName $chapterName * @param StoryName $storyName * @return Story */ public static function cannotFindMatchingTemplateForChapterName(ChapterName $chapterName, StoryName $storyName) { return new self(sprintf('Story %s cannot find matching template for chapter name %s', $storyName->toString(), $chapterName->toString())); }