| Conditions | 3 | 
| Paths | 3 | 
| Total Lines | 14 | 
| Code Lines | 8 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 9 | 
| CRAP Score | 3 | 
| Changes | 2 | ||
| Bugs | 0 | Features | 1 | 
| 1 | <?php | ||
| 21 | 6 | public function __construct($alias, $aliasOperation = self::OPERATION_BY_MERCHANT, $aliasUsage = null) | |
| 22 |     { | ||
| 23 | 6 |         if (strlen($alias) > 50) { | |
| 24 | 1 |             throw new InvalidArgumentException("Alias is too long"); | |
| 25 | } | ||
| 26 | |||
| 27 | 5 |         if (preg_match('/[^a-zA-Z0-9_-]/', $alias)) { | |
| 28 | 1 |             throw new InvalidArgumentException("Alias cannot contain special characters"); | |
| 29 | } | ||
| 30 | |||
| 31 | 4 | $this->aliasOperation = $aliasOperation; | |
| 32 | 4 | $this->aliasUsage = $aliasUsage; | |
| 33 | 4 | $this->alias = $alias; | |
| 34 | 4 | } | |
| 35 | |||
| 76 |