]> granicus.if.org Git - php/commitdiff
Enhance the ext_skel.php script file
authorPeter Kokot <peterkokot@gmail.com>
Sat, 26 May 2018 18:23:11 +0000 (20:23 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Sat, 26 May 2018 20:00:17 +0000 (22:00 +0200)
- File is now executable
- Shebang added on top
- Normal UTF-8 encoding instead of UTF-8 with BOM
- trailing whitespaces trimmed as a CS fix
- Closing PHP tag removed in favor of readability, avoiding possible
  issues with whitespaces, and to comply with current CS from the
  PHP ecosystem - PSRs etc.

ext/ext_skel.php [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index adfe76d..f796a0d
@@ -1,4 +1,5 @@
-<?php
+#!/usr/bin/env php
+<?php
 /*
    +----------------------------------------------------------------------+
    | PHP Version 7                                                        |
@@ -91,13 +92,13 @@ function print_success() {
  */
 function process_args($argv, $argc) {
        $options = [
-                       'unix'          => true, 
-                       'windows'       => true, 
-                       'ext'           => '', 
-                       'dir'           => __DIR__ . DIRECTORY_SEPARATOR, 
-                       'skel'          => __DIR__ . DIRECTORY_SEPARATOR . 'skeleton' . DIRECTORY_SEPARATOR, 
-                       'author'        => false, 
-                       'experimental'  => false, 
+                       'unix'          => true,
+                       'windows'       => true,
+                       'ext'           => '',
+                       'dir'           => __DIR__ . DIRECTORY_SEPARATOR,
+                       'skel'          => __DIR__ . DIRECTORY_SEPARATOR . 'skeleton' . DIRECTORY_SEPARATOR,
+                       'author'        => false,
+                       'experimental'  => false,
                        'std'           => false
                        ];
 
@@ -269,7 +270,7 @@ function copy_sources() {
        global $options;
 
        $files = [
-                       'skeleton.c'            => $options['ext'] . '.c', 
+                       'skeleton.c'            => $options['ext'] . '.c',
                        'php_skeleton.h'        => 'php_' . $options['ext'] . '.h'
                        ];
 
@@ -359,5 +360,3 @@ task('Copying sources', 'copy_sources');
 task('Copying tests', 'copy_tests');
 
 print_success();
-
-?>
\ No newline at end of file