Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet committed Jan 19, 2021
1 parent 11f5be4 commit 6b4a77a
Show file tree
Hide file tree
Showing 7 changed files with 97 additions and 97 deletions.
80 changes: 40 additions & 40 deletions src/Admin/AbstractAdmin.php

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions src/Admin/BaseFieldDescription.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public function __construct(
'Omitting the argument 1 for "%s()" or passing other type than "string" is deprecated'.
' since sonata-project/admin-bundle 3.78. It will accept only string in version 4.0.',
__METHOD__
), E_USER_DEPRECATED);
), \E_USER_DEPRECATED);
} else {
$this->setName($name);

Expand Down Expand Up @@ -197,7 +197,7 @@ public function setFieldName($fieldName)
'The %s() method is deprecated since sonata-project/admin-bundle 3.84'
.' and will become private in version 4.0.',
__METHOD__
), E_USER_DEPRECATED);
), \E_USER_DEPRECATED);
}

$this->fieldName = $fieldName;
Expand Down Expand Up @@ -255,7 +255,7 @@ public function setOptions(array $options)
.' and the option will be removed in 4.0.'
.' Use Symfony Form "help" option instead.',
__METHOD__
), E_USER_DEPRECATED);
), \E_USER_DEPRECATED);

$this->setHelp($options['help'], 'sonata_deprecation_mute');
unset($options['help']);
Expand Down Expand Up @@ -290,7 +290,7 @@ public function getTemplate()
'Returning other type than string or null in method %s() is deprecated since'
.' sonata-project/admin-bundle 3.65. It will return only those types in version 4.0.',
__METHOD__
), E_USER_DEPRECATED);
), \E_USER_DEPRECATED);
}

return $this->template;
Expand Down Expand Up @@ -321,7 +321,7 @@ public function getParent()
__METHOD__,
__CLASS__
),
E_USER_DEPRECATED
\E_USER_DEPRECATED
);
// NEXT_MAJOR : remove the previous `trigger_error()` call, uncomment the following exception and declare AdminInterface as return type
// throw new \LogicException(sprintf('%s has no parent.', static::class));
Expand Down Expand Up @@ -367,7 +367,7 @@ public function getAssociationAdmin()
__METHOD__,
__CLASS__
),
E_USER_DEPRECATED
\E_USER_DEPRECATED
);
// NEXT_MAJOR : remove the previous `trigger_error()` call, uncomment the following exception and declare AdminInterface as return type
// throw new \LogicException(sprintf('%s has no association admin.', static::class));
Expand Down Expand Up @@ -483,7 +483,7 @@ public function getAdmin()
__METHOD__,
__CLASS__
),
E_USER_DEPRECATED
\E_USER_DEPRECATED
);
// NEXT_MAJOR : remove the previous `trigger_error()` call, uncomment the following exception and declare AdminInterface as return type
// throw new \LogicException(sprintf('%s has no admin.', static::class));
Expand Down Expand Up @@ -525,7 +525,7 @@ public function setMappingType($mappingType)
@trigger_error(sprintf(
'The "%s()" method is deprecated since version 3.83 and will be removed in 4.0.',
__METHOD__
), E_USER_DEPRECATED);
), \E_USER_DEPRECATED);

$this->mappingType = $mappingType;
}
Expand Down Expand Up @@ -554,7 +554,7 @@ public static function camelize($property)
'The %s method is deprecated since 3.1 and will be removed in 4.0. Use %s::classify() instead.',
__METHOD__,
Inflector::class
), E_USER_DEPRECATED);
), \E_USER_DEPRECATED);

return InflectorFactory::create()->build()->classify($property);
}
Expand All @@ -575,7 +575,7 @@ public function setHelp($help)
'The "%s()" method is deprecated since sonata-project/admin-bundle 3.74 and will be removed in version 4.0.'
.' Use Symfony Form "help" option instead.',
__METHOD__
), E_USER_DEPRECATED);
), \E_USER_DEPRECATED);
}

$this->help = $help;
Expand All @@ -595,7 +595,7 @@ public function getHelp()
'The "%s()" method is deprecated since sonata-project/admin-bundle 3.74 and will be removed in version 4.0.'
.' Use Symfony Form "help" option instead.',
__METHOD__
), E_USER_DEPRECATED);
), \E_USER_DEPRECATED);
}

return $this->help;
Expand All @@ -609,7 +609,7 @@ public function getLabel()
'Returning other type than string, false or null in method %s() is deprecated since'
.' sonata-project/admin-bundle 3.65. It will return only those types in version 4.0.',
__METHOD__
), E_USER_DEPRECATED);
), \E_USER_DEPRECATED);
}

return $label;
Expand Down
36 changes: 18 additions & 18 deletions src/DependencyInjection/Admin/AbstractTaggedAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public function __construct($code, $class, $baseControllerName = null)
'Passing other type than string as argument 1 for method %s() is deprecated since'
.' sonata-project/admin-bundle 3.65. It will accept only string in version 4.0.',
__METHOD__
), E_USER_DEPRECATED);
), \E_USER_DEPRECATED);
}
$this->code = $code;

