Skip to content

Commit 8254f77

Browse files
Merge branch '4.4' into 5.2
* 4.4: Backport type fixes uzb translation [DependencyInjection] Fix doc blocks [DependencyInjection] Turn $defaultDeprecationTemplate into a constant [Form] better form doc types to support static analysis
2 parents 8bc1f4a + 2a04883 commit 8254f77

File tree

4 files changed

+2
-61
lines changed

4 files changed

+2
-61
lines changed

Loader/AnnotationFileLoader.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ class AnnotationFileLoader extends FileLoader
2626
{
2727
protected $loader;
2828

29-
/**
30-
* @throws \RuntimeException
31-
*/
3229
public function __construct(FileLocatorInterface $locator, AnnotationClassLoader $loader)
3330
{
3431
if (!\function_exists('token_get_all')) {

Loader/ContainerLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function __construct(ContainerInterface $container)
3232
*/
3333
public function supports($resource, string $type = null)
3434
{
35-
return 'service' === $type;
35+
return 'service' === $type && \is_string($resource);
3636
}
3737

3838
/**

Matcher/Dumper/StaticPrefixCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ private function getCommonPrefix(string $prefix, string $anotherPrefix): array
195195
return [substr($prefix, 0, $i), substr($prefix, 0, $staticLength ?? $i)];
196196
}
197197

198-
public static function handleError($type, $msg)
198+
public static function handleError(int $type, string $msg)
199199
{
200200
return false !== strpos($msg, 'Compilation failed: lookbehind assertion is not fixed length');
201201
}

Route.php

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,6 @@ final public function unserialize($serialized)
112112
}
113113

114114
/**
115-
* Returns the pattern for the path.
116-
*
117115
* @return string The path pattern
118116
*/
119117
public function getPath()
@@ -124,8 +122,6 @@ public function getPath()
124122
/**
125123
* Sets the pattern for the path.
126124
*
127-
* This method implements a fluent interface.
128-
*
129125
* @return $this
130126
*/
131127
public function setPath(string $pattern)
@@ -141,8 +137,6 @@ public function setPath(string $pattern)
141137
}
142138

143139
/**
144-
* Returns the pattern for the host.
145-
*
146140
* @return string The host pattern
147141
*/
148142
public function getHost()
@@ -153,8 +147,6 @@ public function getHost()
153147
/**
154148
* Sets the pattern for the host.
155149
*
156-
* This method implements a fluent interface.
157-
*
158150
* @return $this
159151
*/
160152
public function setHost(?string $pattern)
@@ -180,8 +172,6 @@ public function getSchemes()
180172
* Sets the schemes (e.g. 'https') this route is restricted to.
181173
* So an empty array means that any scheme is allowed.
182174
*
183-
* This method implements a fluent interface.
184-
*
185175
* @param string|string[] $schemes The scheme or an array of schemes
186176
*
187177
* @return $this
@@ -219,8 +209,6 @@ public function getMethods()
219209
* Sets the HTTP methods (e.g. 'POST') this route is restricted to.
220210
* So an empty array means that any method is allowed.
221211
*
222-
* This method implements a fluent interface.
223-
*
224212
* @param string|string[] $methods The method or an array of methods
225213
*
226214
* @return $this
@@ -234,8 +222,6 @@ public function setMethods($methods)
234222
}
235223

236224
/**
237-
* Returns the options.
238-
*
239225
* @return array The options
240226
*/
241227
public function getOptions()
@@ -244,10 +230,6 @@ public function getOptions()
244230
}
245231

246232
/**
247-
* Sets the options.
248-
*
249-
* This method implements a fluent interface.
250-
*
251233
* @return $this
252234
*/
253235
public function setOptions(array $options)
@@ -260,10 +242,6 @@ public function setOptions(array $options)
260242
}
261243

262244
/**
263-
* Adds options.
264-
*
265-
* This method implements a fluent interface.
266-
*
267245
* @return $this
268246
*/
269247
public function addOptions(array $options)
@@ -279,8 +257,6 @@ public function addOptions(array $options)
279257
/**
280258
* Sets an option value.
281259
*
282-
* This method implements a fluent interface.
283-
*
284260
* @param mixed $value The option value
285261
*
286262
* @return $this
@@ -314,8 +290,6 @@ public function hasOption(string $name)
314290
}
315291

316292
/**
317-
* Returns the defaults.
318-
*
319293
* @return array The defaults
320294
*/
321295
public function getDefaults()
@@ -324,12 +298,6 @@ public function getDefaults()
324298
}
325299

326300
/**
327-
* Sets the defaults.
328-
*
329-
* This method implements a fluent interface.
330-
*
331-
* @param array $defaults The defaults
332-
*
333301
* @return $this
334302
*/
335303
public function setDefaults(array $defaults)
@@ -340,12 +308,6 @@ public function setDefaults(array $defaults)
340308
}
341309

342310
/**
343-
* Adds defaults.
344-
*
345-
* This method implements a fluent interface.
346-
*
347-
* @param array $defaults The defaults
348-
*
349311
* @return $this
350312
*/
351313
public function addDefaults(array $defaults)
@@ -402,8 +364,6 @@ public function setDefault(string $name, $default)
402364
}
403365

404366
/**
405-
* Returns the requirements.
406-
*
407367
* @return array The requirements
408368
*/
409369
public function getRequirements()
@@ -412,12 +372,6 @@ public function getRequirements()
412372
}
413373

414374
/**
415-
* Sets the requirements.
416-
*
417-
* This method implements a fluent interface.
418-
*
419-
* @param array $requirements The requirements
420-
*
421375
* @return $this
422376
*/
423377
public function setRequirements(array $requirements)
@@ -428,12 +382,6 @@ public function setRequirements(array $requirements)
428382
}
429383

430384
/**
431-
* Adds requirements.
432-
*
433-
* This method implements a fluent interface.
434-
*
435-
* @param array $requirements The requirements
436-
*
437385
* @return $this
438386
*/
439387
public function addRequirements(array $requirements)
@@ -488,8 +436,6 @@ public function setRequirement(string $key, string $regex)
488436
}
489437

490438
/**
491-
* Returns the condition.
492-
*
493439
* @return string The condition
494440
*/
495441
public function getCondition()
@@ -500,8 +446,6 @@ public function getCondition()
500446
/**
501447
* Sets the condition.
502448
*
503-
* This method implements a fluent interface.
504-
*
505449
* @return $this
506450
*/
507451
public function setCondition(?string $condition)

0 commit comments

Comments
 (0)