Skip to content

Commit e728976

Browse files
wouterjnicolas-grekas
authored andcommitted
Add missing PHPdoc return types
1 parent 8221e69 commit e728976

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed

Annotation/Route.php

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ public function setPath(string $path)
8181
$this->path = $path;
8282
}
8383

84+
/**
85+
* @return string|null
86+
*/
8487
public function getPath()
8588
{
8689
return $this->path;
@@ -101,6 +104,9 @@ public function setHost(string $pattern)
101104
$this->host = $pattern;
102105
}
103106

107+
/**
108+
* @return string|null
109+
*/
104110
public function getHost()
105111
{
106112
return $this->host;
@@ -111,6 +117,9 @@ public function setName(string $name)
111117
$this->name = $name;
112118
}
113119

120+
/**
121+
* @return string|null
122+
*/
114123
public function getName()
115124
{
116125
return $this->name;
@@ -121,6 +130,9 @@ public function setRequirements(array $requirements)
121130
$this->requirements = $requirements;
122131
}
123132

133+
/**
134+
* @return array
135+
*/
124136
public function getRequirements()
125137
{
126138
return $this->requirements;
@@ -131,6 +143,9 @@ public function setOptions(array $options)
131143
$this->options = $options;
132144
}
133145

146+
/**
147+
* @return array
148+
*/
134149
public function getOptions()
135150
{
136151
return $this->options;
@@ -141,6 +156,9 @@ public function setDefaults(array $defaults)
141156
$this->defaults = $defaults;
142157
}
143158

159+
/**
160+
* @return array
161+
*/
144162
public function getDefaults()
145163
{
146164
return $this->defaults;
@@ -151,6 +169,9 @@ public function setSchemes(array|string $schemes)
151169
$this->schemes = (array) $schemes;
152170
}
153171

172+
/**
173+
* @return array
174+
*/
154175
public function getSchemes()
155176
{
156177
return $this->schemes;
@@ -161,6 +182,9 @@ public function setMethods(array|string $methods)
161182
$this->methods = (array) $methods;
162183
}
163184

185+
/**
186+
* @return array
187+
*/
164188
public function getMethods()
165189
{
166190
return $this->methods;
@@ -171,6 +195,9 @@ public function setCondition(?string $condition)
171195
$this->condition = $condition;
172196
}
173197

198+
/**
199+
* @return string|null
200+
*/
174201
public function getCondition()
175202
{
176203
return $this->condition;

Loader/AnnotationClassLoader.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,9 @@ protected function getDefaultRouteName(\ReflectionClass $class, \ReflectionMetho
255255
return $name;
256256
}
257257

258+
/**
259+
* @return array
260+
*/
258261
protected function getGlobals(\ReflectionClass $class)
259262
{
260263
$globals = $this->resetGlobals();
@@ -337,6 +340,9 @@ private function resetGlobals(): array
337340
];
338341
}
339342

343+
/**
344+
* @return Route
345+
*/
340346
protected function createRoute(string $path, array $defaults, array $requirements, array $options, ?string $host, array $schemes, array $methods, ?string $condition)
341347
{
342348
return new Route($path, $defaults, $requirements, $options, $host, $schemes, $methods, $condition);

Matcher/TraceableUrlMatcher.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ class TraceableUrlMatcher extends UrlMatcher
2929

3030
protected $traces;
3131

32+
/**
33+
* @return array
34+
*/
3235
public function getTraces(string $pathinfo)
3336
{
3437
$this->traces = [];

0 commit comments

Comments
 (0)