| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 43 | public function up(Database $db) |
||
| 44 | { |
||
| 45 | $collection = $db->createCollection($this->collection); |
||
| 46 | $qb = $collection->createQueryBuilder(); |
||
| 47 | /** @var Translatable $translatable */ |
||
| 48 | foreach ($qb->find() as $translatable) { |
||
| 49 | $id = $translatable->getId(); |
||
| 50 | $collection->update( |
||
| 51 | ['id' => $id], |
||
| 52 | ['id' => sha1($id)] |
||
| 53 | ); |
||
| 54 | } |
||
| 55 | } |
||
| 56 | |||
| 68 |