Code Coverage  | 
      ||||||||||
Classes and Traits  | 
       Functions and Methods  | 
       Lines  | 
      ||||||||
| Total |         | 
       0.00%  | 
       0 / 1  | 
               | 
       0.00%  | 
       0 / 1  | 
       CRAP |         | 
       0.00%  | 
       0 / 10  | 
      
| SessionIdAbstract |         | 
       0.00%  | 
       0 / 1  | 
               | 
       0.00%  | 
       0 / 1  | 
       20.00 |         | 
       0.00%  | 
       0 / 10  | 
      
| __construct |         | 
       0.00%  | 
       0 / 1  | 
       20.00 |         | 
       0.00%  | 
       0 / 10  | 
      |||
| <?php | |
| namespace Puyo\Security\Csrf\Strategy; | |
| /** | |
| * セッションID | |
| */ | |
| abstract class SessionIdAbstract implements IStrategy | |
| { | |
| public function __construct() { | |
| // セッションは開始されている必要がある | |
| if(version_compare(PHP_VERSION, '5.4', '>=')) { | |
| if(PHP_SESSION_NONE === session_status()) { | |
| throw new \RuntimeException('session is not started'); | |
| } | |
| } else { | |
| if('' === session_id()) { | |
| throw new \RuntimeException('session is not started'); | |
| } | |
| } | |
| } | |
| } |