Loading core/.phpstan-baseline.php +0 −12 Original line number Diff line number Diff line Loading @@ -17491,18 +17491,6 @@ 'count' => 1, 'path' => __DIR__ . '/modules/file/tests/file_module_test/src/Form/FileModuleTestForm.php', ]; $ignoreErrors[] = [ 'message' => '#^Method Drupal\\\\file_test\\\\Form\\\\FileTestForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', 'identifier' => 'missingType.return', 'count' => 1, 'path' => __DIR__ . '/modules/file/tests/file_test/src/Form/FileTestForm.php', ]; $ignoreErrors[] = [ 'message' => '#^Method Drupal\\\\file_test\\\\Form\\\\FileTestForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', 'identifier' => 'missingType.return', 'count' => 1, 'path' => __DIR__ . '/modules/file/tests/file_test/src/Form/FileTestForm.php', ]; $ignoreErrors[] = [ 'message' => '#^Method Drupal\\\\file_test\\\\Form\\\\FileTestSaveUploadFromForm\\:\\:create\\(\\) has no return type specified\\.$#', 'identifier' => 'missingType.return', core/modules/file/tests/file_test/src/Form/FileRequiredTestForm.php +2 −2 Original line number Diff line number Diff line Loading @@ -14,14 +14,14 @@ class FileRequiredTestForm extends FileTestForm { /** * {@inheritdoc} */ public function getFormId() { public function getFormId(): string { return '_file_required_test_form'; } /** * {@inheritdoc} */ public function buildForm(array $form, FormStateInterface $form_state) { public function buildForm(array $form, FormStateInterface $form_state): array { $form = parent::buildForm($form, $form_state); $form['file_test_upload']['#required'] = TRUE; return $form; Loading core/modules/file/tests/file_test/src/Form/FileTestForm.php +5 −10 Original line number Diff line number Diff line Loading @@ -6,28 +6,28 @@ use Drupal\Core\File\FileExists; use Drupal\Core\File\FileSystemInterface; use Drupal\Core\Form\FormInterface; use Drupal\Core\Form\FormBase; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\StringTranslation\StringTranslationTrait; /** * File test form class. */ class FileTestForm implements FormInterface { class FileTestForm extends FormBase { use FileTestFormTrait; use StringTranslationTrait; /** * {@inheritdoc} */ public function getFormId() { public function getFormId(): string { return '_file_test_form'; } /** * {@inheritdoc} */ public function buildForm(array $form, FormStateInterface $form_state) { public function buildForm(array $form, FormStateInterface $form_state): array { $form = $this->baseForm($form, $form_state); Loading @@ -42,12 +42,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { /** * {@inheritdoc} */ public function validateForm(array &$form, FormStateInterface $form_state) {} /** * {@inheritdoc} */ public function submitForm(array &$form, FormStateInterface $form_state) { public function submitForm(array &$form, FormStateInterface $form_state): void { // Process the upload and perform validation. Note: we're using the // form value for the $replace parameter. if (!$form_state->isValueEmpty('file_subdir')) { Loading Loading
core/.phpstan-baseline.php +0 −12 Original line number Diff line number Diff line Loading @@ -17491,18 +17491,6 @@ 'count' => 1, 'path' => __DIR__ . '/modules/file/tests/file_module_test/src/Form/FileModuleTestForm.php', ]; $ignoreErrors[] = [ 'message' => '#^Method Drupal\\\\file_test\\\\Form\\\\FileTestForm\\:\\:submitForm\\(\\) has no return type specified\\.$#', 'identifier' => 'missingType.return', 'count' => 1, 'path' => __DIR__ . '/modules/file/tests/file_test/src/Form/FileTestForm.php', ]; $ignoreErrors[] = [ 'message' => '#^Method Drupal\\\\file_test\\\\Form\\\\FileTestForm\\:\\:validateForm\\(\\) has no return type specified\\.$#', 'identifier' => 'missingType.return', 'count' => 1, 'path' => __DIR__ . '/modules/file/tests/file_test/src/Form/FileTestForm.php', ]; $ignoreErrors[] = [ 'message' => '#^Method Drupal\\\\file_test\\\\Form\\\\FileTestSaveUploadFromForm\\:\\:create\\(\\) has no return type specified\\.$#', 'identifier' => 'missingType.return',
core/modules/file/tests/file_test/src/Form/FileRequiredTestForm.php +2 −2 Original line number Diff line number Diff line Loading @@ -14,14 +14,14 @@ class FileRequiredTestForm extends FileTestForm { /** * {@inheritdoc} */ public function getFormId() { public function getFormId(): string { return '_file_required_test_form'; } /** * {@inheritdoc} */ public function buildForm(array $form, FormStateInterface $form_state) { public function buildForm(array $form, FormStateInterface $form_state): array { $form = parent::buildForm($form, $form_state); $form['file_test_upload']['#required'] = TRUE; return $form; Loading
core/modules/file/tests/file_test/src/Form/FileTestForm.php +5 −10 Original line number Diff line number Diff line Loading @@ -6,28 +6,28 @@ use Drupal\Core\File\FileExists; use Drupal\Core\File\FileSystemInterface; use Drupal\Core\Form\FormInterface; use Drupal\Core\Form\FormBase; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\StringTranslation\StringTranslationTrait; /** * File test form class. */ class FileTestForm implements FormInterface { class FileTestForm extends FormBase { use FileTestFormTrait; use StringTranslationTrait; /** * {@inheritdoc} */ public function getFormId() { public function getFormId(): string { return '_file_test_form'; } /** * {@inheritdoc} */ public function buildForm(array $form, FormStateInterface $form_state) { public function buildForm(array $form, FormStateInterface $form_state): array { $form = $this->baseForm($form, $form_state); Loading @@ -42,12 +42,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { /** * {@inheritdoc} */ public function validateForm(array &$form, FormStateInterface $form_state) {} /** * {@inheritdoc} */ public function submitForm(array &$form, FormStateInterface $form_state) { public function submitForm(array &$form, FormStateInterface $form_state): void { // Process the upload and perform validation. Note: we're using the // form value for the $replace parameter. if (!$form_state->isValueEmpty('file_subdir')) { Loading