Example #1
0
 /**
  * @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()));
 }
Example #2
0
 /**
  * @param ChapterName $other
  * @return bool
  */
 public function equals(ChapterName $other)
 {
     return $this->toString() === $other->toString();
 }
Example #3
0
 /**
  * @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()));
 }