Skip to content

Commit 4555190

Browse files
authored
Automatically generated files must self-declare (#317)
1 parent d9e1207 commit 4555190

1 file changed

Lines changed: 15 additions & 12 deletions

File tree

scripts/gen-phpdoc-tz-list.php

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,22 @@
3131
$others = $groupedList['Others'];
3232
unset($groupedList['Others']);
3333
$groupedList['Others'] = $others;
34-
?>
35-
<?php echo '<?'; ?>xml version="1.0" encoding="UTF-8"?>
36-
<!-- AUTO GENERATED, DO NOT TRANSLATE OR MODIFY BY HAND -->
3734

38-
<!-- The script to generate this file is scripts/gen-phpdoc-tz-list.php -->
39-
<!-- in the doc-base repo. However, it should only need to be run when -->
40-
<!-- the tzdb file is updated by the maintainer of DateTime/timelib. -->
35+
echo <<<'XML'
36+
<?xml version="1.0" encoding="UTF-8"?>
37+
<?do-not-translate?>
38+
39+
<!-- AUTO GENERATED, DO NOT TRANSLATE OR MODIFY BY HAND -->
40+
<!-- The script to generate this file is scripts/gen-phpdoc-tz-list.php -->
41+
<!-- in the doc-base repo. However, it should only need to be run when -->
42+
<!-- the tzdb file is updated by the maintainer of DateTime/timelib. -->
43+
44+
<appendix xml:id="timezones" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
45+
&date.timezone.intro.title;
46+
&date.timezone.intro;
47+
48+
XML;
4149

42-
<appendix xml:id="timezones" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
43-
&date.timezone.intro.title;
44-
&date.timezone.intro;
45-
<?php
4650
if (function_exists('timezone_version_get')) {
4751
?>
4852

@@ -54,7 +58,7 @@
5458
<?php
5559
}
5660

57-
foreach ($groupedList as $group => $zones) {
61+
foreach ($groupedList as $group => $zones) {
5862
$groupColumns = $columns;
5963
$m = count($zones) > ($groupColumns-1) ? $groupColumns : count($zones); ?>
6064

@@ -118,4 +122,3 @@
118122
vim: et tw=78 syn=php
119123
vi: ts=4 sw=1
120124
-->
121-

0 commit comments

Comments
 (0)