Code Duplication    Length = 16-16 lines in 2 locations

classes/fields/pick.php 2 locations

@@ 606-621 (lines=16) @@
603
     * @return array Simple object names
604
     * @since 2.3
605
     */
606
    public function simple_objects () {
607
		if ( $this->setup_related_objects() || null === self::$names_simple ) {
608
			$simple_objects = array();
609
610
			foreach ( self::$related_objects as $object => $related_object ) {
611
				if ( !isset( $related_object[ 'simple' ] ) || !$related_object[ 'simple' ] )
612
					continue;
613
614
				$simple_objects[] = $object;
615
			}
616
617
			self::$names_simple = (array) apply_filters( 'pods_form_ui_field_pick_simple_objects', $simple_objects );
618
		}
619
620
	    return self::$names_simple;
621
    }
622
623
    /**
624
     * Return available bidirectional object names
@@ 629-644 (lines=16) @@
626
     * @return array Bidirectional object names
627
     * @since 2.3.4
628
     */
629
    public function bidirectional_objects () {
630
        if ( $this->setup_related_objects() || null === self::$names_bidirectional ) {
631
	        $bidirectional_objects = array();
632
633
	        foreach ( self::$related_objects as $object => $related_object ) {
634
		        if ( !isset( $related_object[ 'bidirectional' ] ) || !$related_object[ 'bidirectional' ] )
635
			        continue;
636
637
		        $bidirectional_objects[] = $object;
638
	        }
639
640
	        self::$names_bidirectional = (array) apply_filters( 'pods_form_ui_field_pick_bidirectional_objects', $bidirectional_objects );
641
        }
642
643
	    return self::$names_bidirectional;
644
    }
645
646
    /**
647
     * Define the current field's schema for DB table storage