Code Duplication    Length = 28-28 lines in 2 locations

classes/PodsUI.php 2 locations

@@ 4300-4327 (lines=28) @@
4297
4298
                        $value = null;
4299
4300
                        if ( is_object( $this->pod ) )
4301
                            $value = $this->pod->field( $the_match, true );
4302
                        else {
4303
                            if ( empty( $row ) )
4304
                                $row = $this->row;
4305
4306
                            if ( isset( $row[ $the_match ] ) ) {
4307
                                if ( is_array( $row[ $the_match ] ) ) {
4308
                                    if ( false !== strpos( $the_match, '.' ) ) {
4309
                                        $the_matches = explode( '.', $the_match );
4310
4311
                                        $value = $row[ $the_match ];
4312
4313
                                        foreach ( $the_matches as $m ) {
4314
                                            if ( is_array( $value ) && isset( $value[ $m ] ) )
4315
                                                $value = $value[ $m ];
4316
                                            else {
4317
                                                $value = null;
4318
4319
                                                break;
4320
                                            }
4321
                                        }
4322
                                    }
4323
                                }
4324
                                else
4325
                                    $value = $row[ $the_match ];
4326
                            }
4327
                        }
4328
4329
                        if ( is_array( $value ) ) {
4330
                            if ( !in_array( $the_match, $value ) )
@@ 4358-4385 (lines=28) @@
4355
                else {
4356
                    $value = null;
4357
4358
                    if ( is_object( $this->pod ) )
4359
                        $value = $this->pod->field( $match, true );
4360
                    else {
4361
                        if ( empty( $row ) )
4362
                            $row = $this->row;
4363
4364
                        if ( isset( $row[ $match ] ) ) {
4365
                            if ( is_array( $row[ $match ] ) ) {
4366
                                if ( false !== strpos( $match, '.' ) ) {
4367
                                    $matches = explode( '.', $match );
4368
4369
                                    $value = $row[ $match ];
4370
4371
                                    foreach ( $matches as $m ) {
4372
                                        if ( is_array( $value ) && isset( $value[ $m ] ) )
4373
                                            $value = $value[ $m ];
4374
                                        else {
4375
                                            $value = null;
4376
4377
                                            break;
4378
                                        }
4379
                                    }
4380
                                }
4381
                            }
4382
                            else
4383
                                $value = $row[ $match ];
4384
                        }
4385
                    }
4386
4387
                    if ( is_array( $value ) ) {
4388
                        if ( !in_array( $match, $value ) )