Skip to content

Commit da7480d

Browse files
committed
Fix: Run 'make coding-standards'
1 parent 219a7b8 commit da7480d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+892
-892
lines changed

archive/index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
include_once __DIR__ . '/../include/prepend.inc';
33
$i = 0;
44
do {
5-
$y = date("Y")-$i;
5+
$y = date("Y") - $i;
66
if (file_exists("./$y.php")) {
77
mirror_redirect("/archive/$y.php");
88
break;
99
}
10-
} while (++$i<3);
10+
} while (++$i < 3);
1111

1212
include_once __DIR__ . '/../include/errors.inc';
1313
error_noservice();

build-setup.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
$_SERVER['BASE_PAGE'] = 'build-setup.php';
33
include_once __DIR__ . '/include/prepend.inc';
44

5-
$SIDEBAR_DATA ='
5+
$SIDEBAR_DATA = '
66
<div class="panel">
77
<div class="body">
88
<p>
@@ -172,6 +172,6 @@
172172
</p>
173173
</div>
174174
<?php
175-
site_footer(['sidebar'=>$SIDEBAR_DATA]);
175+
site_footer(['sidebar' => $SIDEBAR_DATA]);
176176

177177
/* vim: set et ts=4 sw=4 ft=php: : */

cached.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
$abs = realpath($abs);
2323

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

cal.php

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126

127127
// Beginning and end of this month
128128
$bom = mktime(0, 0, 1, $cm, 1, $cy);
129-
$eom = mktime(0, 0, 1, $cm+1, 0, $cy);
129+
$eom = mktime(0, 0, 1, $cm + 1, 0, $cy);
130130

