@@ -12,24 +12,24 @@ |
||
12 | 12 | |
13 | 13 | public function __construct(iterable $wrappedDictionary = null) |
14 | 14 | { |
15 | - if(null !== $wrappedDictionary){ |
|
15 | + if (null !== $wrappedDictionary) { |
|
16 | 16 | $wrappedDictionary = []; |
17 | - foreach($wrappedDictionary as $item){ |
|
17 | + foreach ($wrappedDictionary as $item) { |
|
18 | 18 | $this->wrappedDictionary[] = $item; |
19 | 19 | } |
20 | 20 | } |
21 | 21 | } |
22 | 22 | |
23 | 23 | public function add($value): bool{ |
24 | - if(in_array($value, $this->wrappedDictionary)){ |
|
24 | + if (in_array($value, $this->wrappedDictionary)) { |
|
25 | 25 | return false; |
26 | 26 | } |
27 | 27 | $this->wrappedDictionary[] = $value; |
28 | 28 | return true; |
29 | 29 | } |
30 | 30 | |
31 | - public function tryGetValue($key, &$output){ |
|
32 | - if(isset($this->wrappedDictionary[$key])){ |
|
31 | + public function tryGetValue($key, &$output) { |
|
32 | + if (isset($this->wrappedDictionary[$key])) { |
|
33 | 33 | $output = &$this->wrappedDictionary[$key]; |
34 | 34 | return true; |
35 | 35 | } |
@@ -28,7 +28,7 @@ |
||
28 | 28 | */ |
29 | 29 | public function visitAnnotations(iterable $annotations): void |
30 | 30 | { |
31 | - self::visitCollection($annotations, [$this,'visitAnnotation']); |
|
31 | + self::visitCollection($annotations, [$this, 'visitAnnotation']); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | /** |
@@ -104,7 +104,7 @@ |
||
104 | 104 | assert($expression instanceof IGuidConstantExpression); |
105 | 105 | $this->processGuidConstantExpression($expression); |
106 | 106 | break; |
107 | - case ExpressionKind::If(): |
|
107 | + case ExpressionKind::If (): |
|
108 | 108 | assert($expression instanceof IIfExpression); |
109 | 109 | $this->processIfExpression($expression); |
110 | 110 | break; |
@@ -33,7 +33,7 @@ |
||
33 | 33 | public function visitSchemaElement(ISchemaElement $element): void |
34 | 34 | { |
35 | 35 | switch ($element->getSchemaElementKind()) { |
36 | - case SchemaElementKind::Function(): |
|
36 | + case SchemaElementKind::Function (): |
|
37 | 37 | assert($element instanceof IFunction); |
38 | 38 | $this->processFunction($element); |
39 | 39 | break; |
@@ -68,7 +68,7 @@ |
||
68 | 68 | private static function fillVersions() |
69 | 69 | { |
70 | 70 | if (null == self::$fixedVersion) { |
71 | - self::$fixedVersion = [1 => new self(1, 0), 11 => new self(1, 1), 12 => new self(1, 2),2 => new self(2, 0), 3 => new self(3, 0)]; |
|
71 | + self::$fixedVersion = [1 => new self(1, 0), 11 => new self(1, 1), 12 => new self(1, 2), 2 => new self(2, 0), 3 => new self(3, 0)]; |
|
72 | 72 | } |
73 | 73 | } |
74 | 74 |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -if(!function_exists('mb_ord')) { |
|
2 | +if (!function_exists('mb_ord')) { |
|
3 | 3 | function mb_ord($s, $encoding = null) |
4 | 4 | { |
5 | 5 | $getEncoding = function ($encoding) { |
@@ -29,19 +29,19 @@ |
||
29 | 29 | */ |
30 | 30 | class ValueKind extends Enum |
31 | 31 | { |
32 | - protected const None =0; |
|
32 | + protected const None = 0; |
|
33 | 33 | protected const Binary = 1; |
34 | - protected const Boolean =2; |
|
35 | - protected const Collection =3; |
|
36 | - protected const DateTimeOffset=4; |
|
37 | - protected const DateTime =5; |
|
38 | - protected const Decimal =6; |
|
39 | - protected const Enum =7; |
|
40 | - protected const Floating =8; |
|
41 | - protected const Guid =9; |
|
42 | - protected const Integer =10; |
|
43 | - protected const Null =11; |
|
44 | - protected const String =12; |
|
45 | - protected const Structured =13; |
|
46 | - protected const Time =14; |
|
34 | + protected const Boolean = 2; |
|
35 | + protected const Collection = 3; |
|
36 | + protected const DateTimeOffset = 4; |
|
37 | + protected const DateTime = 5; |
|
38 | + protected const Decimal = 6; |
|
39 | + protected const Enum = 7; |
|
40 | + protected const Floating = 8; |
|
41 | + protected const Guid = 9; |
|
42 | + protected const Integer = 10; |
|
43 | + protected const Null = 11; |
|
44 | + protected const String = 12; |
|
45 | + protected const Structured = 13; |
|
46 | + protected const Time = 14; |
|
47 | 47 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | $regexBase = '/(is)(%s)/m'; |
25 | 25 | $regexFull = sprintf($regexBase, implode('$|', array_keys($array))); |
26 | 26 | preg_match($regexFull, $name, $match); |
27 | - if (count($match)>0 && $match[0] === $name) { |
|
27 | + if (count($match) > 0 && $match[0] === $name) { |
|
28 | 28 | return $this->{$match[1] . 'Flag'}($array[$match[2]], $arguments[0] ?? null); |
29 | 29 | } |
30 | 30 | throw new BadMethodCallException(sprintf('Enum %s not found on %s', $name, get_class($this))); |
@@ -48,7 +48,7 @@ |
||
48 | 48 | { |
49 | 49 | $qualifiedName = $element->FullName(); |
50 | 50 | switch ($element->getSchemaElementKind()) { |
51 | - case SchemaElementKind::Function(): |
|
51 | + case SchemaElementKind::Function (): |
|
52 | 52 | assert($element instanceof IFunction); |
53 | 53 | self::AddFunction($element, $qualifiedName, $functionGroupDictionary); |
54 | 54 | break; |