Code Duplication    Length = 4-4 lines in 4 locations

packages/jitm/src/class-message.php 4 locations

@@ 686-689 (lines=4) @@
683
	 * @return \stdClass The simple object
684
	 */
685
	public function render() {
686
		if ( ! is_string( $this->content['message'] ) && is_callable( $this->content['message'] ) ) {
687
			$cb                       = $this->content['message'];
688
			$this->content['message'] = $cb();
689
		}
690
691
		if ( isset( $this->content['description'] ) && ! is_string( $this->content['description'] ) && is_callable( $this->content['description'] ) ) {
692
			$cb                           = $this->content['description'];
@@ 691-694 (lines=4) @@
688
			$this->content['message'] = $cb();
689
		}
690
691
		if ( isset( $this->content['description'] ) && ! is_string( $this->content['description'] ) && is_callable( $this->content['description'] ) ) {
692
			$cb                           = $this->content['description'];
693
			$this->content['description'] = $cb();
694
		}
695
696
		if ( isset( $this->content['list'] ) ) {
697
			foreach ( $this->content['list'] as &$list ) {
@@ 704-707 (lines=4) @@
701
			}
702
		}
703
704
		if ( ! is_string( $this->cta['message'] ) && is_callable( $this->cta['message'] ) ) {
705
			$cb                   = $this->cta['message'];
706
			$this->cta['message'] = $cb();
707
		}
708
709
		if ( ! is_string( $this->cta['link'] ) && is_callable( $this->cta['link'] ) ) {
710
			$cb                = $this->cta['link'];
@@ 709-712 (lines=4) @@
706
			$this->cta['message'] = $cb();
707
		}
708
709
		if ( ! is_string( $this->cta['link'] ) && is_callable( $this->cta['link'] ) ) {
710
			$cb                = $this->cta['link'];
711
			$this->cta['link'] = $cb();
712
		}
713
714
		$obj                 = new \stdClass();
715
		$obj->content        = $this->content;