Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Namespace Redaxo\Core\Form\Select #6091

Merged
merged 4 commits into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 45 additions & 45 deletions .tools/phpstan/baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,6 @@ parameters:
count: 2
path: ../../redaxo/src/core/lib/login/api_user_impersonate.php

-
message: "#^Method rex_media_category_select\\:\\:__construct\\(\\) has parameter \\$checkPerms with no type specified\\.$#"
count: 1
path: ../../redaxo/src/core/lib/mediapool/media_category_select.php

-
message: "#^Method rex_var_media\\:\\:getWidget\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#"
count: 1
Expand Down Expand Up @@ -340,21 +335,11 @@ parameters:
count: 1
path: ../../redaxo/src/core/lib/response.php

-
message: "#^Method rex_select\\:\\:addOptions\\(\\) has parameter \\$options with no type specified\\.$#"
count: 1
path: ../../redaxo/src/core/lib/select.php

-
message: "#^Method rex_setup\\:\\:checkDb\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#"
count: 1
path: ../../redaxo/src/core/lib/setup/setup.php

-
message: "#^Method rex_event_select\\:\\:__construct\\(\\) has parameter \\$options with no type specified\\.$#"
count: 1
path: ../../redaxo/src/core/lib/structure/content/event_select.php

-
message: "#^Method rex_extension_point_slice_menu\\:\\:addAdditionalActions\\(\\) has parameter \\$additionalActions with no value type specified in iterable type array\\.$#"
count: 1
Expand Down Expand Up @@ -415,36 +400,6 @@ parameters:
count: 1
path: ../../redaxo/src/core/lib/structure/navigation.php

-
message: "#^Method rex_category_select\\:\\:__construct\\(\\) has parameter \\$addHomepage with no type specified\\.$#"
count: 1
path: ../../redaxo/src/core/lib/structure/select_category.php

-
message: "#^Method rex_category_select\\:\\:__construct\\(\\) has parameter \\$checkPerms with no type specified\\.$#"
count: 1
path: ../../redaxo/src/core/lib/structure/select_category.php

-
message: "#^Method rex_category_select\\:\\:__construct\\(\\) has parameter \\$clang with no type specified\\.$#"
count: 1
path: ../../redaxo/src/core/lib/structure/select_category.php

-
message: "#^Method rex_category_select\\:\\:__construct\\(\\) has parameter \\$ignoreOfflines with no type specified\\.$#"
count: 1
path: ../../redaxo/src/core/lib/structure/select_category.php

-
message: "#^Method rex_category_select\\:\\:addCatOption\\(\\) has parameter \\$group with no type specified\\.$#"
count: 1
path: ../../redaxo/src/core/lib/structure/select_category.php

-
message: "#^Right side of && is always false\\.$#"
count: 1
path: ../../redaxo/src/core/lib/structure/select_category.php

-
message: "#^Method rex_var_article\\:\\:getArticle\\(\\) has parameter \\$clang with no type specified\\.$#"
count: 1
Expand Down Expand Up @@ -1145,6 +1100,51 @@ parameters:
count: 1
path: ../../src/Form/Form.php

-
message: "#^Method Redaxo\\\\Core\\\\Form\\\\Select\\\\ActionEventSelect\\:\\:__construct\\(\\) has parameter \\$options with no type specified\\.$#"
count: 1
path: ../../src/Form/Select/ActionEventSelect.php

-
message: "#^Method Redaxo\\\\Core\\\\Form\\\\Select\\\\CategorySelect\\:\\:__construct\\(\\) has parameter \\$addHomepage with no type specified\\.$#"
count: 1
path: ../../src/Form/Select/CategorySelect.php

-
message: "#^Method Redaxo\\\\Core\\\\Form\\\\Select\\\\CategorySelect\\:\\:__construct\\(\\) has parameter \\$checkPerms with no type specified\\.$#"
count: 1
path: ../../src/Form/Select/CategorySelect.php

-
message: "#^Method Redaxo\\\\Core\\\\Form\\\\Select\\\\CategorySelect\\:\\:__construct\\(\\) has parameter \\$clang with no type specified\\.$#"
count: 1
path: ../../src/Form/Select/CategorySelect.php

