Code Duplication    Length = 16-16 lines in 2 locations

classes/fields/pick.php 2 locations

@@ 592-607 (lines=16) @@
589
     * @return array Simple object names
590
     * @since 2.3
591
     */
592
    public function simple_objects () {
593
		if ( $this->setup_related_objects() || null === self::$names_simple ) {
594
			$simple_objects = array();
595
596
			foreach ( self::$related_objects as $object => $related_object ) {
597
				if ( !isset( $related_object[ 'simple' ] ) || !$related_object[ 'simple' ] )
598
					continue;
599
600
				$simple_objects[] = $object;
601
			}
602
603
			self::$names_simple = (array) apply_filters( 'pods_form_ui_field_pick_simple_objects', $simple_objects );
604
		}
605
606
	    return self::$names_simple;
607
    }
608
609
    /**
610
     * Return available bidirectional object names
@@ 615-630 (lines=16) @@
612
     * @return array Bidirectional object names
613
     * @since 2.3.4
614
     */
615
    public function bidirectional_objects () {
616
        if ( $this->setup_related_objects() || null === self::$names_bidirectional ) {
617
	        $bidirectional_objects = array();
618
619
	        foreach ( self::$related_objects as $object => $related_object ) {
620
		        if ( !isset( $related_object[ 'bidirectional' ] ) || !$related_object[ 'bidirectional' ] )
621
			        continue;
622
623
		        $bidirectional_objects[] = $object;
624
	        }
625
626
	        self::$names_bidirectional = (array) apply_filters( 'pods_form_ui_field_pick_bidirectional_objects', $bidirectional_objects );
627
        }
628
629
	    return self::$names_bidirectional;
630
    }
631
632
    /**
633
     * Define the current field's schema for DB table storage