Code Duplication    Length = 8-10 lines in 2 locations

services/WordPress/WordPressQueryProvider.php 2 locations

@@ 501-510 (lines=10) @@
498
                       ." AND tt.term_id = ".$namedKeyValues['CategoryID'][0];
499
                $stmt = mysql_query($query);
500
                $result = $this->_serializeCategories($stmt);
501
            } else if ($navigationPropName == 'Comments') {
502
                $query = "SELECT * FROM `wp_comments`"
503
                       ." WHERE comment_approved = 1" 
504
                       ." AND comment_post_ID = $sourceEntityInstance->PostID"
505
                       ." AND comment_ID = ".$namedKeyValues['CommentID'][0];
506
                $stmt = mysql_query($query);
507
                $result = $this->_serializeComments($stmt);
508
            } else {
509
                die('Post does not have navigation porperty with name: ' . $navigationPropName);
510
            }
511
            break;
512
513
        case ($srcClass == 'Tag'):
@@ 564-571 (lines=8) @@
561
                        ." AND wp_posts.ID = ".$namedKeyValues['PostID'][0];
562
                 $stmt = mysql_query($query);
563
                 $result = $this->_serializePosts($stmt);
564
            } elseif ($navigationPropName == 'Comments') {
565
                 $query = "SELECT * FROM `wp_comments`"
566
                      ." WHERE comment_approved = 1" 
567
                      ." AND wp_comments.user_id = $sourceEntityInstance->UserID"
568
                      ." AND wp_comments.comment_ID = ".$namedKeyValues['CommentID'][0];
569
                 $stmt = mysql_query($query);
570
                 $result = $this->_serializeComments($stmt);
571
            } else {
572
                 die('User does not have navigation porperty with name: ' . $navigationPropName);
573
            }
574
            break;