Code Duplication    Length = 17-17 lines in 2 locations

eZ/Bundle/EzPublishMigrationBundle/Command/LegacyStorage/RegenerateUrlAliasesCommand.php 2 locations

@@ 895-911 (lines=17) @@
892
     *
893
     * The number excludes absolute root Location, which does not have an URL alias.
894
     */
895
    protected function getTotalLocationCount()
896
    {
897
        $platform = $this->connection->getDatabasePlatform();
898
899
        $queryBuilder = $this->connection->createQueryBuilder();
900
        $queryBuilder
901
            ->select($platform->getCountExpression('node_id'))
902
            ->from('ezcontentobject_tree')
903
            ->where(
904
                $queryBuilder->expr()->neq(
905
                    'node_id',
906
                    UrlAliasHandler::ROOT_LOCATION_ID
907
                )
908
            );
909
910
        return $queryBuilder->execute()->fetchColumn();
911
    }
912
913
    /**
914
     * Returns total number of Content objects having a Location in the database.
@@ 918-934 (lines=17) @@
915
     *
916
     * The number excludes absolute root Location, which does not have an URL alias.
917
     */
918
    protected function getTotalLocationContentCount()
919
    {
920
        $platform = $this->connection->getDatabasePlatform();
921
922
        $queryBuilder = $this->connection->createQueryBuilder();
923
        $queryBuilder
924
            ->select($platform->getCountExpression('DISTINCT contentobject_id'))
925
            ->from('ezcontentobject_tree')
926
            ->where(
927
                $queryBuilder->expr()->neq(
928
                    'node_id',
929
                    UrlAliasHandler::ROOT_LOCATION_ID
930
                )
931
            );
932
933
        return $queryBuilder->execute()->fetchColumn();
934
    }
935
936
    /**
937
     * Return the number of rows in the given $table (on ID column).