@@ -70,16 +70,16 @@ |
||
| 70 | 70 | { |
| 71 | 71 | $state = new State(); |
| 72 | 72 | |
| 73 | - foreach ($this->collectors as $collector) { |
|
| 74 | - if (is_string($collector)) { |
|
| 73 | + foreach ($this->collectors as $collector){ |
|
| 74 | + if (is_string($collector)){ |
|
| 75 | 75 | $collector = $this->factory->make($collector); |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | - if ($collector instanceof Autowire) { |
|
| 78 | + if ($collector instanceof Autowire){ |
|
| 79 | 79 | $collector = $collector->resolve($this->factory); |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | - if (!$collector instanceof StateCollectorInterface) { |
|
| 82 | + if (!$collector instanceof StateCollectorInterface){ |
|
| 83 | 83 | throw new StateException(sprintf( |
| 84 | 84 | 'Unable to populate state, invalid state collector %s', |
| 85 | 85 | is_object($collector) ? get_class($collector) : gettype($collector) |
@@ -70,16 +70,20 @@ |
||
| 70 | 70 | { |
| 71 | 71 | $state = new State(); |
| 72 | 72 | |
| 73 | - foreach ($this->collectors as $collector) { |
|
| 74 | - if (is_string($collector)) { |
|
| 73 | + foreach ($this->collectors as $collector) |
|
| 74 | + { |
|
| 75 | + if (is_string($collector)) |
|
| 76 | + { |
|
| 75 | 77 | $collector = $this->factory->make($collector); |
| 76 | 78 | } |
| 77 | 79 | |
| 78 | - if ($collector instanceof Autowire) { |
|
| 80 | + if ($collector instanceof Autowire) |
|
| 81 | + { |
|
| 79 | 82 | $collector = $collector->resolve($this->factory); |
| 80 | 83 | } |
| 81 | 84 | |
| 82 | - if (!$collector instanceof StateCollectorInterface) { |
|
| 85 | + if (!$collector instanceof StateCollectorInterface) |
|
| 86 | + { |
|
| 83 | 87 | throw new StateException(sprintf( |
| 84 | 88 | 'Unable to populate state, invalid state collector %s', |
| 85 | 89 | is_object($collector) ? get_class($collector) : gettype($collector) |