131131
// Link to previous month (but do not link to too early dates)
132132
$prev_link = (function () use ($cm, $cy) {
@@ -147,7 +147,7 @@
147147

148148
// Link to next month (but do not link to too early dates)
149149
$next_link = (function () use ($cm, $cy) {
150-
$nm = mktime(0, 0, 1, $cm+1, 1, $cy);
150+
$nm = mktime(0, 0, 1, $cm + 1, 1, $cy);
151151
$year = date('Y', $nm);
152152
if (!valid_year($year)) {
153153
return '&nbsp;';
@@ -174,7 +174,7 @@
174174

175175
// Print out headers for weekdays
176176
for ($i = 0; $i < 7; $i++) {
177-
echo '<th width="14%">', date("l",mktime(0,0,1,4,$i+1,2001)), "</th>\n";
177+
echo '<th width="14%">', date("l",mktime(0,0,1,4,$i + 1,2001)), "</th>\n";
178178
}
179179
echo "</tr>\n<tr>";
180180

@@ -225,7 +225,7 @@ function date_for_recur($recur, $day, $bom, $eom)
225225
$eomd = date("w",$eom) + 1;
226226
$days = (($eomd - $day + 7) % 7) + ((abs($recur) - 1) * 7);
227227

228-
return mktime(0, 0, 1, date("m", $bom)+1, -$days, date("Y", $bom));
228+
return mktime(0, 0, 1, date("m", $bom) + 1, -$days, date("Y", $bom));
229229
}
230230

231231
// Display a <div> for each of the events that are on a given day
@@ -327,8 +327,8 @@ function load_events($from, $whole_month = false)
327327
// Multi-day event
328328
case 2:
329329
if (($event['start'] >= $from_date && $event['start'] <= $to_date)
330-
|| ($event['end'] >= $from_date && $event['end'] <= $to_date)
331-
|| ($event['start'] <= $from_date && $event['end'] >= $to_date)) {
330+
|| ($event['end'] >= $from_date && $event['end'] <= $to_date)
331+
|| ($event['start'] <= $from_date && $event['end'] >= $to_date)) {
332332
$events[] = $event;
333333
}
334334
break;
@@ -363,17 +363,17 @@ function read_event($fp)
363363

364364
// Return with SQL-resultset like array
365365
return [
366-
'id' => $id,
367-
'type' => $tipo,
368-
'start' => $sdato,
369-
'end' => $edato,
370-
'recur' => $recur,
366+
'id' => $id,
367+
'type' => $tipo,
368+
'start' => $sdato,
369+
'end' => $edato,
370+
'recur' => $recur,
371371
'recur_day' => $recur_day,
372-
'sdesc' => $sdesc,
373-
'url' => $url,
374-
'ldesc' => base64_decode($ldesc, false),
375-
'country' => $country,
376-
'category' => $category,
372+
'sdesc' => $sdesc,
373+
'url' => $url,
374+
'ldesc' => base64_decode($ldesc, false),
375+
'country' => $country,
376+
'category' => $category,
377377
];
378378
}
379379

@@ -385,7 +385,7 @@ function valid_year($year)
385385
$current_year = date("Y");
386386

387387
// We only allow this and the next year for displays
388-
if ($year != $current_year && $year != $current_year+1) {
388+
if ($year != $current_year && $year != $current_year + 1) {
389389
return false;
390390
}
391391

conferences/index.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
include_once __DIR__ . '/../include/prepend.inc';
44
include_once __DIR__ . '/../include/pregen-news.inc';
55

6-
mirror_setcookie("LAST_NEWS", $_SERVER["REQUEST_TIME"], 60*60*24*365);
6+
mirror_setcookie("LAST_NEWS", $_SERVER["REQUEST_TIME"], 60 * 60 * 24 * 365);
77
site_header("PHP Conferences around the world", [
88
'headtags' => '<link rel="alternate" type="application/atom+xml" title="PHP: Conference announcements" href="' . $MYSITE . 'feed.atom">',
9-
'current' => 'community',
9+
'current' => 'community',
1010
'css' => ['home.css'],
1111
]);
1212

@@ -28,7 +28,7 @@
2828

2929
foreach ($frontpage as $entry) {
3030
$link = preg_replace('~^(http://php.net/|https://www.php.net/)~', '', $entry["id"]);
31-
$id = parse_url($entry["id"], PHP_URL_FRAGMENT);
31+
$id = parse_url($entry["id"], PHP_URL_FRAGMENT);
3232
$date = date_format(date_create($entry["updated"]), 'Y-m-d');
3333
$content .= '<div class="newsentry">';
3434
$content .= '<h3 class="newstitle title"><a href="'. $MYSITE.$link .'" id="' . $id . '">' . $entry["title"] . '</a></h3>';

download-docs.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
exit;
88
}
99

10-
$SIDEBAR_DATA='
10+
$SIDEBAR_DATA = '
1111
<div class="panel">
1212
<div class="headline">Online documentation</div>
1313
<div class="body">
@@ -42,8 +42,8 @@
4242
// Format to look for
4343
$formats = [
4444
"Single HTML file" => "html.gz",
45-
"Many HTML files" => "tar.gz",
46-
"HTML Help file" => "chm",
45+
"Many HTML files" => "tar.gz",
46+
"HTML Help file" => "chm",
4747
"HTML Help file (with user notes)" => "chm",
4848
];
4949
?>
@@ -114,14 +114,14 @@
114114
$link_to = "/distributions/manual/$filename";
115115

116116
// Try to get size and changed date
117-
$size = @filesize($filepath);
117+
$size = @filesize($filepath);
118118
$changed = @filemtime($filepath);
119119

120120
// Size available, collect information
121121
if ($size !== false) {
122122
$files[$langcode][$formatname] = [
123123
$link_to,
124-
(int) ($size/1024),
124+
(int) ($size / 1024),
125125
date("j M Y", $changed),
126126
$extension
127127
];

download-logos.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function print_star(): void
2222
function random_bgcolor($min, $max): void
2323
{
2424
echo "style=\"background-color: #" .
25-
sprintf('%02x%02x%02x', rand($min, $max)*51, rand($min, $max)*51, rand($min, $max)*51) .
25+
sprintf('%02x%02x%02x', rand($min, $max) * 51, rand($min, $max) * 51, rand($min, $max) * 51) .
2626
";\"";
2727
}
2828
?>

downloads.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
[
3030
'link' => [
3131
[
32-
"rel" => "alternate",
33-
"type" => "application/atom+xml",
34-
"href" => $MYSITE . "releases/feed.php",
32+
"rel" => "alternate",
33+
"type" => "application/atom+xml",
34+
"href" => $MYSITE . "releases/feed.php",
3535
"title" => "PHP Release feed"
3636
],
3737
],

0 commit comments

Comments
 (0)