Completed
Push — master ( f728fb...890a42 )
by Martijn
02:07
created

StringUuidType   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 15
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php
2
3
namespace SwaggerGen\Swagger\Type;
4
5
/**
6
 * RFC 4122 UUID type definition
7
 *
8
 * @package    SwaggerGen
9
 * @author     Martijn van der Lee <[email protected]>
10
 * @copyright  2014-2016 Martijn van der Lee
11
 * @license    https://opensource.org/licenses/MIT MIT
12
 */
13
class StringUuidType extends AbstractRegexType
14
{
15
16
	/**
17
	 * Construct and setup the regular expression for this type
18
	 * 
19
	 * @param \SwaggerGen\Swagger\AbstractObject $parent
20
	 * @param string $definition
21
	 */
22
	public function __construct(\SwaggerGen\Swagger\AbstractObject $parent, $definition)
23
	{
24
		parent::__construct($parent, $definition, 'uuid', '[a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}');
25
	}
26
27
}
28