]> granicus.if.org Git - php/commitdiff
Review parameter names in ext/exif
authorMáté Kocsis <kocsismate@woohoolabs.com>
Thu, 1 Oct 2020 21:20:09 +0000 (23:20 +0200)
committerMáté Kocsis <kocsismate@woohoolabs.com>
Fri, 2 Oct 2020 09:56:16 +0000 (11:56 +0200)
Closes GH-6256

ext/exif/exif.stub.php
ext/exif/exif_arginfo.h
ext/exif/tests/filename_empty.phpt

index 9cc099ba2a46555a96c563649839a991f5218726..9a8afe8577f3d64915192e7a614ed85cc2df0561 100644 (file)
@@ -4,15 +4,15 @@
 
 function exif_tagname(int $index): string|false {}
 
-/** @param resource|string $filename */
-function exif_read_data($filename, ?string $sections_needed = null, bool $sub_arrays = false, bool $read_thumbnail = false): array|false {}
+/** @param resource|string $file */
+function exif_read_data($file, ?string $required_sections = null, bool $as_arrays = false, bool $read_thumbnail = false): array|false {}
 
 /**
- * @param resource|string $filename
+ * @param resource|string $file
  * @param int $width
  * @param int $height
- * @param int $imagetype
+ * @param int $image_type
  */
-function exif_thumbnail($filename, &$width = null, &$height = null, &$imagetype = null): string|false {}
+function exif_thumbnail($file, &$width = null, &$height = null, &$image_type = null): string|false {}
 
 function exif_imagetype(string $filename): int|false {}
index b16f457c56d10d0fb644efe2b628ec491c361915..91dd8b0e61ab6cff43636ed1f103890f23fa548a 100644 (file)
@@ -1,22 +1,22 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: d8cb3719a7de74b27b306c30b6be0af0647b6af4 */
+ * Stub hash: ef23ff502ea9658af29e50d57366c281f7a7eb6c */
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_exif_tagname, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
        ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0)
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_exif_read_data, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
-       ZEND_ARG_INFO(0, filename)
-       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sections_needed, IS_STRING, 1, "null")
-       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sub_arrays, _IS_BOOL, 0, "false")
+       ZEND_ARG_INFO(0, file)
+       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, required_sections, IS_STRING, 1, "null")
+       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, as_arrays, _IS_BOOL, 0, "false")
        ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, read_thumbnail, _IS_BOOL, 0, "false")
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_exif_thumbnail, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
-       ZEND_ARG_INFO(0, filename)
+       ZEND_ARG_INFO(0, file)
        ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, width, "null")
        ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, height, "null")
-       ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, imagetype, "null")
+       ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, image_type, "null")
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_exif_imagetype, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
index b2f58ae3c5ea47744dd468ddba3cd7bd39378946..fb2c90fdb7f903ed5ae95f9ec7744c4038b99e42 100644 (file)
@@ -29,7 +29,7 @@ try {
 
 ?>
 --EXPECT--
-exif_read_data(): Argument #1 ($filename) cannot be empty
-exif_thumbnail(): Argument #1 ($filename) cannot be empty
-exif_read_data(): Argument #1 ($filename) must not contain any null bytes
-exif_thumbnail(): Argument #1 ($filename) must not contain any null bytes
+exif_read_data(): Argument #1 ($file) cannot be empty
+exif_thumbnail(): Argument #1 ($file) cannot be empty
+exif_read_data(): Argument #1 ($file) must not contain any null bytes
+exif_thumbnail(): Argument #1 ($file) must not contain any null bytes