Skip to content

Commit

Permalink
Enhancement: Enable array_syntax fixer
Browse files Browse the repository at this point in the history
Co-authored-by: MathiasReker <mathias@reker.dk>

Closes GH-659.
  • Loading branch information
localheinz authored Aug 22, 2022
1 parent c304829 commit d9bcfed
Show file tree
Hide file tree
Showing 108 changed files with 3,279 additions and 3,278 deletions.
1 change: 1 addition & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
->setRiskyAllowed(true)
->setRules([
'array_indentation' => true,
'array_syntax' => true,
'class_attributes_separation' => true,
'constant_case' => true,
'indentation_type' => true,
Expand Down
4 changes: 2 additions & 2 deletions archive/1998.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
$_SERVER['BASE_PAGE'] = 'archive/1998.php';
include_once __DIR__ . '/../include/prepend.inc';
news_archive_sidebar();
site_header("News Archive - 1998", array("cache" => true));
site_header("News Archive - 1998", ["cache" => true]);
?>

<h1>News Archive - 1998</h1>
Expand Down Expand Up @@ -91,4 +91,4 @@
Report or check on bugs in the PHP 3 Bug Database.
</p>

<?php site_footer(array('elephpants' => true, 'sidebar' => $SIDEBAR_DATA));
<?php site_footer(['elephpants' => true, 'sidebar' => $SIDEBAR_DATA]);
4 changes: 2 additions & 2 deletions archive/1999.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
$_SERVER['BASE_PAGE'] = 'archive/1999.php';
include_once __DIR__ . '/../include/prepend.inc';
news_archive_sidebar();
site_header("News Archive - 1999", array("cache" => true));
site_header("News Archive - 1999", ["cache" => true]);
?>

<h1>News Archive - 1999</h1>
Expand Down Expand Up @@ -117,4 +117,4 @@
information!
</p>

<?php site_footer(array('elephpants' => true, 'sidebar' => $SIDEBAR_DATA));
<?php site_footer(['elephpants' => true, 'sidebar' => $SIDEBAR_DATA]);
4 changes: 2 additions & 2 deletions archive/2000.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
$_SERVER['BASE_PAGE'] = 'archive/2000.php';
include_once __DIR__ . '/../include/prepend.inc';
news_archive_sidebar();
site_header("News Archive - 2000", array("cache" => true));
site_header("News Archive - 2000", ["cache" => true]);
?>

<h1>News Archive - 2000</h1>
Expand Down Expand Up @@ -165,4 +165,4 @@ functions for gd make this release a must for every user of PHP. The
ChangeLog provides a complete list of changes.
</p>

<?php site_footer(array('elephpants' => true, 'sidebar' => $SIDEBAR_DATA));
<?php site_footer(['elephpants' => true, 'sidebar' => $SIDEBAR_DATA]);
4 changes: 2 additions & 2 deletions archive/2001.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
$_SERVER['BASE_PAGE'] = 'archive/2001.php';
include_once __DIR__ . '/../include/prepend.inc';
news_archive_sidebar();
site_header("News Archive - 2001", array("cache" => true));
site_header("News Archive - 2001", ["cache" => true]);
?>

<h1>News Archive - 2001</h1>
Expand Down Expand Up @@ -314,4 +314,4 @@
were discovered in PHP 4.0.4.
</p>

<?php site_footer(array('elephpants' => true, 'sidebar' => $SIDEBAR_DATA));
<?php site_footer(['elephpants' => true, 'sidebar' => $SIDEBAR_DATA]);
4 changes: 2 additions & 2 deletions archive/2002.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
$_SERVER['BASE_PAGE'] = 'archive/2002.php';
include_once __DIR__ . '/../include/prepend.inc';
news_archive_sidebar();
site_header("News Archive - 2002", array("cache" => true));
site_header("News Archive - 2002", ["cache" => true]);
?>

<h1>News Archive - 2002</h1>
Expand Down Expand Up @@ -601,4 +601,4 @@
<li><a href="http://www.phpconference.de/2001/images/PHP_Konferenz/">Conference photos</a></li>
</ul>

<?php site_footer(array('elephpants' => true, 'sidebar' => $SIDEBAR_DATA));
<?php site_footer(['elephpants' => true, 'sidebar' => $SIDEBAR_DATA]);
4 changes: 2 additions & 2 deletions archive/2003.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
$_SERVER['BASE_PAGE'] = 'archive/2003.php';
include_once __DIR__ . '/../include/prepend.inc';
news_archive_sidebar();
site_header("News Archive - 2003", array("cache" => true));
site_header("News Archive - 2003", ["cache" => true]);
?>

<h1>News Archive - 2003</h1>
Expand Down Expand Up @@ -795,4 +795,4 @@
of beta-quality.
</p>

<?php site_footer(array('elephpants' => true, 'sidebar' => $SIDEBAR_DATA));
<?php site_footer(['elephpants' => true, 'sidebar' => $SIDEBAR_DATA]);
4 changes: 2 additions & 2 deletions archive/2004.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
$_SERVER['BASE_PAGE'] = 'archive/2004.php';
include_once __DIR__ . '/../include/prepend.inc';
news_archive_sidebar();
site_header("News Archive - 2004", array("cache" => true));
site_header("News Archive - 2004", ["cache" => true]);
?>

<h1>News Archive - 2004</h1>
Expand Down Expand Up @@ -654,4 +654,4 @@ functions starting with the letters you typed in. You can browse the list
one of a kind conference!
</p>

<?php site_footer(array('elephpants' => true, 'sidebar' => $SIDEBAR_DATA));
<?php site_footer(['elephpants' => true, 'sidebar' => $SIDEBAR_DATA]);
4 changes: 2 additions & 2 deletions archive/2005.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
$_SERVER['BASE_PAGE'] = 'archive/2005.php';
include_once __DIR__ . '/../include/prepend.inc';
news_archive_sidebar();
site_header("News Archive - 2005", array("cache" => true));
site_header("News Archive - 2005", ["cache" => true]);
?>

<h1>News Archive - 2005</h1>
Expand Down Expand Up @@ -536,4 +536,4 @@
Congratulations to us all!
</p>

<?php site_footer(array('elephpants' => true, 'sidebar' => $SIDEBAR_DATA));
<?php site_footer(['elephpants' => true, 'sidebar' => $SIDEBAR_DATA]);
4 changes: 2 additions & 2 deletions archive/2006.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
$_SERVER['BASE_PAGE'] = 'archive/2006.php';
include_once __DIR__ . '/../include/prepend.inc';
news_archive_sidebar();
site_header("News Archive - 2006", array("cache" => true));
site_header("News Archive - 2006", ["cache" => true]);
?>

<h1>News Archive - 2006</h1>
Expand Down Expand Up @@ -466,4 +466,4 @@
and the full list of changes is available in the <a href="/ChangeLog-5.php#5.1.2">PHP 5 ChangeLog</a>.
</p>

<?php site_footer(array('elephpants' => true, 'sidebar' => $SIDEBAR_DATA));
<?php site_footer(['elephpants' => true, 'sidebar' => $SIDEBAR_DATA]);
4 changes: 2 additions & 2 deletions archive/2007.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
$_SERVER['BASE_PAGE'] = 'archive/2007.php';
include_once __DIR__ . '/../include/prepend.inc';
news_archive_sidebar();
site_header("News Archive - 2007", array("cache" => true));
site_header("News Archive - 2007", ["cache" => true]);
?>

<h1>News Archive - 2007</h1>
Expand Down Expand Up @@ -674,4 +674,4 @@ functionality for PHP developers, including detailed error information,
</div>
</div>

<?php site_footer(array('elephpants' => true, 'sidebar' => $SIDEBAR_DATA));
<?php site_footer(['elephpants' => true, 'sidebar' => $SIDEBAR_DATA]);
4 changes: 2 additions & 2 deletions archive/2008.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
$_SERVER['BASE_PAGE'] = 'archive/2008.php';
include_once __DIR__ . '/../include/prepend.inc';
news_archive_sidebar();
site_header("News Archive - 2008", array("cache" => true));
site_header("News Archive - 2008", ["cache" => true]);
?>

<h1>News Archive - 2008</h1>
Expand Down Expand Up @@ -950,4 +950,4 @@
</div>
</div>

<?php site_footer(array('elephpants' => true, 'sidebar' => $SIDEBAR_DATA));
<?php site_footer(['elephpants' => true, 'sidebar' => $SIDEBAR_DATA]);
4 changes: 2 additions & 2 deletions archive/2009.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
$_SERVER['BASE_PAGE'] = 'archive/2009.php';
include_once __DIR__ . '/../include/prepend.inc';
news_archive_sidebar();
site_header("News Archive - 2009", array("cache" => true));
site_header("News Archive - 2009", ["cache" => true]);
?>

<h1>News Archive - 2009</h1>
Expand Down Expand Up @@ -965,4 +965,4 @@
</div>


<?php site_footer(array('elephpants' => true, 'sidebar' => $SIDEBAR_DATA));
<?php site_footer(['elephpants' => true, 'sidebar' => $SIDEBAR_DATA]);
4 changes: 2 additions & 2 deletions archive/2010.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
$_SERVER['BASE_PAGE'] = 'archive/2010.php';
include_once __DIR__ . '/../include/prepend.inc';
news_archive_sidebar();
site_header("News Archive - 2010", array("cache" => true));
site_header("News Archive - 2010", ["cache" => true]);
?>

<h1>News Archive - 2010</h1>
Expand Down Expand Up @@ -765,4 +765,4 @@ public function Bar() {<br>
</div>
</div>

<?php site_footer(array('elephpants' => true, 'sidebar' => $SIDEBAR_DATA));
<?php site_footer(['elephpants' => true, 'sidebar' => $SIDEBAR_DATA]);
4 changes: 2 additions & 2 deletions archive/2011.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
$_SERVER['BASE_PAGE'] = 'archive/2011.php';
include_once __DIR__ . '/../include/prepend.inc';
news_archive_sidebar();
site_header("News Archive - 2011", array("cache" => true));
site_header("News Archive - 2011", ["cache" => true]);
?>

<h1>News Archive - 2011</h1>
Expand Down Expand Up @@ -1013,4 +1013,4 @@ traits, best-practices and success cases related to quality, revision
</div>
</div>

<?php site_footer(array('elephpants' => true, 'sidebar' => $SIDEBAR_DATA));
<?php site_footer(['elephpants' => true, 'sidebar' => $SIDEBAR_DATA]);
4 changes: 2 additions & 2 deletions archive/2012.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
$_SERVER['BASE_PAGE'] = 'archive/2012.php';
include_once __DIR__ . '/../include/prepend.inc';
news_archive_sidebar();
site_header("News Archive - 2012", array("cache" => true));
site_header("News Archive - 2012", ["cache" => true]);
?>

<h1>News Archive - 2012</h1>
Expand Down Expand Up @@ -1064,4 +1064,4 @@ classes in multiple threads.
</div>
</div>

<?php site_footer(array('elephpants' => true, 'sidebar' => $SIDEBAR_DATA));
<?php site_footer(['elephpants' => true, 'sidebar' => $SIDEBAR_DATA]);
4 changes: 2 additions & 2 deletions archive/2013.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
include_once __DIR__ . '/../include/prepend.inc';
include_once __DIR__ . '/../include/pregen-news.inc';
news_archive_sidebar();
site_header("News Archive - 2013", array("cache" => true));
site_header("News Archive - 2013", ["cache" => true]);
?>

<h1>News Archive - 2013</h1>
Expand Down Expand Up @@ -1485,4 +1485,4 @@ function declaration.</li>

<?php

site_footer(array('elephpants' => true, 'sidebar' => $SIDEBAR_DATA));
site_footer(['elephpants' => true, 'sidebar' => $SIDEBAR_DATA]);
4 changes: 2 additions & 2 deletions archive/2014.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
include_once __DIR__ . '/../include/prepend.inc';
include_once __DIR__ . '/../include/pregen-news.inc';
news_archive_sidebar();
site_header("News Archive - 2014", array("cache" => true));
site_header("News Archive - 2014", ["cache" => true]);
?>

<h1>News Archive - 2014</h1>
Expand Down Expand Up @@ -2094,4 +2094,4 @@
<?php

/* %s/<a href="\(.*\)"><img src="\/images\/news\/\(.*\)" alt="\(.*\)" width.*><\/a>/<?php news_image("\1", "\2", "\3"); ?>/g */
site_footer(array('elephpants' => true, 'sidebar' => $SIDEBAR_DATA));
site_footer(['elephpants' => true, 'sidebar' => $SIDEBAR_DATA]);
4 changes: 2 additions & 2 deletions archive/2015.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<?php

print_news($NEWS_ENTRIES, array("conferences", "cfp", "frontpage", "nofrontpage"), 500, 2015);
print_news($NEWS_ENTRIES, ["conferences", "cfp", "frontpage", "nofrontpage"], 500, 2015);

/* %s/<a href="\(.*\)"><img src="\/images\/news\/\(.*\)" alt="\(.*\)" width.*><\/a>/<?php news_image("\1", "\2", "\3"); ?>/g */
site_footer(array('elephpants' => true, 'sidebar' => $SIDEBAR_DATA));
site_footer(['elephpants' => true, 'sidebar' => $SIDEBAR_DATA]);
4 changes: 2 additions & 2 deletions archive/2016.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<?php

print_news($NEWS_ENTRIES, array("conferences", "cfp", "frontpage", "nofrontpage"), 500, 2016);
print_news($NEWS_ENTRIES, ["conferences", "cfp", "frontpage", "nofrontpage"], 500, 2016);

/* %s/<a href="\(.*\)"><img src="\/images\/news\/\(.*\)" alt="\(.*\)" width.*><\/a>/<?php news_image("\1", "\2", "\3"); ?>/g */
site_footer(array('elephpants' => true, 'sidebar' => $SIDEBAR_DATA));
site_footer(['elephpants' => true, 'sidebar' => $SIDEBAR_DATA]);
2 changes: 1 addition & 1 deletion archive/2017.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
print_news($NEWS_ENTRIES, null, 500, 2017);

/* %s/<a href="\(.*\)"><img src="\/images\/news\/\(.*\)" alt="\(.*\)" width.*><\/a>/<?php news_image("\1", "\2", "\3"); ?>/g */
site_footer(array('elephpants' => true, 'sidebar' => $SIDEBAR_DATA));
site_footer(['elephpants' => true, 'sidebar' => $SIDEBAR_DATA]);
2 changes: 1 addition & 1 deletion archive/2018.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
print_news($NEWS_ENTRIES, null, 500, 2018);

/* %s/<a href="\(.*\)"><img src="\/images\/news\/\(.*\)" alt="\(.*\)" width.*><\/a>/<?php news_image("\1", "\2", "\3"); ?>/g */
site_footer(array('elephpants' => true, 'sidebar' => $SIDEBAR_DATA));
site_footer(['elephpants' => true, 'sidebar' => $SIDEBAR_DATA]);
2 changes: 1 addition & 1 deletion archive/2019.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
print_news($NEWS_ENTRIES, null, 500, 2019);

/* %s/<a href="\(.*\)"><img src="\/images\/news\/\(.*\)" alt="\(.*\)" width.*><\/a>/<?php news_image("\1", "\2", "\3"); ?>/g */
site_footer(array('elephpants' => true, 'sidebar' => $SIDEBAR_DATA));
site_footer(['elephpants' => true, 'sidebar' => $SIDEBAR_DATA]);
2 changes: 1 addition & 1 deletion archive/2020.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
print_news($NEWS_ENTRIES, null, 500, 2020);

/* %s/<a href="\(.*\)"><img src="\/images\/news\/\(.*\)" alt="\(.*\)" width.*><\/a>/<?php news_image("\1", "\2", "\3"); ?>/g */
site_footer(array('elephpants' => true, 'sidebar' => $SIDEBAR_DATA));
site_footer(['elephpants' => true, 'sidebar' => $SIDEBAR_DATA]);
2 changes: 1 addition & 1 deletion archive/2021.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
print_news($NEWS_ENTRIES, null, 500, 2021);

/* %s/<a href="\(.*\)"><img src="\/images\/news\/\(.*\)" alt="\(.*\)" width.*><\/a>/<?php news_image("\1", "\2", "\3"); ?>/g */
site_footer(array('elephpants' => true, 'sidebar' => $SIDEBAR_DATA));
site_footer(['elephpants' => true, 'sidebar' => $SIDEBAR_DATA]);
2 changes: 1 addition & 1 deletion archive/2022.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
<?php

print_news($NEWS_ENTRIES, null, 500, 2022);
site_footer(array('elephpants' => true, 'sidebar' => $SIDEBAR_DATA));
site_footer(['elephpants' => true, 'sidebar' => $SIDEBAR_DATA]);
4 changes: 2 additions & 2 deletions build-setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</div>
';

site_header("Operating System Preparation", array("current" => "community"));
site_header("Operating System Preparation", ["current" => "community"]);

?>
<h2 id="os-prep" class="content-header">Operating System Preparation</h2>
Expand Down Expand Up @@ -172,6 +172,6 @@
</p>
</div>
<?php
site_footer(array('sidebar'=>$SIDEBAR_DATA));
site_footer(['sidebar'=>$SIDEBAR_DATA]);

/* vim: set et ts=4 sw=4 ft=php: : */
2 changes: 1 addition & 1 deletion cached.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
$abs = realpath($abs);

if (strncmp($abs, $pwd, strlen($pwd)) != 0) {
header("Location: https://www.php.net/" . strtr($_GET["f"],array("\r"=>"", "\n"=>"")));
header("Location: https://www.php.net/" . strtr($_GET["f"],["\r"=>"", "\n"=>""]));
exit;
}

Expand Down
Loading

0 comments on commit d9bcfed

Please sign in to comment.