{
$this->changes['factory'] = true;
- if (is_string($factory) && false !== strpos($factory, '::')) {
+ if (\is_string($factory) && false !== strpos($factory, '::')) {
$factory = explode('::', $factory, 2);
}
/**
* Gets the factory.
*
- * @return string|array The PHP function or an array containing a class/Reference and a method to call
+ * @return string|array|null The PHP function or an array containing a class/Reference and a method to call
*/
public function getFactory()
{
/**
* Sets the service that this service is decorating.
*
- * @param null|string $id The decorated service id, use null to remove decoration
- * @param null|string $renamedId The new decorated service id
+ * @param string|null $id The decorated service id, use null to remove decoration
+ * @param string|null $renamedId The new decorated service id
* @param int $priority The priority of decoration
*
* @return $this
/**
* Gets the service that this service is decorating.
*
- * @return null|array An array composed of the decorated service id, the new id for it and the priority of decoration, null if no service is decorated
+ * @return array|null An array composed of the decorated service id, the new id for it and the priority of decoration, null if no service is decorated
*/
public function getDecoratedService()
{
*/
public function replaceArgument($index, $argument)
{
- if (0 === count($this->arguments)) {
+ if (0 === \count($this->arguments)) {
throw new OutOfBoundsException('Cannot replace arguments if none have been configured yet.');
}
- if (is_int($index) && ($index < 0 || $index > count($this->arguments) - 1)) {
- throw new OutOfBoundsException(sprintf('The index "%d" is not in the range [0, %d].', $index, count($this->arguments) - 1));
+ if (\is_int($index) && ($index < 0 || $index > \count($this->arguments) - 1)) {
+ throw new OutOfBoundsException(sprintf('The index "%d" is not in the range [0, %d].', $index, \count($this->arguments) - 1));
}
if (!array_key_exists($index, $this->arguments)) {
{
$this->changes['configurator'] = true;
- if (is_string($configurator) && false !== strpos($configurator, '::')) {
+ if (\is_string($configurator) && false !== strpos($configurator, '::')) {
$configurator = explode('::', $configurator, 2);
}
*/
public function getAutowiringTypes(/*$triggerDeprecation = true*/)
{
- if (1 > func_num_args() || func_get_arg(0)) {
+ if (1 > \func_num_args() || func_get_arg(0)) {
@trigger_error('Autowiring-types are deprecated since Symfony 3.3 and will be removed in 4.0. Use aliases instead.', E_USER_DEPRECATED);
}