@@ -107,8 +107,6 @@ public function getParameterBag()
107
107
/**
108
108
* Gets a parameter.
109
109
*
110
- * @param string $name The parameter name
111
- *
112
110
* @return mixed
113
111
*
114
112
* @throws InvalidArgumentException if the parameter is not defined
@@ -119,10 +117,6 @@ public function getParameter(string $name)
119
117
}
120
118
121
119
/**
122
- * Checks if a parameter exists.
123
- *
124
- * @param string $name The parameter name
125
- *
126
120
* @return bool The presence of parameter in container
127
121
*/
128
122
public function hasParameter (string $ name )
@@ -210,9 +204,6 @@ public function has($id)
210
204
/**
211
205
* Gets a service.
212
206
*
213
- * @param string $id The service identifier
214
- * @param int $invalidBehavior The behavior when the service does not exist
215
- *
216
207
* @return object|null The associated service
217
208
*
218
209
* @throws ServiceCircularReferenceException When a circular reference is detected
@@ -286,8 +277,6 @@ private function make(string $id, int $invalidBehavior)
286
277
/**
287
278
* Returns true if the given service has actually been initialized.
288
279
*
289
- * @param string $id The service identifier
290
- *
291
280
* @return bool true if service has already been initialized, false otherwise
292
281
*/
293
282
public function initialized (string $ id )
@@ -345,45 +334,39 @@ public function getRemovedIds()
345
334
/**
346
335
* Camelizes a string.
347
336
*
348
- * @param string $id A string to camelize
349
- *
350
337
* @return string The camelized string
351
338
*/
352
- public static function camelize ($ id )
339
+ public static function camelize (string $ id )
353
340
{
354
341
return strtr (ucwords (strtr ($ id , ['_ ' => ' ' , '. ' => '_ ' , '\\' => '_ ' ])), [' ' => '' ]);
355
342
}
356
343
357
344
/**
358
345
* A string to underscore.
359
346
*
360
- * @param string $id The string to underscore
361
- *
362
347
* @return string The underscored string
363
348
*/
364
- public static function underscore ($ id )
349
+ public static function underscore (string $ id )
365
350
{
366
351
return strtolower (preg_replace (['/([A-Z]+)([A-Z][a-z])/ ' , '/([a-z\d])([A-Z])/ ' ], ['\\1_ \\2 ' , '\\1_ \\2 ' ], str_replace ('_ ' , '. ' , $ id )));
367
352
}
368
353
369
354
/**
370
355
* Creates a service by requiring its factory file.
371
356
*/
372
- protected function load ($ file )
357
+ protected function load (string $ file )
373
358
{
374
359
return require $ file ;
375
360
}
376
361
377
362
/**
378
363
* Fetches a variable from the environment.
379
364
*
380
- * @param string $name The name of the environment variable
381
- *
382
365
* @return mixed The value to use for the provided environment variable name
383
366
*
384
367
* @throws EnvNotFoundException When the environment variable is not found and has no default value
385
368
*/
386
- protected function getEnv ($ name )
369
+ protected function getEnv (string $ name )
387
370
{
388
371
if (isset ($ this ->resolving [$ envName = "env( $ name) " ])) {
389
372
throw new ParameterCircularReferenceException (array_keys ($ this ->resolving ));
0 commit comments