Code Duplication    Length = 11-11 lines in 2 locations

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

@@ 945-955 (lines=11) @@
942
     *
943
     * @return int
944
     */
945
    protected function getTotalBackupCount($table)
946
    {
947
        $platform = $this->connection->getDatabasePlatform();
948
949
        $queryBuilder = $this->connection->createQueryBuilder();
950
        $queryBuilder
951
            ->select($platform->getCountExpression('id'))
952
            ->from($table);
953
954
        return (int)$queryBuilder->execute()->fetchColumn();
955
    }
956
957
    /**
958
     * Creates database table for custom Location URL alias backup.
@@ 1024-1034 (lines=11) @@
1021
     *
1022
     * @return bool
1023
     */
1024
    protected function isTableEmpty($name)
1025
    {
1026
        $queryBuilder = $this->connection->createQueryBuilder();
1027
        $queryBuilder
1028
            ->select($this->connection->getDatabasePlatform()->getCountExpression('*'))
1029
            ->from($name);
1030
1031
        $count = $queryBuilder->execute()->fetchColumn();
1032
1033
        return $count == 0;
1034
    }
1035
1036
    /**
1037
     * Returns configured progress bar helper.