-
message: "#^Method Redaxo\\\\Core\\\\Form\\\\Select\\\\CategorySelect\\:\\:__construct\\(\\) has parameter \\$ignoreOfflines with no type specified\\.$#"
count: 1
path: ../../src/Form/Select/CategorySelect.php

-
message: "#^Method Redaxo\\\\Core\\\\Form\\\\Select\\\\CategorySelect\\:\\:addCatOption\\(\\) has parameter \\$group with no type specified\\.$#"
count: 1
path: ../../src/Form/Select/CategorySelect.php

-
message: "#^Right side of && is always false\\.$#"
count: 1
path: ../../src/Form/Select/CategorySelect.php

-
message: "#^Method Redaxo\\\\Core\\\\Form\\\\Select\\\\MediaCategorySelect\\:\\:__construct\\(\\) has parameter \\$checkPerms with no type specified\\.$#"
count: 1
path: ../../src/Form/Select/MediaCategorySelect.php

-
message: "#^Method Redaxo\\\\Core\\\\Form\\\\Select\\\\Select\\:\\:addOptions\\(\\) has parameter \\$options with no type specified\\.$#"
count: 1
path: ../../src/Form/Select/Select.php

-
message: "#^Method Redaxo\\\\Core\\\\Language\\\\LanguagePermission\\:\\:getClangs\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
Expand Down
142 changes: 71 additions & 71 deletions .tools/psalm/baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1169,11 +1169,6 @@
<code><![CDATA[$impersonate]]></code>
</MixedAssignment>
</file>
<file src="redaxo/src/core/lib/mediapool/media_category_select.php">
<MixedAssignment>
<code><![CDATA[$this->checkPerms]]></code>
</MixedAssignment>
</file>
<file src="redaxo/src/core/lib/mediapool/var_media.php">
<MixedArgument>
<code><![CDATA[$avalue]]></code>
Expand Down Expand Up @@ -1289,25 +1284,6 @@
<code><![CDATA[$path]]></code>
</RedundantCondition>
</file>
<file src="redaxo/src/core/lib/select.php">
<MixedArgument>
<code><![CDATA[$option[0]]]></code>
<code><![CDATA[$option[0]]]></code>
<code><![CDATA[$option[0]]]></code>
<code><![CDATA[$option[0]]]></code>
<code><![CDATA[$option[1]]]></code>
<code><![CDATA[$option[1]]]></code>
<code><![CDATA[$option[1]]]></code>
<code><![CDATA[$option[2]]]></code>
<code><![CDATA[$option[3]]]></code>
</MixedArgument>
<MixedArgumentTypeCoercion>
<code><![CDATA[$attributes]]></code>
</MixedArgumentTypeCoercion>
<MixedAssignment>
<code><![CDATA[$option]]></code>
</MixedAssignment>
</file>
<file src="redaxo/src/core/lib/setup/setup.php">
<MixedArgument>
<code><![CDATA[$config['db'][1]['host']]]></code>
Expand Down Expand Up @@ -1362,39 +1338,6 @@
<code><![CDATA[getCategoryId]]></code>
</PossiblyNullReference>
</file>
<file src="redaxo/src/core/lib/structure/content/event_select.php">
<MixedArgument>
<code><![CDATA[$key]]></code>
<code><![CDATA[$options]]></code>
<code><![CDATA[$value]]></code>
</MixedArgument>
<MixedAssignment>
<code><![CDATA[$key]]></code>
<code><![CDATA[$value]]></code>
</MixedAssignment>
</file>
<file src="redaxo/src/core/lib/structure/content/select_template.php">
<ArgumentTypeCoercion>
<code><![CDATA[$selected]]></code>
</ArgumentTypeCoercion>
<InvalidArrayOffset>
<code><![CDATA[$templates[$selected]]]></code>
<code><![CDATA[$templates[$selected]]]></code>
</InvalidArrayOffset>
<MixedArgument>
<code><![CDATA[$templateName]]></code>
</MixedArgument>
<MixedAssignment>
<code><![CDATA[$templateName]]></code>
</MixedAssignment>
<MixedPropertyTypeCoercion>
<code><![CDATA[$this->templates]]></code>
</MixedPropertyTypeCoercion>
<MixedReturnTypeCoercion>
<code><![CDATA[$this->templates]]></code>
<code><![CDATA[array<int, string>]]></code>
</MixedReturnTypeCoercion>
</file>
<file src="redaxo/src/core/lib/structure/content/var_template.php">
<PossiblyFalseArgument>
<code><![CDATA[$tmpl]]></code>
Expand Down Expand Up @@ -1485,20 +1428,6 @@
<code><![CDATA[$this->callbacks]]></code>
</PropertyTypeCoercion>
</file>
<file src="redaxo/src/core/lib/structure/select_category.php">
<MixedArgument>
<code><![CDATA[$group]]></code>
</MixedArgument>
<MixedAssignment>
<code><![CDATA[$this->addHomepage]]></code>
<code><![CDATA[$this->checkPerms]]></code>
<code><![CDATA[$this->clang]]></code>
<code><![CDATA[$this->ignoreOfflines]]></code>
</MixedAssignment>
<RedundantCondition>
<code><![CDATA[$this->checkPerms]]></code>
</RedundantCondition>
</file>
<file src="redaxo/src/core/lib/structure/system_setting_article_id.php">
<MixedArgument>
<code><![CDATA[Core::getConfig($this->key, 1)]]></code>
Expand Down Expand Up @@ -3634,6 +3563,77 @@
<code><![CDATA[$this->languageSupport['id']]]></code>
</MixedArgument>
</file>
<file src="src/Form/Select/ActionEventSelect.php">
<MixedArgument>
<code><![CDATA[$key]]></code>
<code><![CDATA[$options]]></code>
<code><![CDATA[$value]]></code>
</MixedArgument>
<MixedAssignment>
<code><![CDATA[$key]]></code>
<code><![CDATA[$value]]></code>
</MixedAssignment>
</file>
<file src="src/Form/Select/CategorySelect.php">
<MixedArgument>
<code><![CDATA[$group]]></code>
</MixedArgument>
<MixedAssignment>
<code><![CDATA[$this->addHomepage]]></code>
<code><![CDATA[$this->checkPerms]]></code>
<code><![CDATA[$this->clang]]></code>
<code><![CDATA[$this->ignoreOfflines]]></code>
</MixedAssignment>
<RedundantCondition>
<code><![CDATA[$this->checkPerms]]></code>
</RedundantCondition>
</file>
<file src="src/Form/Select/MediaCategorySelect.php">
<MixedAssignment>
<code><![CDATA[$this->checkPerms]]></code>
</MixedAssignment>
</file>
<file src="src/Form/Select/Select.php">
<MixedArgument>
<code><![CDATA[$option[0]]]></code>
<code><![CDATA[$option[0]]]></code>
<code><![CDATA[$option[0]]]></code>
<code><![CDATA[$option[0]]]></code>
<code><![CDATA[$option[1]]]></code>
<code><![CDATA[$option[1]]]></code>
<code><![CDATA[$option[1]]]></code>
<code><![CDATA[$option[2]]]></code>
<code><![CDATA[$option[3]]]></code>
</MixedArgument>
<MixedArgumentTypeCoercion>
<code><![CDATA[$attributes]]></code>
</MixedArgumentTypeCoercion>
<MixedAssignment>
<code><![CDATA[$option]]></code>
</MixedAssignment>
</file>
<file src="src/Form/Select/TemplateSelect.php">
<ArgumentTypeCoercion>
<code><![CDATA[$selected]]></code>
</ArgumentTypeCoercion>
<InvalidArrayOffset>
<code><![CDATA[$templates[$selected]]]></code>
<code><![CDATA[$templates[$selected]]]></code>
</InvalidArrayOffset>
<MixedArgument>
<code><![CDATA[$templateName]]></code>
</MixedArgument>
<MixedAssignment>
<code><![CDATA[$templateName]]></code>
</MixedAssignment>
<MixedPropertyTypeCoercion>
<code><![CDATA[$this->templates]]></code>
</MixedPropertyTypeCoercion>
<MixedReturnTypeCoercion>
<code><![CDATA[$this->templates]]></code>
<code><![CDATA[array<int, string>]]></code>
</MixedReturnTypeCoercion>
</file>
<file src="src/Language/Language.php">
<MixedArrayAccess>
<code><![CDATA[$data['priority']]]></code>
Expand Down
5 changes: 5 additions & 0 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,11 @@
'rex_form_raw_element' => Form\Field\RawField::class,
'rex_form_widget_linkmap_element' => Form\Field\ArticleField::class,
'rex_form_widget_media_element' => Form\Field\MediaField::class,
'rex_select' => Form\Select\Select::class,
'rex_event_select' => Form\Select\ActionEventSelect::class,
'rex_category_select' => Form\Select\CategorySelect::class,
'rex_media_category_select' => Form\Select\MediaCategorySelect::class,
'rex_template_select' => Form\Select\TemplateSelect::class,
'rex_formatter' => Util\Formatter::class,
'rex_i18n' => Translation\I18n::class,
'rex_input' => MetaInfo\Form\Input\AbstractInput::class,
Expand Down
3 changes: 2 additions & 1 deletion redaxo/src/core/functions/function_rex_mediapool.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

