Conditions | 3 |
Paths | 4 |
Total Lines | 18 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
25 | public function purgeDatabase(BeforeScenarioScope $scope) |
||
|
|||
26 | { |
||
27 | $entityManager = $this->getService('doctrine.orm.entity_manager'); |
||
28 | $entityManager->getConnection()->getConfiguration()->setSQLLogger(null); |
||
29 | |||
30 | $isMySqlDriver = $entityManager->getConnection()->getDriver() instanceof PDOMySqlDriver; |
||
31 | if ($isMySqlDriver) { |
||
32 | $entityManager->getConnection()->executeUpdate("SET foreign_key_checks = 0;"); |
||
33 | } |
||
34 | |||
35 | $this->getSharedService('sylius.purger.orm_purger')->purge(); |
||
36 | |||
37 | if ($isMySqlDriver) { |
||
38 | $entityManager->getConnection()->executeUpdate("SET foreign_key_checks = 1;"); |
||
39 | } |
||
40 | |||
41 | $entityManager->clear(); |
||
42 | } |
||
43 | } |
||
44 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.