Conditions | 1 |
Paths | 1 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
79 | 2 | public function defer($pid, $deferrer) |
|
80 | { |
||
81 | 2 | $connection = $this->entityManager->getConnection(); |
|
82 | |||
83 | 2 | $this->entity->setPid($pid); |
|
84 | 2 | $this->entityManager->flush(); |
|
85 | |||
86 | 2 | $connection->close(); |
|
87 | 2 | $exitCode = $deferrer(); |
|
88 | 2 | $connection->connect(); |
|
89 | |||
90 | 2 | $this->entity->setExitCode($exitCode); |
|
91 | 2 | $this->entityManager->flush(); |
|
92 | |||
93 | 2 | return $this; |
|
94 | } |
||
95 | |||
109 |