| Conditions | 7 |
| Paths | 10 |
| Total Lines | 23 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | <?php |
||
| 54 | public function execute($query, $dryRun) |
||
| 55 | { |
||
| 56 | if ($query instanceof MigrationQuery) { |
||
| 57 | if ($query instanceof ConnectionAwareInterface) { |
||
| 58 | $query->setConnection($this->connection); |
||
| 59 | } |
||
| 60 | if ($dryRun) { |
||
| 61 | $descriptions = $query->getDescription(); |
||
| 62 | if (!empty($descriptions)) { |
||
| 63 | foreach ((array)$descriptions as $description) { |
||
| 64 | $this->logger->notice($description); |
||
| 65 | } |
||
| 66 | } |
||
| 67 | } else { |
||
| 68 | $query->execute($this->logger); |
||
| 69 | } |
||
| 70 | } else { |
||
| 71 | $this->logger->notice($query); |
||
| 72 | if (!$dryRun) { |
||
| 73 | $this->connection->executeQuery($query); |
||
| 74 | } |
||
| 75 | } |
||
| 76 | } |
||
| 77 | } |
||
| 78 |