Code Duplication    Length = 22-22 lines in 2 locations

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

@@ 207-228 (lines=22) @@
204
        }
205
        $possibleFileName = $this->rootPath.$possibleFileNames[0];
206
207
        if (!file_exists($possibleFileName)) {
208
            $tableName = $table->getName();
209
210
            $str = "<?php
211
/*
212
 * This file has been automatically generated by TDBM.
213
 * You can edit this file as it will not be overwritten.
214
 */
215
216
namespace {$beannamespace};
217
218
/**
219
 * The $className class maps the '$tableName' table in database.
220
 */
221
class $className extends $baseClassName
222
{
223
224
}";
225
            $this->ensureDirectoryExist($possibleFileName);
226
            file_put_contents($possibleFileName, $str);
227
            @chmod($possibleFileName, 0664);
228
        }
229
    }
230
231
    /**
@@ 472-493 (lines=22) @@
469
        $possibleFileName = $this->rootPath.$possibleFileNames[0];
470
471
        // Now, let's generate the "editable" class
472
        if (!file_exists($possibleFileName)) {
473
            $str = "<?php
474
475
/*
476
 * This file has been automatically generated by TDBM.
477
 * You can edit this file as it will not be overwritten.
478
 */
479
480
namespace {$daonamespace};
481
482
/**
483
 * The $className class will maintain the persistence of $beanClassWithoutNameSpace class into the $tableName table.
484
 */
485
class $className extends $baseClassName
486
{
487
488
}
489
";
490
            $this->ensureDirectoryExist($possibleFileName);
491
            file_put_contents($possibleFileName, $str);
492
            @chmod($possibleFileName, 0664);
493
        }
494
    }
495
496
    /**