Code Duplication    Length = 8-8 lines in 2 locations

src/Mouf/Database/TDBM/Utils/PivotTableMethodsDescriptor.php 2 locations

@@ 66-73 (lines=8) @@
63
     *
64
     * @return string
65
     */
66
    private function getPluralName() : string
67
    {
68
        if (!$this->useAlternateName) {
69
            return TDBMDaoGenerator::toCamelCase($this->remoteFk->getForeignTableName());
70
        } else {
71
            return TDBMDaoGenerator::toCamelCase($this->remoteFk->getForeignTableName()).'By'.TDBMDaoGenerator::toCamelCase($this->pivotTable->getName());
72
        }
73
    }
74
75
    /**
76
     * Returns the singular name.
@@ 80-87 (lines=8) @@
77
     *
78
     * @return string
79
     */
80
    private function getSingularName() : string
81
    {
82
        if (!$this->useAlternateName) {
83
            return TDBMDaoGenerator::toCamelCase(TDBMDaoGenerator::toSingular($this->remoteFk->getForeignTableName()));
84
        } else {
85
            return TDBMDaoGenerator::toCamelCase(TDBMDaoGenerator::toSingular($this->remoteFk->getForeignTableName())).'By'.TDBMDaoGenerator::toCamelCase($this->pivotTable->getName());
86
        }
87
    }
88
89
    /**
90
     * Returns the code of the method.