Format code using php-cs-fixer

This commit is contained in:
jo 2021-10-11 16:10:47 +02:00
parent 43d7dc92cd
commit d52c6184b9
352 changed files with 17473 additions and 17041 deletions

View file

@ -11,78 +11,78 @@ class Application_Form_AddShowWhat extends Zend_Form_SubForm
// Hidden element to indicate whether the show is new or
// whether we are updating an existing show.
$this->addElement('hidden', 'add_show_id', array(
'decorators' => array('ViewHelper')
));
$this->addElement('hidden', 'add_show_id', [
'decorators' => ['ViewHelper'],
]);
// Hidden element to indicate the instance id of the show
// being edited.
$this->addElement('hidden', 'add_show_instance_id', array(
'decorators' => array('ViewHelper')
));
$this->addElement('hidden', 'add_show_instance_id', [
'decorators' => ['ViewHelper'],
]);
// Add name element
$this->addElement('text', 'add_show_name', array(
'label' => _('Name:'),
'class' => 'input_text',
'required' => true,
'filters' => array('StringTrim'),
'value' => _('Untitled Show'),
'validators' => array($notEmptyValidator, array('StringLength', false, array(0, $maxLens['name'])))
));
$this->addElement('text', 'add_show_name', [
'label' => _('Name:'),
'class' => 'input_text',
'required' => true,
'filters' => ['StringTrim'],
'value' => _('Untitled Show'),
'validators' => [$notEmptyValidator, ['StringLength', false, [0, $maxLens['name']]]],
]);
// Add URL element
$this->addElement('text', 'add_show_url', array(
'label' => _('URL:'),
'class' => 'input_text',
'required' => false,
'filters' => array('StringTrim'),
'validators' => array($notEmptyValidator, array('StringLength', false, array(0, $maxLens['url'])))
));
// Add URL element
$this->addElement('text', 'add_show_url', [
'label' => _('URL:'),
'class' => 'input_text',
'required' => false,
'filters' => ['StringTrim'],
'validators' => [$notEmptyValidator, ['StringLength', false, [0, $maxLens['url']]]],
]);
// Add genre element
$this->addElement('text', 'add_show_genre', array(
'label' => _('Genre:'),
'class' => 'input_text',
'required' => false,
'filters' => array('StringTrim'),
'validators' => array(array('StringLength', false, array(0, $maxLens['genre'])))
));
// Add genre element
$this->addElement('text', 'add_show_genre', [
'label' => _('Genre:'),
'class' => 'input_text',
'required' => false,
'filters' => ['StringTrim'],
'validators' => [['StringLength', false, [0, $maxLens['genre']]]],
]);
// Add the description element
$this->addElement('textarea', 'add_show_description', array(
'label' => _('Description:'),
'required' => false,
'class' => 'input_text_area',
'validators' => array(array('StringLength', false, array(0, $maxLens['description'])))
));
// Add the description element
$this->addElement('textarea', 'add_show_description', [
'label' => _('Description:'),
'required' => false,
'class' => 'input_text_area',
'validators' => [['StringLength', false, [0, $maxLens['description']]]],
]);
$descText = $this->getElement('add_show_description');
$descText->setDecorators(array(array('ViewScript', array(
$descText->setDecorators([['ViewScript', [
'viewScript' => 'form/add-show-block.phtml',
'class' => 'block-display'
))));
'class' => 'block-display',
]]]);
// Add the instance description
$this->addElement('textarea', 'add_show_instance_description', array(
'label' => _('Instance Description:'),
'required' => false,
'class' => 'input_text_area',
'validators' => array(array('StringLength', false, array(0, $maxLens['description'])))
));
$this->addElement('textarea', 'add_show_instance_description', [
'label' => _('Instance Description:'),
'required' => false,
'class' => 'input_text_area',
'validators' => [['StringLength', false, [0, $maxLens['description']]]],
]);
$instanceDesc = $this->getElement('add_show_instance_description');
$instanceDesc->setDecorators(array(array('ViewScript', array(
'viewScript' => 'form/add-show-block.phtml',
'class' => 'block-display'
))));
$instanceDesc->setAttrib('disabled','disabled');
$instanceDesc->setDecorators([['ViewScript', [
'viewScript' => 'form/add-show-block.phtml',
'class' => 'block-display',
]]]);
$instanceDesc->setAttrib('disabled', 'disabled');
}
/**
* Enable the instance description when editing a show instance
* Enable the instance description when editing a show instance.
*/
public function enableInstanceDesc()
{
@ -97,7 +97,7 @@ class Application_Form_AddShowWhat extends Zend_Form_SubForm
$elements = $this->getElements();
foreach ($elements as $element) {
if ($element->getType() != 'Zend_Form_Element_Hidden') {
$element->setAttrib('disabled','disabled');
$element->setAttrib('disabled', 'disabled');
}
}
}
@ -107,7 +107,7 @@ class Application_Form_AddShowWhat extends Zend_Form_SubForm
$elements = $this->getElements();
foreach ($elements as $element) {
if ($element->getType() != 'Zend_Form_Element_Hidden') {
$element->setAttrib('readonly','readonly');
$element->setAttrib('readonly', 'readonly');
}
}
}