Code Duplication    Length = 11-11 lines in 2 locations

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

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