@@ -27,8 +27,9 @@ |
||
| 27 | 27 | $target_controller = $this->get('Controllers\\'.$router->targetController()); |
| 28 | 28 | |
| 29 | 29 | if ($target_controller->requiresOperator()) { |
| 30 | - if(is_null($operator_id = $this->get('HexMakina\BlackBox\StateAgentInterface')->operatorId())) |
|
| 31 | - $this->checkin(); |
|
| 30 | + if(is_null($operator_id = $this->get('HexMakina\BlackBox\StateAgentInterface')->operatorId())) { |
|
| 31 | + $this->checkin(); |
|
| 32 | + } |
|
| 32 | 33 | |
| 33 | 34 | if(is_null($operator = get_class($operator)::exists($operator_id)) || !$operator->isActive()){ |
| 34 | 35 | $this->checkout(); |
@@ -15,8 +15,9 @@ discard block |
||
| 15 | 15 | |
| 16 | 16 | public function operator(OperatorInterface $setter=null) |
| 17 | 17 | { |
| 18 | - if(!is_null($setter)) |
|
| 19 | - $this->operator = $setter; |
|
| 18 | + if(!is_null($setter)) { |
|
| 19 | + $this->operator = $setter; |
|
| 20 | + } |
|
| 20 | 21 | |
| 21 | 22 | if(is_null($this->operator)) |
| 22 | 23 | { |
@@ -32,8 +33,9 @@ discard block |
||
| 32 | 33 | } |
| 33 | 34 | } |
| 34 | 35 | |
| 35 | - if(is_null($this->operator) && !empty($this->get('operator_id'))) |
|
| 36 | - $this->operator = Operator::exists($this->get('operator_id')); |
|
| 36 | + if(is_null($this->operator) && !empty($this->get('operator_id'))) { |
|
| 37 | + $this->operator = Operator::exists($this->get('operator_id')); |
|
| 38 | + } |
|
| 37 | 39 | |
| 38 | 40 | return $this->operator; |
| 39 | 41 | } |