Expand All @@ -225,7 +225,7 @@ public function __construct($code, $class, $baseControllerName = null)
'Passing other type than string as argument 2 for method %s() is deprecated since'
.' sonata-project/admin-bundle 3.65. It will accept only string in version 4.0.',
__METHOD__
), E_USER_DEPRECATED);
), \E_USER_DEPRECATED);
}
$this->class = $class;

Expand All @@ -234,7 +234,7 @@ public function __construct($code, $class, $baseControllerName = null)
'Passing other type than string as argument 3 for method %s() is deprecated since'
.' sonata-project/admin-bundle 3.84. It will accept only string in version 4.0.',
__METHOD__
), E_USER_DEPRECATED);
), \E_USER_DEPRECATED);
}
$this->baseControllerName = $baseControllerName;
}
Expand Down Expand Up @@ -311,7 +311,7 @@ public function getManagerType()
'Calling %s() when no manager type is set is deprecated since sonata-project/admin-bundle 3.84'
.' and will throw a LogicException in 4.0',
__METHOD__,
), E_USER_DEPRECATED);
), \E_USER_DEPRECATED);
// throw new \LogicException(sprintf(
// 'Admin "%s" has no manager type.',
// static::class
Expand Down Expand Up @@ -384,7 +384,7 @@ public function getModelManager()
'Calling %s() when no model manager is set is deprecated since sonata-project/admin-bundle 3.84'
.' and will throw a LogicException in 4.0',
__METHOD__,
), E_USER_DEPRECATED);
), \E_USER_DEPRECATED);
// throw new \LogicException(sprintf(
// 'Admin "%s" has no model manager.',
// static::class
Expand Down Expand Up @@ -413,7 +413,7 @@ public function getDataSource(): ?DataSourceInterface
'Calling %s() when no data source is set is deprecated since sonata-project/admin-bundle 3.84'
.' and will throw a LogicException in 4.0',
__METHOD__,
), E_USER_DEPRECATED);
), \E_USER_DEPRECATED);
// throw new \LogicException(sprintf(
// 'Admin "%s" has no data source.',
// static::class
Expand Down Expand Up @@ -442,7 +442,7 @@ public function getFormContractor()
'Calling %s() when no form contractor is set is deprecated since sonata-project/admin-bundle 3.84'
.' and will throw a LogicException in 4.0',
__METHOD__,
), E_USER_DEPRECATED);
), \E_USER_DEPRECATED);
// throw new \LogicException(sprintf(
// 'Admin "%s" has no form contractor.',
// static::class
Expand Down Expand Up @@ -471,7 +471,7 @@ public function getShowBuilder()
'Calling %s() when no show builder is set is deprecated since sonata-project/admin-bundle 3.84'
.' and will throw a LogicException in 4.0',
__METHOD__,
), E_USER_DEPRECATED);
), \E_USER_DEPRECATED);
// throw new \LogicException(sprintf(
// 'Admin "%s" has no show builder.',
// static::class
Expand Down Expand Up @@ -500,7 +500,7 @@ public function getListBuilder()
'Calling %s() when no list build is set is deprecated since sonata-project/admin-bundle 3.84'
.' and will throw a LogicException in 4.0',
__METHOD__,
), E_USER_DEPRECATED);
), \E_USER_DEPRECATED);
// throw new \LogicException(sprintf(
// 'Admin "%s" has no list builder.',
// static::class
Expand Down Expand Up @@ -529,7 +529,7 @@ public function getDatagridBuilder()
'Calling %s() when no datagrid builder is set is deprecated since sonata-project/admin-bundle 3.84'
.' and will throw a LogicException in 4.0',
__METHOD__,
), E_USER_DEPRECATED);
), \E_USER_DEPRECATED);
// throw new \LogicException(sprintf(
// 'Admin "%s" has no datagrid builder.',
// static::class
Expand Down Expand Up @@ -558,7 +558,7 @@ public function getTranslator()
'Calling %s() when no translator is set is deprecated since sonata-project/admin-bundle 3.84'
.' and will throw a LogicException in 4.0',
__METHOD__,
), E_USER_DEPRECATED);
), \E_USER_DEPRECATED);
// throw new \LogicException(sprintf(
// 'Admin "%s" has no translator.',
// static::class
Expand Down Expand Up @@ -588,7 +588,7 @@ public function getConfigurationPool()
'Calling %s() when no pool is set is deprecated since sonata-project/admin-bundle 3.84'
.' and will throw a LogicException in 4.0',
__METHOD__,
), E_USER_DEPRECATED);
), \E_USER_DEPRECATED);
}
// throw new \LogicException(sprintf(
// 'Admin "%s" has no pool.',
Expand Down Expand Up @@ -618,7 +618,7 @@ public function getRouteGenerator()
'Calling %s() when no route generator is set is deprecated since sonata-project/admin-bundle 3.84'
.' and will throw a LogicException in 4.0',
__METHOD__,
), E_USER_DEPRECATED);
), \E_USER_DEPRECATED);
// throw new \LogicException(sprintf(
// 'Admin "%s" has no route generator.',
// static::class
Expand Down Expand Up @@ -656,7 +656,7 @@ public function getValidator()
@trigger_error(sprintf(
'The %s method is deprecated since version 3.83 and will be removed in 4.0.',
__METHOD__
), E_USER_DEPRECATED);
), \E_USER_DEPRECATED);

