Code Duplication    Length = 28-28 lines in 2 locations

classes/PodsUI.php 2 locations

@@ 4220-4247 (lines=28) @@
4217
4218
                        $value = null;
4219
4220
                        if ( is_object( $this->pod ) )
4221
                            $value = $this->pod->field( $the_match, true );
4222
                        else {
4223
                            if ( empty( $row ) )
4224
                                $row = $this->row;
4225
4226
                            if ( isset( $row[ $the_match ] ) ) {
4227
                                if ( is_array( $row[ $the_match ] ) ) {
4228
                                    if ( false !== strpos( $the_match, '.' ) ) {
4229
                                        $the_matches = explode( '.', $the_match );
4230
4231
                                        $value = $row[ $the_match ];
4232
4233
                                        foreach ( $the_matches as $m ) {
4234
                                            if ( is_array( $value ) && isset( $value[ $m ] ) )
4235
                                                $value = $value[ $m ];
4236
                                            else {
4237
                                                $value = null;
4238
4239
                                                break;
4240
                                            }
4241
                                        }
4242
                                    }
4243
                                }
4244
                                else
4245
                                    $value = $row[ $the_match ];
4246
                            }
4247
                        }
4248
4249
                        if ( is_array( $value ) ) {
4250
                            if ( !in_array( $the_match, $value ) )
@@ 4278-4305 (lines=28) @@
4275
                else {
4276
                    $value = null;
4277
4278
                    if ( is_object( $this->pod ) )
4279
                        $value = $this->pod->field( $match, true );
4280
                    else {
4281
                        if ( empty( $row ) )
4282
                            $row = $this->row;
4283
4284
                        if ( isset( $row[ $match ] ) ) {
4285
                            if ( is_array( $row[ $match ] ) ) {
4286
                                if ( false !== strpos( $match, '.' ) ) {
4287
                                    $matches = explode( '.', $match );
4288
4289
                                    $value = $row[ $match ];
4290
4291
                                    foreach ( $matches as $m ) {
4292
                                        if ( is_array( $value ) && isset( $value[ $m ] ) )
4293
                                            $value = $value[ $m ];
4294
                                        else {
4295
                                            $value = null;
4296
4297
                                            break;
4298
                                        }
4299
                                    }
4300
                                }
4301
                            }
4302
                            else
4303
                                $value = $row[ $match ];
4304
                        }
4305
                    }
4306
4307
                    if ( is_array( $value ) ) {
4308
                        if ( !in_array( $match, $value ) )