@@ -42,8 +42,8 @@ discard block |
||
42 | 42 | Assert::integerish($startingLine); |
43 | 43 | Assert::nullOrIntegerish($lineCount); |
44 | 44 | |
45 | - $this->startingLine = (int) $startingLine; |
|
46 | - $this->lineCount = $lineCount !== null ? (int) $lineCount : null; |
|
45 | + $this->startingLine = (int)$startingLine; |
|
46 | + $this->lineCount = $lineCount !== null ? (int)$lineCount : null; |
|
47 | 47 | $this->description = $description; |
48 | 48 | } |
49 | 49 | |
@@ -61,15 +61,15 @@ discard block |
||
61 | 61 | |
62 | 62 | // Starting line / Number of lines / Description |
63 | 63 | if (preg_match('/^([1-9]\d*)\s*(?:((?1))\s+)?(.*)$/sux', $body, $matches)) { |
64 | - $startingLine = (int) $matches[1]; |
|
64 | + $startingLine = (int)$matches[1]; |
|
65 | 65 | if (isset($matches[2]) && $matches[2] !== '') { |
66 | - $lineCount = (int) $matches[2]; |
|
66 | + $lineCount = (int)$matches[2]; |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | $description = $matches[3]; |
70 | 70 | } |
71 | 71 | |
72 | - return new static($startingLine, $lineCount, $descriptionFactory->create($description??'', $context)); |
|
72 | + return new static($startingLine, $lineCount, $descriptionFactory->create($description ?? '', $context)); |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | $description = ''; |
103 | 103 | } |
104 | 104 | |
105 | - $startingLine = (string) $this->startingLine; |
|
105 | + $startingLine = (string)$this->startingLine; |
|
106 | 106 | |
107 | 107 | $lineCount = $this->lineCount !== null ? '' . $this->lineCount : ''; |
108 | 108 |
@@ -233,7 +233,7 @@ |
||
233 | 233 | $handlerClassName = $this->tagHandlerMappings[$tagName]; |
234 | 234 | } elseif ($this->isAnnotation($tagName)) { |
235 | 235 | // TODO: Annotation support is planned for a later stage and as such is disabled for now |
236 | - $tagName = (string) $this->fqsenResolver->resolve($tagName, $context); |
|
236 | + $tagName = (string)$this->fqsenResolver->resolve($tagName, $context); |
|
237 | 237 | if (isset($this->annotationMappings[$tagName])) { |
238 | 238 | $handlerClassName = $this->annotationMappings[$tagName]; |
239 | 239 | } |
@@ -118,7 +118,7 @@ |
||
118 | 118 | |
119 | 119 | private function getSummaryAndDescriptionTextBlock(DocBlock $docblock, ?int $wrapLength) : string |
120 | 120 | { |
121 | - $text = $docblock->getSummary() . ((string) $docblock->getDescription() ? "\n\n" . $docblock->getDescription() |
|
121 | + $text = $docblock->getSummary() . ((string)$docblock->getDescription() ? "\n\n" . $docblock->getDescription() |
|
122 | 122 | : ''); |
123 | 123 | if ($wrapLength !== null) { |
124 | 124 | $text = wordwrap($text, $wrapLength); |
@@ -8,7 +8,7 @@ |
||
8 | 8 | "session" => [ |
9 | 9 | "active" => defined("ANAX_WITH_SESSION") && ANAX_WITH_SESSION, // true|false |
10 | 10 | "shared" => true, |
11 | - "callback" => function () { |
|
11 | + "callback" => function() { |
|
12 | 12 | $session = new \Anax\Session\Session(); |
13 | 13 | |
14 | 14 | // Load the configuration files |
@@ -8,7 +8,7 @@ |
||
8 | 8 | "services" => [ |
9 | 9 | "session" => [ |
10 | 10 | "shared" => false, |
11 | - "callback" => function () { |
|
11 | + "callback" => function() { |
|
12 | 12 | $object = new \stdClass(); |
13 | 13 | return $object; |
14 | 14 | } |
@@ -8,7 +8,7 @@ |
||
8 | 8 | "services" => [ |
9 | 9 | "url" => [ |
10 | 10 | "shared" => false, |
11 | - "callback" => function () { |
|
11 | + "callback" => function() { |
|
12 | 12 | $object = new \stdClass(); |
13 | 13 | return $object; |
14 | 14 | } |
@@ -8,7 +8,7 @@ |
||
8 | 8 | "services" => [ |
9 | 9 | "request" => [ |
10 | 10 | "shared" => false, |
11 | - "callback" => function () { |
|
11 | + "callback" => function() { |
|
12 | 12 | $object = new \stdClass(); |
13 | 13 | return $object; |
14 | 14 | } |
@@ -33,7 +33,7 @@ |
||
33 | 33 | public function testServiceFailToLoad() |
34 | 34 | { |
35 | 35 | $di = new \Anax\DI\DI(); |
36 | - $di->set("service", function () { |
|
36 | + $di->set("service", function() { |
|
37 | 37 | throw new \Exception(); |
38 | 38 | }); |
39 | 39 | $di->get("service"); |
@@ -22,7 +22,7 @@ |
||
22 | 22 | $di = new DI(); |
23 | 23 | $service = 'failsWithException'; |
24 | 24 | |
25 | - $di->set($service, function () { |
|
25 | + $di->set($service, function() { |
|
26 | 26 | throw new \Exception("Failed creating service."); |
27 | 27 | }); |
28 | 28 |