phpstan level 3, fixed deprecations, code cleanup (#811)
This commit is contained in:
@@ -28,9 +28,6 @@ class EnhancedChoiceTypeExtension extends AbstractTypeExtension
|
||||
*/
|
||||
protected $type = null;
|
||||
|
||||
/**
|
||||
* @param null|string $type
|
||||
*/
|
||||
public function __construct(ThemeConfiguration $configuration)
|
||||
{
|
||||
$this->type = $configuration->getSelectPicker();
|
||||
|
||||
@@ -79,7 +79,7 @@ abstract class AbstractToolbarForm extends AbstractType
|
||||
|
||||
/**
|
||||
* @param FormBuilderInterface $builder
|
||||
* @param null|string $label
|
||||
* @param string $label
|
||||
*/
|
||||
protected function addVisibilityChoice(FormBuilderInterface $builder, string $label = 'label.visible')
|
||||
{
|
||||
|
||||
@@ -42,8 +42,8 @@ class ActivityType extends AbstractType
|
||||
|
||||
/**
|
||||
* @param Activity $choiceValue
|
||||
* @param $key
|
||||
* @param $value
|
||||
* @param string $key
|
||||
* @param mixed $value
|
||||
* @return array
|
||||
*/
|
||||
public function choiceAttr($choiceValue, $key, $value)
|
||||
|
||||
@@ -78,7 +78,7 @@ class DateRangeType extends AbstractType
|
||||
* A better way would be to use the Intl NumberFormatter, but if that is not available
|
||||
* and the Symfony polyfill is used, this method would not work properly.
|
||||
*
|
||||
* @param $string
|
||||
* @param string $string
|
||||
* @return string
|
||||
*/
|
||||
protected function convertArabicPersian($string)
|
||||
|
||||
@@ -24,8 +24,8 @@ class ProjectType extends AbstractType
|
||||
{
|
||||
/**
|
||||
* @param Project $choiceValue
|
||||
* @param $key
|
||||
* @param $value
|
||||
* @param string $key
|
||||
* @param mixed $value
|
||||
* @return array
|
||||
*/
|
||||
public function choiceAttr($choiceValue, $key, $value)
|
||||
|
||||
@@ -24,7 +24,6 @@ class UserRoleType extends AbstractType
|
||||
protected $roles = [];
|
||||
|
||||
/**
|
||||
* UserRolesType constructor.
|
||||
* @param string[] $roles
|
||||
*/
|
||||
public function __construct(array $roles = [])
|
||||
@@ -38,11 +37,12 @@ class UserRoleType extends AbstractType
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
$roles = [];
|
||||
/* @var string[] $value */
|
||||
foreach ($this->roles as $key => $value) {
|
||||
$roles[$key] = $key;
|
||||
foreach ($value as $value2) {
|
||||
$roles[$value2] = $value2;
|
||||
if (is_array($value)) {
|
||||
foreach ($value as $value2) {
|
||||
$roles[$value2] = $value2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user