Code Duplication    Length = 16-16 lines in 2 locations

classes/fields/pick.php 2 locations

@@ 642-657 (lines=16) @@
639
     * @return array Simple object names
640
     * @since 2.3
641
     */
642
    public function simple_objects () {
643
		if ( $this->setup_related_objects() || null === self::$names_simple ) {
644
			$simple_objects = array();
645
646
			foreach ( self::$related_objects as $object => $related_object ) {
647
				if ( !isset( $related_object[ 'simple' ] ) || !$related_object[ 'simple' ] )
648
					continue;
649
650
				$simple_objects[] = $object;
651
			}
652
653
			self::$names_simple = (array) apply_filters( 'pods_form_ui_field_pick_simple_objects', $simple_objects );
654
		}
655
656
	    return self::$names_simple;
657
    }
658
659
    /**
660
     * Return available bidirectional object names
@@ 665-680 (lines=16) @@
662
     * @return array Bidirectional object names
663
     * @since 2.3.4
664
     */
665
    public function bidirectional_objects () {
666
        if ( $this->setup_related_objects() || null === self::$names_bidirectional ) {
667
	        $bidirectional_objects = array();
668
669
	        foreach ( self::$related_objects as $object => $related_object ) {
670
		        if ( !isset( $related_object[ 'bidirectional' ] ) || !$related_object[ 'bidirectional' ] )
671
			        continue;
672
673
		        $bidirectional_objects[] = $object;
674
	        }
675
676
	        self::$names_bidirectional = (array) apply_filters( 'pods_form_ui_field_pick_bidirectional_objects', $bidirectional_objects );
677
        }
678
679
	    return self::$names_bidirectional;
680
    }
681
682
    /**
683
     * Define the current field's schema for DB table storage