| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 52 | 6 | public function createStrategy($strategy_type) |
|
| 53 | { |
||
| 54 | 6 | if ( $strategy_type == ISessionStrategyFactory::TYPE_ISOLATED ) { |
|
| 55 | 4 | return $this->application->getObject('isolated_session_strategy'); |
|
| 56 | } |
||
| 57 | 2 | elseif ( $strategy_type == ISessionStrategyFactory::TYPE_SHARED ) { |
|
| 58 | 1 | return $this->application->getObject('shared_session_strategy'); |
|
| 59 | } |
||
| 60 | |||
| 61 | 1 | throw new \InvalidArgumentException('Incorrect session strategy type'); |
|
| 62 | } |
||
| 63 | |||
| 65 |