use Redaxo\Core\Core;
use Redaxo\Core\Filesystem\Url;
use Redaxo\Core\Form\Select\MediaCategorySelect;
use Redaxo\Core\Security\CsrfToken;
use Redaxo\Core\Translation\I18n;
use Redaxo\Core\Util\Formatter;
Expand All @@ -17,7 +18,7 @@ function rex_mediapool_Mediaform($formTitle, $buttonTitle, $rexFileCategory, $fi

$s = '';

$catsSel = new rex_media_category_select();
$catsSel = new MediaCategorySelect();
$catsSel->setStyle('class="form-control"');
$catsSel->setSize(1);
$catsSel->setName('rex_file_category');
Expand Down
5 changes: 3 additions & 2 deletions redaxo/src/core/pages/backup.export.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Redaxo\Core\Filesystem\Finder;
use Redaxo\Core\Filesystem\Path;
use Redaxo\Core\Filesystem\Url;
use Redaxo\Core\Form\Select\Select;
use Redaxo\Core\Security\CsrfToken;
use Redaxo\Core\Translation\I18n;
use Redaxo\Core\Util\Str;
Expand Down Expand Up @@ -155,7 +156,7 @@
$fragment->setVar('elements', $formElements, false);
$content .= $fragment->parse('core/form/form.php');

$tableSelect = new rex_select();
$tableSelect = new Select();
$tableSelect->setMultiple();
$tableSelect->setId('rex-form-exporttables');
$tableSelect->setSize(20);
Expand Down Expand Up @@ -188,7 +189,7 @@
$formElements[] = $n;

// Vorhandene Exporte auslesen
$selDirs = new rex_select();
$selDirs = new Select();
$selDirs->setId('rex-form-exportdir');
$selDirs->setName('EXPDIR[]');
$selDirs->setMultiple();
Expand Down
3 changes: 2 additions & 1 deletion redaxo/src/core/pages/media_manager.settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

use Redaxo\Core\Core;
use Redaxo\Core\Filesystem\Url;
use Redaxo\Core\Form\Select\Select;
use Redaxo\Core\MediaManager\MediaManager;
use Redaxo\Core\Translation\I18n;

Expand Down Expand Up @@ -111,7 +112,7 @@
$n['field'] = $inputGroup;
$formElements[] = $n;

$select = new rex_select();
$select = new Select();
$select->setName('settings[media_manager_interlace][]');
$select->setId('rex-media-manager-interlace');
$select->setAttribute('class', 'form-control selectpicker');
Expand Down
3 changes: 2 additions & 1 deletion redaxo/src/core/pages/mediapool.media.detail.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Redaxo\Core\Filesystem\File;
use Redaxo\Core\Filesystem\Path;
use Redaxo\Core\Filesystem\Url;
use Redaxo\Core\Form\Select\MediaCategorySelect;
use Redaxo\Core\MediaManager\MediaManager;
use Redaxo\Core\MediaPool\Media;
use Redaxo\Core\MediaPool\MediaCategory;
Expand Down Expand Up @@ -210,7 +211,7 @@
if ($TPERM) {
$panel = '';

$catsSel = new rex_media_category_select();
$catsSel = new MediaCategorySelect();
$catsSel->setStyle('class="form-control"');
$catsSel->setSize(1);
$catsSel->setName('rex_file_category');
Expand Down
Loading
Loading