return $this->validator;
}
Expand All @@ -680,7 +680,7 @@ public function getSecurityHandler()
'Calling %s() when no security handler is set is deprecated since sonata-project/admin-bundle 3.84'
.' and will throw a LogicException in 4.0',
__METHOD__,
), E_USER_DEPRECATED);
), \E_USER_DEPRECATED);
// throw new \LogicException(sprintf(
// 'Admin "%s" has no security handler.',
// static::class
Expand Down Expand Up @@ -709,7 +709,7 @@ public function getMenuFactory()
'Calling %s() when no security handler is set is deprecated since sonata-project/admin-bundle 3.84'
.' and will throw a LogicException in 4.0',
__METHOD__,
), E_USER_DEPRECATED);
), \E_USER_DEPRECATED);
// throw new \LogicException(sprintf(
// 'Admin "%s" has no security handler.',
// static::class
Expand Down Expand Up @@ -738,7 +738,7 @@ public function getRouteBuilder()
'Calling %s() when no route builder is set is deprecated since sonata-project/admin-bundle 3.84'
.' and will throw a LogicException in 4.0',
__METHOD__,
), E_USER_DEPRECATED);
), \E_USER_DEPRECATED);
// throw new \LogicException(sprintf(
// 'Admin "%s" has no route builder.',
// static::class
Expand Down Expand Up @@ -767,7 +767,7 @@ public function getLabelTranslatorStrategy()
'Calling %s() when no label translator strategy is set is deprecated since sonata-project/admin-bundle 3.84'
.' and will throw a LogicException in 4.0',
__METHOD__,
), E_USER_DEPRECATED);
), \E_USER_DEPRECATED);
// throw new \LogicException(sprintf(
// 'Admin "%s" has no label translator strategy.',
// static::class
Expand Down
4 changes: 2 additions & 2 deletions src/Filter/Filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public function setValue($value)
@trigger_error(sprintf(
'Method %s() is deprecated since sonata-project/admin-bundle 3.84 and will be removed in version 4.0.',
__METHOD__,
), E_USER_DEPRECATED);
), \E_USER_DEPRECATED);

$this->value = $value;
}
Expand All @@ -218,7 +218,7 @@ public function getValue()
@trigger_error(sprintf(
'Method %s() is deprecated since sonata-project/admin-bundle 3.84 and will be removed in version 4.0.',
__METHOD__,
), E_USER_DEPRECATED);
), \E_USER_DEPRECATED);

return $this->value;
}
Expand Down
12 changes: 6 additions & 6 deletions src/Twig/Extension/RenderElementExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public function renderViewElement(
.' since sonata-project/admin-bundle 3.67 and will throw an exception in 4.0.',
$fieldDescription->getName(),
),
E_USER_DEPRECATED
\E_USER_DEPRECATED
);

$value = null;
Expand Down Expand Up @@ -203,7 +203,7 @@ public function renderViewElementCompare(
.' since sonata-project/admin-bundle 3.67 and will throw an exception in 4.0.',
$fieldDescription->getName(),
),
E_USER_DEPRECATED
\E_USER_DEPRECATED
);

$baseValue = null;
Expand All @@ -219,7 +219,7 @@ public function renderViewElementCompare(
.' since sonata-project/admin-bundle 3.67 and will throw an exception in 4.0.',
$fieldDescription->getName(),
),
E_USER_DEPRECATED
\E_USER_DEPRECATED
);

$compareValue = null;
Expand Down Expand Up @@ -276,7 +276,7 @@ public function renderRelationElement($element, FieldDescriptionInterface $field
if ($method) {
@trigger_error(
'Option "associated_tostring" is deprecated since version 2.3 and will be removed in 4.0. Use "associated_property" instead.',
E_USER_DEPRECATED
\E_USER_DEPRECATED
);
} else {
$method = '__toString';
Expand Down Expand Up @@ -325,7 +325,7 @@ public function getTemplate(
'Relying on default template loading on field template loading exception is deprecated since 3.1'
.' and will be removed in 4.0. A %s exception will be thrown instead',
LoaderError::class
), E_USER_DEPRECATED);
), \E_USER_DEPRECATED);
$template = $environment->load($defaultTemplate);

if (null !== $this->logger) {
Expand Down Expand Up @@ -380,7 +380,7 @@ private function getObjectAndValueFromListElement(
.' since sonata-project/admin-bundle 3.67 and will throw an exception in 4.0.',
$fieldDescription->getName(),
),
E_USER_DEPRECATED
\E_USER_DEPRECATED
);

$value = null;
Expand Down
Loading

0 comments on commit 6b4a77a

Please sign in to comment.