Skip to content

Commit

Permalink
CS aktualisiert (#5597)
Browse files Browse the repository at this point in the history
  • Loading branch information
gharlan committed Feb 20, 2023
1 parent 1efcf5c commit ccabcd4
Show file tree
Hide file tree
Showing 21 changed files with 84 additions and 103 deletions.
16 changes: 4 additions & 12 deletions .tools/rector/Rule/UnderscoreToCamelCaseVariableNameRector.php
Expand Up @@ -19,24 +19,16 @@

final class UnderscoreToCamelCaseVariableNameRector extends AbstractRector
{
/**
* @var ReservedKeywordAnalyzer
*/
/** @var ReservedKeywordAnalyzer */
private $reservedKeywordAnalyzer;

/**
* @var ParamRenameFactory
*/
/** @var ParamRenameFactory */
private $paramRenameFactory;

/**
* @var UnderscoreCamelCaseExpectedNameResolver
*/
/** @var UnderscoreCamelCaseExpectedNameResolver */
private $underscoreCamelCaseExpectedNameResolver;

/**
* @var ParamRenamer
*/
/** @var ParamRenamer */
private $paramRenamer;

public function __construct(
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Expand Up @@ -16,15 +16,15 @@
"j13k/yaml-lint": "@dev",
"jetbrains/phpstorm-attributes": "^1.0",
"phpstan/extension-installer": "1.2.0",
"phpstan/phpstan": "1.9.17",
"phpstan/phpstan": "1.9.18",
"phpstan/phpstan-deprecation-rules": "1.1.1",
"phpstan/phpstan-phpunit": "1.3.4",
"phpstan/phpstan-symfony": "1.2.23",
"phpunit/phpunit": "^10.0.7",
"psalm/plugin-phpunit": "0.18.4",
"psalm/plugin-symfony": "v5.0.1",
"rector/rector": "0.15.16",
"redaxo/php-cs-fixer-config": "2.0.0",
"rector/rector": "0.15.17",
"redaxo/php-cs-fixer-config": "2.1.0",
"redaxo/psalm-plugin": "2.0.0",
"vimeo/psalm": "5.6.0"
},
Expand Down
11 changes: 6 additions & 5 deletions redaxo/src/addons/cronjob/pages/cronjobs.php
Expand Up @@ -339,13 +339,14 @@
$fragment->setVar('body', $content, false);
$content = $fragment->parse('core/page/section.php');

echo $content; ?>
echo $content;
?>

<script type="text/javascript" nonce="<?= rex_response::getNonce() ?>">
// <![CDATA[
jQuery(function($){
var currentShown = null;
$("#<?php echo $typeFieldId ?>").change(function(){
$("#<?= $typeFieldId ?>").change(function(){
var next = $("#rex-"+ $(this).val());

if (next.is(currentShown)) {
Expand All @@ -360,9 +361,9 @@
}
currentShown = next;
}).change();
$('#<?php echo $typeFieldId ?>').change(function(){
$('#<?php echo $envFieldId ?> option').prop('disabled','');<?php echo $envJs; ?>
}).change();<?php echo $visibleJs . "\n"; ?>
$('#<?= $typeFieldId ?>').change(function(){
$('#<?= $envFieldId ?> option').prop('disabled','');<?= $envJs ?>
}).change();<?= $visibleJs . "\n" ?>
});
// ]]>
</script>
Expand Down
4 changes: 1 addition & 3 deletions redaxo/src/addons/mediapool/pages/media.list.php
Expand Up @@ -15,9 +15,7 @@
$error = '';
}
if (!isset($argUrl)) {
/**
* @var array{args: array{types: string}, opener_input_field: string}
*/
/** @var array{args: array{types: string}, opener_input_field: string} */
$argUrl = [];
}

Expand Down
4 changes: 2 additions & 2 deletions redaxo/src/addons/structure/pages/linkmap.php
Expand Up @@ -69,10 +69,10 @@

?>
<script type="text/javascript" nonce="<?= rex_response::getNonce() ?>">
<?php echo $retainEventHandlers ?>
<?= $retainEventHandlers ?>

function insertLink(link,name){
<?php echo $funcBody . "\n" ?>
<?= $funcBody, "\n" ?>
}
</script>

Expand Down
Expand Up @@ -28,13 +28,9 @@ class rex_article_content_base
protected $slice_id;
/** @var int */
protected $getSlice;
/**
* @var 'view'|'edit'
*/
/** @var 'view'|'edit' */
protected $mode;
/**
* @var 'add'|'edit'
*/
/** @var 'add'|'edit' */
protected $function;

/** @var int */
Expand Down
Expand Up @@ -17,13 +17,13 @@
<div class="row">
<div class="col-lg-6 text-center hidden-xs hidden-sm hidden-md">
<div class="btn-group history-select-group">
<div class="rex-select-style"><?= $this->getVar('content1select'); ?></div>
<div class="rex-select-style"><?= $this->getVar('content1select') ?></div>
</div>
</div>
<div class="col-lg-6 text-center">
<div class="btn-group history-select-group">
<button class="btn btn-default" data-history-layer="prev"><i class="fa fa-chevron-left" aria-hidden="true"></i></button>
<div class="rex-select-style"><?= $this->getVar('content2select'); ?></div>
<div class="rex-select-style"><?= $this->getVar('content2select') ?></div>
<button class="btn btn-default" data-history-layer="next"><i class="fa fa-chevron-right" aria-hidden="true"></i></button>
</div>
</div>
Expand All @@ -34,12 +34,12 @@
<div class="row">
<div class="col-lg-6 hidden-xs hidden-sm hidden-md">
<div class="history-responsive-container">
<?= $this->getVar('content1iframe'); ?>
<?= $this->getVar('content1iframe') ?>
</div>
</div>
<div class="col-lg-6">
<div class="history-responsive-container">
<?= $this->getVar('content2iframe'); ?>
<?= $this->getVar('content2iframe') ?>
</div>
</div>
</div>
Expand All @@ -48,8 +48,8 @@
<div class="history-layer-panel-4">
<div class="row">
<div class="col-lg-6 col-lg-push-6 text-center">
<button class="btn btn-apply" data-history-layer="snap"><?= rex_i18n::msg('structure_history_snapshot_reactivate'); ?></button>
<button class="btn btn-abort" data-history-layer="cancel"><?= rex_i18n::msg('structure_history_close'); ?></button>
<button class="btn btn-apply" data-history-layer="snap"><?= rex_i18n::msg('structure_history_snapshot_reactivate') ?></button>
<button class="btn btn-abort" data-history-layer="cancel"><?= rex_i18n::msg('structure_history_close') ?></button>
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions redaxo/src/core/fragments/core/buttons/button_group.php
Expand Up @@ -4,6 +4,6 @@
* @psalm-scope-this rex_fragment
*/
?>
<div class="btn-group<?php echo (isset($this->vertical) && $this->vertical) ? '-vertical' : ''; ?><?php echo (isset($this->size) && '' != trim($this->size)) ? ' btn-group-' . $this->size : ''; ?>">
<?php $this->subfragment('core/buttons/button.php'); ?>
<div class="btn-group<?= (isset($this->vertical) && $this->vertical) ? '-vertical' : '' ?><?= (isset($this->size) && '' != trim($this->size)) ? ' btn-group-' . $this->size : '' ?>">
<?php $this->subfragment('core/buttons/button.php') ?>
</div>
14 changes: 7 additions & 7 deletions redaxo/src/core/fragments/core/dropdowns/dropdown.php
Expand Up @@ -10,29 +10,29 @@

<?php if (!$toolbar && !$group): ?>
<div class="dropdown<?= isset($this->block) ? ' btn-block' : ''?><?= (isset($this->class) && '' != $this->class) ? ' ' . $this->class : '' ?>">
<?php endif; ?>
<?php endif ?>

<?php if ($toolbar): ?>
<a class="dropdown-toggle" href="#" role="button" data-toggle="dropdown"<?= (isset($this->disabled) && $this->disabled) ? ' disabled' : '' ?>>
<?php else: ?>
<button class="btn btn-default<?= isset($this->block) ? ' btn-block' : ''?> dropdown-toggle" type="button" data-toggle="dropdown"<?= (isset($this->disabled) && $this->disabled) ? ' disabled' : '' ?>>
<?php endif; ?>
<?php endif ?>
<?php if (isset($this->button_prefix) && '' != $this->button_prefix): ?>
<?= $this->button_prefix ?>
<?php endif; ?>
<?php endif ?>
<?php if (isset($this->button_label) && '' != $this->button_label): ?>
<?= ' <b>' . $this->button_label . '</b>' ?>
<?php endif; ?>
<?php endif ?>
<span class="caret"></span>
<?php if ($toolbar): ?>
</a>
<?php else: ?>
</button>
<?php endif; ?>
<?php endif ?>
<ul class="dropdown-menu<?= isset($this->right) ? ' dropdown-menu-right' : ''?><?= isset($this->block) ? ' btn-block' : ''?>" role="menu">
<?php if (isset($this->header) && '' != $this->header): ?>
<li class="dropdown-header"><?= $this->header ?></li>
<?php endif; ?>
<?php endif ?>
<?php
foreach ($this->items as $item) {
echo '<li' . ((isset($item['active']) && $item['active']) ? ' class="active"' : '') . (isset($item['attributes']) ? ' ' . trim($item['attributes']) : '') . '>';
Expand All @@ -43,7 +43,7 @@
<?php if (isset($this->footer) && '' != $this->footer): ?>
<li class="divider"></li>
<li><?= $this->footer ?></li>
<?php endif; ?>
<?php endif ?>
</ul>
<?php if (!$toolbar && !$group): ?>
</div>
Expand Down
8 changes: 4 additions & 4 deletions redaxo/src/core/fragments/core/footer.php
Expand Up @@ -11,10 +11,10 @@
<li><a href="https://www.yakamara.de" target="_blank" rel="noreferrer noopener">yakamara.de</a></li>
<li><a href="https://www.redaxo.org" target="_blank" rel="noreferrer noopener">redaxo.org</a></li>
<?php if (rex::getUser()?->isAdmin()): ?>
<li><a href="https://www.redaxo.org/doku/main" target="_blank" rel="noreferrer noopener' ?>"><?php echo rex_i18n::msg('footer_doku'); ?></a></li>
<?php endif; ?>
<li><a href="<?php echo rex::getUser() ? rex_url::backendPage('credits') : 'https://www.redaxo.org/" target="_blank" rel="noreferrer noopener' ?>"><?php echo rex_i18n::msg('footer_credits'); ?></a></li>
<li class="rex-js-script-time"><!--DYN--><?php echo rex_i18n::msg('footer_scripttime', $this->time); ?><!--/DYN--></li>
<li><a href="https://www.redaxo.org/doku/main" target="_blank" rel="noreferrer noopener' ?>"><?= rex_i18n::msg('footer_doku') ?></a></li>
<?php endif ?>
<li><a href="<?= rex::getUser() ? rex_url::backendPage('credits') : 'https://www.redaxo.org/" target="_blank" rel="noreferrer noopener' ?>"><?= rex_i18n::msg('footer_credits') ?></a></li>
<li class="rex-js-script-time"><!--DYN--><?= rex_i18n::msg('footer_scripttime', $this->time) ?><!--/DYN--></li>
</ul>
</nav>
</footer>
8 changes: 4 additions & 4 deletions redaxo/src/core/fragments/core/header.php
Expand Up @@ -9,7 +9,7 @@
$isSetup = ('setup' === rex_be_controller::getCurrentPage());
?>

<div id="rex-js-nav-top" class="rex-nav-top<?php if (!$isPopup && !$isSetup): ?> rex-nav-top-is-fixed<?php endif; ?>">
<div id="rex-js-nav-top" class="rex-nav-top<?php if (!$isPopup && !$isSetup): ?> rex-nav-top-is-fixed<?php endif ?>">
<nav class="navbar navbar-default">
<div class="container-fluid">

Expand All @@ -22,19 +22,19 @@
<span class="icon-bar"></span>
</span>
</button>
<?php endif; ?>
<?php endif ?>

<div class="navbar-header">
<?php if ($isPopup): ?>
<span class="navbar-brand"><?= rex_file::get(rex_path::coreAssets('redaxo-logo.svg')) ?></span>
<?php else: ?>
<a class="navbar-brand" href="<?= rex_url::backendController() ?>"><?= rex_file::get(rex_path::coreAssets('redaxo-logo.svg')) ?></a>
<?php endif; ?>
<?php endif ?>
<?php if (!$isPopup && rex::getUser()?->isAdmin() && rex::isDebugMode()): ?>
<a class="rex-marker-debugmode" href="<?= rex_url::backendPage('system/settings') ?>" title="<?= rex_i18n::msg('debug_mode_marker') ?>">
<i class="rex-icon rex-icon-heartbeat rex-pulse"></i>
</a>
<?php endif; ?>
<?php endif ?>
</div>

<?= $this->meta_navigation ?>
Expand Down
6 changes: 3 additions & 3 deletions redaxo/src/core/fragments/core/navigations/main.php
Expand Up @@ -6,7 +6,7 @@
?>
<?php if (isset($this->headline)): ?>
<h4 class="rex-nav-main-title"><?= $this->headline['title'] ?></h4>
<?php endif; ?>
<?php endif ?>
<ul class="rex-nav-main-list nav nav-pills nav-stacked">
<?php foreach ($this->items as $item):

Expand All @@ -32,6 +32,6 @@
$linkAttr = isset($item['linkAttr']) ? rex_string::buildAttributes($item['linkAttr']) : '';
?>

<li<?= $itemAttr ?>><a href="<?= $item['href']; ?>"<?= $linkAttr; ?>><?= $icon . $item['title']; ?></a></li>
<?php endforeach; ?>
<li<?= $itemAttr ?>><a href="<?= $item['href'] ?>"<?= $linkAttr ?>><?= $icon . $item['title'] ?></a></li>
<?php endforeach ?>
</ul>
10 changes: 5 additions & 5 deletions redaxo/src/core/fragments/core/navigations/pagination.php
Expand Up @@ -22,7 +22,7 @@
<?php if ($pager->getRowCount() > $pager->getRowsPerPage()): ?>
<nav class="rex-nav-pagination">
<ul class="pagination">
<li class="rex-prev<?= $pager->isActivePage($firstPage) ? ' disabled' : ''; ?>">
<li class="rex-prev<?= $pager->isActivePage($firstPage) ? ' disabled' : '' ?>">
<a href="<?= $urlProvider->getUrl([$pager->getCursorName() => $pager->getCursor($pager->getPrevPage())]) ?>" title="<?= $this->i18n('list_previous') ?>">
<i class="rex-icon rex-icon-previous"></i><span class="sr-only"><?= $this->i18n('list_previous') ?></span>
</a>
Expand All @@ -38,29 +38,29 @@
<li class="disabled">
<span></span>
</li>
<?php endif; ?>
<?php endif ?>

<?php for ($page = $from; $page <= $to; ++$page): ?>
<li class="rex-page<?= $pager->isActivePage($page) ? ' active' : '' ?>">
<a href="<?= $urlProvider->getUrl([$pager->getCursorName() => $pager->getCursor($page)]) ?>">
<?= $page + 1 ?>
</a>
</li>
<?php endfor; ?>
<?php endfor ?>

<?php if ($to < $lastPage - 1): ?>
<li class="disabled">
<span></span>
</li>
<?php endif; ?>
<?php endif ?>

<li class="rex-page<?= $pager->isActivePage($lastPage) ? ' active' : '' ?>">
<a href="<?= $urlProvider->getUrl([$pager->getCursorName() => $pager->getCursor($lastPage)]) ?>">
<?= $lastPage + 1 ?>
</a>
</li>

<li class="rex-next<?= $pager->isActivePage($lastPage) ? ' disabled' : ''; ?>">
<li class="rex-next<?= $pager->isActivePage($lastPage) ? ' disabled' : '' ?>">
<a href="<?= $urlProvider->getUrl([$pager->getCursorName() => $pager->getCursor($pager->getNextPage())]) ?>" title="<?= $this->i18n('list_next') ?>">
<span class="sr-only"><?= $this->i18n('list_next') ?></span><i class="rex-icon rex-icon-next"></i>
</a>
Expand Down
4 changes: 2 additions & 2 deletions redaxo/src/core/fragments/core/page/header.php
Expand Up @@ -9,10 +9,10 @@
<h1><?= $this->heading ?>
<?php if (isset($this->subheading) && '' != $this->subheading): ?>
<small><?= $this->subheading ?></small>
<?php endif; ?>
<?php endif ?>
</h1>
</div>
<?php if (isset($this->subtitle) && '' != $this->subtitle): ?>
<?= $this->subtitle ?>
<?php endif; ?>
<?php endif ?>
</header>
8 changes: 4 additions & 4 deletions redaxo/src/core/fragments/core/page/main_content.php
Expand Up @@ -9,22 +9,22 @@
<div class="row">
<div class="col-lg-8">
<div id="rex-js-main-content" class="rex-main-content">
<?= $this->content; ?>
<?= $this->content ?>
</div>
</div>
<div class="col-lg-4">
<div id="rex-js-main-sidebar" class="rex-main-sidebar">
<?= $this->sidebar; ?>
<?= $this->sidebar ?>
</div>
</div>
</div>
<?php elseif (isset($this->content) && '' != $this->content): ?>
<div class="row">
<div class="col-md-12">
<div id="rex-js-main-content" class="rex-main-content">
<?= $this->content; ?>
<?= $this->content ?>
</div>
</div>
</div>
<?php endif; ?>
<?php endif ?>
</section>

0 comments on commit ccabcd4

Please sign in to comment.