summaryrefslogtreecommitdiff
path: root/ext/phar
diff options
context:
space:
mode:
authorPeter Kokot <peterkokot@gmail.com>2018-10-14 12:56:38 +0200
committerPeter Kokot <peterkokot@gmail.com>2018-10-14 12:56:38 +0200
commit1ad08256f349fa513157437abc4feb245cce03fc (patch)
treea6bd8d17fa64b625757ac04b1436696c3e760f61 /ext/phar
parentf87f7bb8c7be413afd02548435112fa2c5030a4a (diff)
downloadphp-git-1ad08256f349fa513157437abc4feb245cce03fc.tar.gz
Sync leading and final newlines in source code files
This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
Diffstat (limited to 'ext/phar')
-rw-r--r--ext/phar/Makefile.frag1
-rw-r--r--ext/phar/Makefile.frag.w322
-rw-r--r--ext/phar/func_interceptors.c1
-rw-r--r--ext/phar/gdbhelp2
-rw-r--r--ext/phar/phar/directorygraphiterator.inc2
-rw-r--r--ext/phar/phar/directorytreeiterator.inc2
-rw-r--r--ext/phar/phar/invertedregexiterator.inc2
-rw-r--r--ext/phar/phar/phar.inc2
-rwxr-xr-xext/phar/phar/phar.php2
-rw-r--r--ext/phar/tests/cache_list/files/frontcontroller13.phar.inc2
-rw-r--r--ext/phar/tests/cache_list/files/nophar.phar.inc2
-rw-r--r--ext/phar/tests/cache_list/files/phar_oo_test.inc2
-rw-r--r--ext/phar/tests/cache_list/files/phar_test.inc2
-rw-r--r--ext/phar/tests/files/frontcontroller13.phar.inc2
-rw-r--r--ext/phar/tests/files/nophar.phar.inc2
-rw-r--r--ext/phar/tests/files/phar_oo_test.inc2
-rw-r--r--ext/phar/tests/files/stuboflength1041.phar.inc2
-rw-r--r--ext/phar/tests/tar/files/corrupt_tarmaker.php.inc2
-rw-r--r--ext/phar/tests/tar/files/make.dangerous.tar.php.inc2
-rw-r--r--ext/phar/tests/tar/files/make_invalid_tar.php.inc2
-rw-r--r--ext/phar/tests/tar/files/tarmaker.php.inc2
-rw-r--r--ext/phar/tests/zip/files/corrupt_zipmaker.php.inc2
-rw-r--r--ext/phar/tests/zip/files/make_invalid_tar.php.inc2
-rw-r--r--ext/phar/tests/zip/files/zipmaker.php.inc2
24 files changed, 21 insertions, 25 deletions
diff --git a/ext/phar/Makefile.frag b/ext/phar/Makefile.frag
index e1dda15723..b27a1017e9 100644
--- a/ext/phar/Makefile.frag
+++ b/ext/phar/Makefile.frag
@@ -48,4 +48,3 @@ install-pharcmd: pharcmd
@$(mkinstalldirs) $(INSTALL_ROOT)$(mandir)/man1
@$(INSTALL_DATA) $(builddir)/phar.1 $(INSTALL_ROOT)$(mandir)/man1/phar.1
@$(INSTALL_DATA) $(builddir)/phar.phar.1 $(INSTALL_ROOT)$(mandir)/man1/phar.phar.1
-
diff --git a/ext/phar/Makefile.frag.w32 b/ext/phar/Makefile.frag.w32
index 29906a3723..4b36116902 100644
--- a/ext/phar/Makefile.frag.w32
+++ b/ext/phar/Makefile.frag.w32
@@ -1,5 +1,3 @@
-
ext\phar\phar_path_check.c: ext\phar\phar_path_check.re
cd $(PHP_SRC_DIR)
$(RE2C) $(RE2C_FLAGS) --no-generation-date -b -o ext/phar/phar_path_check.c ext/phar/phar_path_check.re
-
diff --git a/ext/phar/func_interceptors.c b/ext/phar/func_interceptors.c
index eb6dff8d27..87020c5ed8 100644
--- a/ext/phar/func_interceptors.c
+++ b/ext/phar/func_interceptors.c
@@ -1164,4 +1164,3 @@ void phar_restore_orig_functions(void) /* {{{ */
* vim600: noet sw=4 ts=4 fdm=marker
* vim<600: noet sw=4 ts=4
*/
-
diff --git a/ext/phar/gdbhelp b/ext/phar/gdbhelp
index 14ff89c56b..bd4150e3ef 100644
--- a/ext/phar/gdbhelp
+++ b/ext/phar/gdbhelp
@@ -119,4 +119,4 @@ document dump_entry
dump_entry "pharname"|"pharalias" "filename" [1]
display phar_entry_info for a file within a phar. If the optional third param
is passed in, displays the php_stream that is the file's fp
-end \ No newline at end of file
+end
diff --git a/ext/phar/phar/directorygraphiterator.inc b/ext/phar/phar/directorygraphiterator.inc
index 5a658ddabc..34579678a7 100644
--- a/ext/phar/phar/directorygraphiterator.inc
+++ b/ext/phar/phar/directorygraphiterator.inc
@@ -31,4 +31,4 @@ class DirectoryGraphIterator extends DirectoryTreeIterator
}
}
-?> \ No newline at end of file
+?>
diff --git a/ext/phar/phar/directorytreeiterator.inc b/ext/phar/phar/directorytreeiterator.inc
index 9ed2e1a1bf..2c681632fb 100644
--- a/ext/phar/phar/directorytreeiterator.inc
+++ b/ext/phar/phar/directorytreeiterator.inc
@@ -51,4 +51,4 @@ class DirectoryTreeIterator extends RecursiveIteratorIterator
}
}
-?> \ No newline at end of file
+?>
diff --git a/ext/phar/phar/invertedregexiterator.inc b/ext/phar/phar/invertedregexiterator.inc
index aec87e6ab1..8f82f41f2a 100644
--- a/ext/phar/phar/invertedregexiterator.inc
+++ b/ext/phar/phar/invertedregexiterator.inc
@@ -24,4 +24,4 @@ class InvertedRegexIterator extends RegexIterator
}
}
-?> \ No newline at end of file
+?>
diff --git a/ext/phar/phar/phar.inc b/ext/phar/phar/phar.inc
index c28de0aa7a..129a0c43bf 100644
--- a/ext/phar/phar/phar.inc
+++ b/ext/phar/phar/phar.inc
@@ -77,4 +77,4 @@ class Phar extends PHP_Archive implements RecursiveIterator
}
}
-?> \ No newline at end of file
+?>
diff --git a/ext/phar/phar/phar.php b/ext/phar/phar/phar.php
index f6f26c23f2..13538777a5 100755
--- a/ext/phar/phar/phar.php
+++ b/ext/phar/phar/phar.php
@@ -53,4 +53,4 @@ new PharCommand($argc, $argv);
__HALT_COMPILER();
-?> \ No newline at end of file
+?>
diff --git a/ext/phar/tests/cache_list/files/frontcontroller13.phar.inc b/ext/phar/tests/cache_list/files/frontcontroller13.phar.inc
index 0bfef46853..df74c13880 100644
--- a/ext/phar/tests/cache_list/files/frontcontroller13.phar.inc
+++ b/ext/phar/tests/cache_list/files/frontcontroller13.phar.inc
@@ -11,4 +11,4 @@ $a['oof/hi.php'] = '<?php
var_dump("hi");';
$a->setStub('<?php
Phar::webPhar();
-__HALT_COMPILER();'); \ No newline at end of file
+__HALT_COMPILER();');
diff --git a/ext/phar/tests/cache_list/files/nophar.phar.inc b/ext/phar/tests/cache_list/files/nophar.phar.inc
index 36d5628762..35b0ddc5e2 100644
--- a/ext/phar/tests/cache_list/files/nophar.phar.inc
+++ b/ext/phar/tests/cache_list/files/nophar.phar.inc
@@ -7,4 +7,4 @@ $p['web.php'] = '<?php echo "web\n";';
$p['b/c.php'] = '<?php echo "in b\n";$a = fopen("index.php", "r", true);echo stream_get_contents($a);fclose($a);include dirname(__FILE__) . "/../d";';
$p['d'] = "in d\n";
$p->setStub($p->createDefaultStub('index.php', 'web.php'));
-?> \ No newline at end of file
+?>
diff --git a/ext/phar/tests/cache_list/files/phar_oo_test.inc b/ext/phar/tests/cache_list/files/phar_oo_test.inc
index 9863e8da93..0691e4dc80 100644
--- a/ext/phar/tests/cache_list/files/phar_oo_test.inc
+++ b/ext/phar/tests/cache_list/files/phar_oo_test.inc
@@ -46,4 +46,4 @@ EOF;
$ftime = mktime(12, 0, 0, 3, 1, 2006);
include 'phar_test.inc';
-?> \ No newline at end of file
+?>
diff --git a/ext/phar/tests/cache_list/files/phar_test.inc b/ext/phar/tests/cache_list/files/phar_test.inc
index 047f4ea051..5f0031f560 100644
--- a/ext/phar/tests/cache_list/files/phar_test.inc
+++ b/ext/phar/tests/cache_list/files/phar_test.inc
@@ -73,4 +73,4 @@ if (@$bz2) {
fclose($fp);
}
-?> \ No newline at end of file
+?>
diff --git a/ext/phar/tests/files/frontcontroller13.phar.inc b/ext/phar/tests/files/frontcontroller13.phar.inc
index 0bfef46853..df74c13880 100644
--- a/ext/phar/tests/files/frontcontroller13.phar.inc
+++ b/ext/phar/tests/files/frontcontroller13.phar.inc
@@ -11,4 +11,4 @@ $a['oof/hi.php'] = '<?php
var_dump("hi");';
$a->setStub('<?php
Phar::webPhar();
-__HALT_COMPILER();'); \ No newline at end of file
+__HALT_COMPILER();');
diff --git a/ext/phar/tests/files/nophar.phar.inc b/ext/phar/tests/files/nophar.phar.inc
index 36d5628762..35b0ddc5e2 100644
--- a/ext/phar/tests/files/nophar.phar.inc
+++ b/ext/phar/tests/files/nophar.phar.inc
@@ -7,4 +7,4 @@ $p['web.php'] = '<?php echo "web\n";';
$p['b/c.php'] = '<?php echo "in b\n";$a = fopen("index.php", "r", true);echo stream_get_contents($a);fclose($a);include dirname(__FILE__) . "/../d";';
$p['d'] = "in d\n";
$p->setStub($p->createDefaultStub('index.php', 'web.php'));
-?> \ No newline at end of file
+?>
diff --git a/ext/phar/tests/files/phar_oo_test.inc b/ext/phar/tests/files/phar_oo_test.inc
index 45421568de..3883d494c1 100644
--- a/ext/phar/tests/files/phar_oo_test.inc
+++ b/ext/phar/tests/files/phar_oo_test.inc
@@ -47,4 +47,4 @@ EOF;
$ftime = mktime(12, 0, 0, 3, 1, 2006);
include 'phar_test.inc';
-?> \ No newline at end of file
+?>
diff --git a/ext/phar/tests/files/stuboflength1041.phar.inc b/ext/phar/tests/files/stuboflength1041.phar.inc
index 28ce8427f3..9d51a750df 100644
--- a/ext/phar/tests/files/stuboflength1041.phar.inc
+++ b/ext/phar/tests/files/stuboflength1041.phar.inc
@@ -18,4 +18,4 @@ $phar->setStub('<?php
************************************************************************************************
************************************************************************************************
*********************************************/
-__HALT_COMPILER();'); \ No newline at end of file
+__HALT_COMPILER();');
diff --git a/ext/phar/tests/tar/files/corrupt_tarmaker.php.inc b/ext/phar/tests/tar/files/corrupt_tarmaker.php.inc
index b5222f5805..4e30dca174 100644
--- a/ext/phar/tests/tar/files/corrupt_tarmaker.php.inc
+++ b/ext/phar/tests/tar/files/corrupt_tarmaker.php.inc
@@ -174,4 +174,4 @@ class corrupt_tarmaker
fwrite($this->tmp, pack('a1024', ''));
fclose($this->tmp);
}
-} \ No newline at end of file
+}
diff --git a/ext/phar/tests/tar/files/make.dangerous.tar.php.inc b/ext/phar/tests/tar/files/make.dangerous.tar.php.inc
index 52f5a23507..641dda56f5 100644
--- a/ext/phar/tests/tar/files/make.dangerous.tar.php.inc
+++ b/ext/phar/tests/tar/files/make.dangerous.tar.php.inc
@@ -167,4 +167,4 @@ class danger_tarmaker
fwrite($this->tmp, pack('a1024', ''));
fclose($this->tmp);
}
-} \ No newline at end of file
+}
diff --git a/ext/phar/tests/tar/files/make_invalid_tar.php.inc b/ext/phar/tests/tar/files/make_invalid_tar.php.inc
index 413dd7bd1b..895977bf2f 100644
--- a/ext/phar/tests/tar/files/make_invalid_tar.php.inc
+++ b/ext/phar/tests/tar/files/make_invalid_tar.php.inc
@@ -6,4 +6,4 @@ function close()
fwrite($this->tmp, (binary)'oopsie');
fclose($this->tmp);
}
-} \ No newline at end of file
+}
diff --git a/ext/phar/tests/tar/files/tarmaker.php.inc b/ext/phar/tests/tar/files/tarmaker.php.inc
index 0df7ee9933..5860bf84d3 100644
--- a/ext/phar/tests/tar/files/tarmaker.php.inc
+++ b/ext/phar/tests/tar/files/tarmaker.php.inc
@@ -166,4 +166,4 @@ class tarmaker
fwrite($this->tmp, pack('a1024', ''));
fclose($this->tmp);
}
-} \ No newline at end of file
+}
diff --git a/ext/phar/tests/zip/files/corrupt_zipmaker.php.inc b/ext/phar/tests/zip/files/corrupt_zipmaker.php.inc
index ddac6a4ade..80c6a3eab6 100644
--- a/ext/phar/tests/zip/files/corrupt_zipmaker.php.inc
+++ b/ext/phar/tests/zip/files/corrupt_zipmaker.php.inc
@@ -328,4 +328,4 @@ class corrupt_zipmaker
file_put_contents($zipfile, $write);
}
}
-?> \ No newline at end of file
+?>
diff --git a/ext/phar/tests/zip/files/make_invalid_tar.php.inc b/ext/phar/tests/zip/files/make_invalid_tar.php.inc
index cec8ef7793..4f4758bbb6 100644
--- a/ext/phar/tests/zip/files/make_invalid_tar.php.inc
+++ b/ext/phar/tests/zip/files/make_invalid_tar.php.inc
@@ -9,4 +9,4 @@ function close()
fwrite($fp, 'oopsie');
fclose($fp);
}
-} \ No newline at end of file
+}
diff --git a/ext/phar/tests/zip/files/zipmaker.php.inc b/ext/phar/tests/zip/files/zipmaker.php.inc
index ad16fda659..c9eebad7ed 100644
--- a/ext/phar/tests/zip/files/zipmaker.php.inc
+++ b/ext/phar/tests/zip/files/zipmaker.php.inc
@@ -67,4 +67,4 @@ class zipmaker
{
$this->zip->close();
}
-} \ No newline at end of file
+}