result = $result; $this->post_id = $post_id; $this->message = $message; } /** * The story was understood and deliberately not imported; Kordiam should not retry. * * @return self The outcome. */ public static function skipped(): self { return new self( ImportResult::SKIPPED ); } /** * The story could not be turned into a post. * * @param string $message Explanation for Kordiam. * * @return self The outcome. */ public static function rejected( string $message = '' ): self { return new self( ImportResult::REJECTED, 0, $message ); } /** * The story was valid but WordPress refused to store it. * * @param string $message Explanation for Kordiam. * * @return self The outcome. */ public static function failed( string $message ): self { return new self( ImportResult::FAILED, 0, $message ); } /** * The story was imported. * * @param int $post_id Post the story landed on. * * @return self The outcome. */ public static function succeeded( int $post_id ): self { return new self( ImportResult::SUCCEEDED, $post_id ); } /** * The story's post was taken out of circulation because the story is gone. * * @param int $post_id Post that was retired. * * @return self The outcome. */ public static function removed( int $post_id ): self { return new self( ImportResult::REMOVED, $post_id ); } }