]> granicus.if.org Git - php/commitdiff
Display string default values in stubs more uniformly
authorMáté Kocsis <kocsismate@woohoolabs.com>
Wed, 16 Sep 2020 19:27:01 +0000 (21:27 +0200)
committerMáté Kocsis <kocsismate@woohoolabs.com>
Wed, 16 Sep 2020 19:27:01 +0000 (21:27 +0200)
Settling on using quoted string

13 files changed:
ext/hash/hash.stub.php
ext/imap/php_imap.stub.php
ext/ldap/ldap.stub.php
ext/oci8/oci8.stub.php
ext/odbc/odbc.stub.php
ext/simplexml/simplexml.stub.php
ext/snmp/snmp.stub.php
ext/spl/spl_directory.stub.php
ext/sqlite3/sqlite3.stub.php
ext/standard/basic_functions.stub.php
ext/xml/xml.stub.php
ext/xmlwriter/php_xmlwriter.stub.php
ext/zip/php_zip.stub.php

index d2e9d1aee10192a61d7e0d3720da34e7ff163a28..a8f90cd5ec98cd9a64ee0d3447da150a1fa46c6e 100644 (file)
@@ -32,7 +32,7 @@ function hash_pbkdf2(string $algo, string $password, string $salt, int $iteratio
 
 function hash_equals(string $known_string, string $user_string): bool {}
 
-function hash_hkdf(string $algo, string $ikm, int $length = 0, string $info = '', string $salt = ''): string {}
+function hash_hkdf(string $algo, string $ikm, int $length = 0, string $info = "", string $salt = ""): string {}
 
 #ifdef PHP_MHASH_BC
 function mhash_get_block_size(int $hash): int|false {}
index d707af161c29a7f1d2be13fa36e37c68944691c6..9d2e1082c1a7c802f36aaa8d5913c530cde95b7b 100644 (file)
@@ -35,7 +35,7 @@ function imap_headerinfo($stream_id, int $msg_no, int $from_length = 0, int $sub
  */
 function imap_header($stream_id, int $msg_no, int $from_length = 0, int $subject_length = 0, string $default_host = UNKNOWN): stdClass|false {}
 
-function imap_rfc822_parse_headers(string $headers, string $default_host = 'UNKNOWN'): stdClass {}
+function imap_rfc822_parse_headers(string $headers, string $default_host = "UNKNOWN"): stdClass {}
 
 function imap_rfc822_write_address(string $mailbox, string $host, string $personal): string|false {}
 
@@ -66,7 +66,7 @@ function imap_fetchmime($stream_id, int $msg_no, string $section, int $options =
  * @param resource $stream_id
  * @param resource|string|int $file
  */
-function imap_savebody($stream_id, $file, int $msg_no, string $section = '', int $options = 0): bool {}
+function imap_savebody($stream_id, $file, int $msg_no, string $section = "", int $options = 0): bool {}
 
 /** @param resource $stream_id */
 function imap_fetchheader($stream_id, int $msg_no, int $options = 0): string|false {}
@@ -222,7 +222,7 @@ function imap_errors(): array|false {}
 function imap_last_error(): string|false {}
 
 /** @param resource $stream_id */
-function imap_search($stream_id, string $criteria, int $options = SE_FREE, string $charset = ''): array|false {}
+function imap_search($stream_id, string $criteria, int $options = SE_FREE, string $charset = ""): array|false {}
 
 function imap_utf7_decode(string $buf): string|false {}
 
index e46d1405453e827863cde9e016f4c53493074609..372458fe78b9ebe0c8b805acba4fc7ffe608ca3e 100644 (file)
@@ -193,7 +193,7 @@ function ldap_compare($link_identifier, string $dn, string $attribute, string $v
  * @param resource $link
  * @deprecated since 7.4
  */
-function ldap_control_paged_result($link, int $pagesize, bool $iscritical = false, string $cookie = ''): bool {}
+function ldap_control_paged_result($link, int $pagesize, bool $iscritical = false, string $cookie = ""): bool {}
 
 /**
  * @param resource $link
@@ -281,7 +281,7 @@ function ldap_set_rebind_proc($link, ?callable $callback): bool {}
 function ldap_start_tls($link_identifier): bool {}
 #endif
 
-function ldap_escape(string $value, string $ignore = '', int $flags = 0): string {}
+function ldap_escape(string $value, string $ignore = "", int $flags = 0): string {}
 
 #ifdef STR_TRANSLATION
 function ldap_t61_to_8859(string $value): string|false {}
@@ -305,7 +305,7 @@ function ldap_exop($link, string $reqoid, ?string $reqdata = null, ?array $serve
  * @param resource $link
  * @param array $serverctrls
  */
-function ldap_exop_passwd($link, string $user = '', string $oldpw = '', string $newpw = '', &$serverctrls = null): string|bool {}
+function ldap_exop_passwd($link, string $user = "", string $oldpw = "", string $newpw = "", &$serverctrls = null): string|bool {}
 #endif
 
 
index 58eb984f94c63255d856790d9d15f67aa4e7a82c..419df17be09566dfc5c4bad1a8aad6911d9bcaad 100644 (file)
@@ -332,38 +332,38 @@ function ocilogoff($connection_resource): ?bool {}
 /**
  * @return resource|false
  */
-function oci_new_connect(string $username, string $password, ?string $connection_string = null, string $character_set = '', int $session_mode = OCI_DEFAULT) {}
+function oci_new_connect(string $username, string $password, ?string $connection_string = null, string $character_set = "", int $session_mode = OCI_DEFAULT) {}
 
 /**
  * @return resource|false
  * @alias oci_new_connect
  * @deprecated
  */
-function ocinlogon(string $username, string $password, ?string $connection_string = null, string $character_set = '', int $session_mode = OCI_DEFAULT) {}
+function ocinlogon(string $username, string $password, ?string $connection_string = null, string $character_set = "", int $session_mode = OCI_DEFAULT) {}
 
 /**
  * @return resource|false
  */
-function oci_connect(string $username, string $password, ?string $connection_string = null, string $character_set = '', int $session_mode = OCI_DEFAULT) {}
+function oci_connect(string $username, string $password, ?string $connection_string = null, string $character_set = "", int $session_mode = OCI_DEFAULT) {}
 
 /**
  * @return resource|false
  * @alias oci_connect
  * @deprecated
  */
-function ocilogon(string $username, string $password, ?string $connection_string = null, string $character_set = '', int $session_mode = OCI_DEFAULT) {}
+function ocilogon(string $username, string $password, ?string $connection_string = null, string $character_set = "", int $session_mode = OCI_DEFAULT) {}
 
 /**
  * @return resource|false
  */
-function oci_pconnect(string $username, string $password, ?string $connection_string = null, string $character_set = '', int $session_mode = OCI_DEFAULT) {}
+function oci_pconnect(string $username, string $password, ?string $connection_string = null, string $character_set = "", int $session_mode = OCI_DEFAULT) {}
 
 /**
  * @return resource|false
  * @alias oci_pconnect
  * @deprecated
  */
-function ociplogon(string $username, string $password, ?string $connection_string = null, string $character_set = '', int $session_mode = OCI_DEFAULT) {}
+function ociplogon(string $username, string $password, ?string $connection_string = null, string $character_set = "", int $session_mode = OCI_DEFAULT) {}
 
 /**
  * @param resource|null $connection_or_statement_resource
index cb318f7ac9d4f75a92699f3e2f4dc644945b24bf..9316f1d7e41cea1966b078325d263f9ef0bbbc37 100644 (file)
@@ -61,7 +61,7 @@ function odbc_fetch_row($result_id, int $row_number = UNKNOWN): bool {}
 function odbc_result($result_id, string|int $field): string|bool|null {}
 
 /** @param resource $result_id */
-function odbc_result_all($result_id, string $format = ''): int|false {}
+function odbc_result_all($result_id, string $format = ""): int|false {}
 
 /** @param resource $result_id */
 function odbc_free_result($result_id): bool {}
index d068cb2d713ccdf600b452293cce097dcd502694..7d56de88e9fec3d20d64a267cd234194365d8aee 100644 (file)
@@ -2,9 +2,9 @@
 
 /** @generate-function-entries */
 
-function simplexml_load_file(string $filename, ?string $class_name = SimpleXMLElement::class, int $options = 0, string $namespace_or_prefix = '', bool $is_prefix = false): SimpleXMLElement|false {}
+function simplexml_load_file(string $filename, ?string $class_name = SimpleXMLElement::class, int $options = 0, string $namespace_or_prefix = "", bool $is_prefix = false): SimpleXMLElement|false {}
 
-function simplexml_load_string(string $data, ?string $class_name = SimpleXMLElement::class, int $options = 0, string $namespace_or_prefix = '', bool $is_prefix = false): SimpleXMLElement|false {}
+function simplexml_load_string(string $data, ?string $class_name = SimpleXMLElement::class, int $options = 0, string $namespace_or_prefix = "", bool $is_prefix = false): SimpleXMLElement|false {}
 
 function simplexml_import_dom(DOMNode $node, ?string $class_name = SimpleXMLElement::class): ?SimpleXMLElement {}
 
@@ -37,7 +37,7 @@ class SimpleXMLElement implements Stringable, Countable, RecursiveIterator
     /** @return SimpleXMLIterator */
     public function attributes(?string $namespaceOrPrefix = null, bool $isPrefix = false) {}
 
-    public function __construct(string $data, int $options = 0, bool $dataIsURL = false, string $namespaceOrPrefix = '', bool $isPrefix = false) {}
+    public function __construct(string $data, int $options = 0, bool $dataIsURL = false, string $namespaceOrPrefix = "", bool $isPrefix = false) {}
 
     /** @return SimpleXMLElement */
     public function addChild(string $qualifiedName, ?string $value = null, ?string $namespace = null) {}
index e7592ee67b9972abb95d8e1c119c81c0f10773dd..28cdd5f4f71551e1ff12e826a008bfab07174603 100644 (file)
@@ -60,7 +60,7 @@ class SNMP
     public function close() {}
 
     /** @return bool */
-    public function setSecurity(string $sec_level, string $auth_protocol = '', string $auth_passphrase = '', string $priv_protocol = '', string $priv_passphrase = '', string $contextName = '', string $contextEngineID = '') {}
+    public function setSecurity(string $sec_level, string $auth_protocol = "", string $auth_passphrase = "", string $priv_protocol = "", string $priv_passphrase = "", string $contextName = "", string $contextEngineID = "") {}
 
     /** @return array|bool */
     public function get(array|string $object_id, bool $use_orignames = false) {}
index 0e942a2e12bf5030d4654e698c1cff50417ce9de..92c9f8813a2c1ccd2b6f140c589be02de0b9688e 100755 (executable)
@@ -82,7 +82,7 @@ class SplFileInfo
      * @param resource|null $context
      * @return SplFileObject
      */
-    public function openFile(string $open_mode = 'r', bool $use_include_path = false, $context = null) {}
+    public function openFile(string $open_mode = "r", bool $use_include_path = false, $context = null) {}
 
     /** @return void */
     public function setFileClass(string $class_name = SplFileObject::class) {}
@@ -188,7 +188,7 @@ class GlobIterator extends FilesystemIterator implements Countable
 class SplFileObject extends SplFileInfo implements RecursiveIterator, SeekableIterator
 {
     /** @param resource|null $context */
-    public function __construct(string $file_name, string $open_mode = 'r', bool $use_include_path = false, $context = null) {}
+    public function __construct(string $file_name, string $open_mode = "r", bool $use_include_path = false, $context = null) {}
 
     /** @return void */
     public function rewind() {}
@@ -206,10 +206,10 @@ class SplFileObject extends SplFileInfo implements RecursiveIterator, SeekableIt
     public function fread(int $length) {}
 
     /** @return array|false */
-    public function fgetcsv(string $delimiter = ",", string $enclosure = '"', string $escape = "\\") {}
+    public function fgetcsv(string $delimiter = ",", string $enclosure = "\"", string $escape = "\\") {}
 
     /** @return int|false */
-    public function fputcsv(array $fields, string $delimiter = ',', string $enclosure = '"', string $escape = "\\") {}
+    public function fputcsv(array $fields, string $delimiter = ",", string $enclosure = "\"", string $escape = "\\") {}
 
     /** @return bool|null */
     public function setCsvControl(string $delimiter = ",", string $enclosure = "\"", string $escape = "\\") {}
index d2435051e14e0fff18fdb15d1b344d7826a489d3..132bd44cbb8e785acce31277d5cd095c9415a225 100644 (file)
@@ -5,10 +5,10 @@
 class SQLite3
 {
     /** @alias SQLite3::open */
-    public function __construct(string $filename, int $flags = SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE, string $encryption_key = '') {}
+    public function __construct(string $filename, int $flags = SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE, string $encryption_key = "") {}
 
     /** @return void */
-    public function open(string $filename, int $flags = SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE, string $encryption_key = '') {}
+    public function open(string $filename, int $flags = SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE, string $encryption_key = "") {}
 
     /** @return bool */
     public function close() {}
index d0df30c0564c8b93b67334aad03be2db4fda0e08..7304223bfb7531d0d7f25776a2a0ef79972874b0 100755 (executable)
@@ -502,9 +502,9 @@ function header(string $string, bool $replace = true, int $http_response_code =
 
 function header_remove(?string $name = null): void {}
 
-function setrawcookie(string $name, string $value = '', array|int $expires_or_options = 0, string $path = '', string $domain = '', bool $secure = false, bool $httponly = false): bool {}
+function setrawcookie(string $name, string $value = "", array|int $expires_or_options = 0, string $path = "", string $domain = "", bool $secure = false, bool $httponly = false): bool {}
 
-function setcookie(string $name, string $value = '', array|int $expires_or_options = 0, string $path = '', string $domain = '', bool $secure = false, bool $httponly = false): bool {}
+function setcookie(string $name, string $value = "", array|int $expires_or_options = 0, string $path = "", string $domain = "", bool $secure = false, bool $httponly = false): bool {}
 
 function http_response_code(int $response_code = 0): int|bool {}
 
@@ -660,7 +660,7 @@ function setlocale(int $category, $locales, ...$rest): string|false {}
 /** @param array $result */
 function parse_str(string $encoded_string, &$result): void {}
 
-function str_getcsv(string $string, string $delimiter = ',', string $enclosure = '"', string $escape = '\\'): array {}
+function str_getcsv(string $string, string $delimiter = ",", string $enclosure = "\"", string $escape = '\\'): array {}
 
 function str_repeat(string $input, int $mult): string {}
 
@@ -865,7 +865,7 @@ function file_put_contents(string $filename, mixed $content, int $flags = 0, $co
 function fputcsv($handle, array $fields, string $delimiter = ",", string $enclosure = "\"", string $escape = "\\"): int|false {}
 
 /** @param resource $handle */
-function fgetcsv($handle, ?int $length = null, string $delimiter = ",", string $enclosure = '"', string $escape = "\\"): array|false {}
+function fgetcsv($handle, ?int $length = null, string $delimiter = ",", string $enclosure = "\"", string $escape = "\\"): array|false {}
 
 function realpath(string $path): string|false {}
 
index 5f90d91fe46556b6578b0e0b473c70352dc9d8a6..b5af23376146b2a072e2e17471723bde7a642a5f 100644 (file)
@@ -4,7 +4,7 @@
 
 function xml_parser_create(?string $encoding = null): XmlParser {}
 
-function xml_parser_create_ns(?string $encoding = null, string $sep = ':'): XmlParser {}
+function xml_parser_create_ns(?string $encoding = null, string $sep = ":"): XmlParser {}
 
 function xml_set_object(XmlParser $parser, object $obj): bool {}
 
index 5b3b4f512b1be3373935ee893055ff91c4bb2cb7..fd12e5bdbe4ef0d2df01bbfcda1e30eb09f811e7 100644 (file)
@@ -52,7 +52,7 @@ function xmlwriter_text(XMLWriter $xmlwriter, string $content): bool {}
 
 function xmlwriter_write_raw(XMLWriter $xmlwriter, string $content): bool {}
 
-function xmlwriter_start_document(XMLWriter $xmlwriter, ?string $version = '1.0', ?string $encoding = null, ?string $standalone = null): bool {}
+function xmlwriter_start_document(XMLWriter $xmlwriter, ?string $version = "1.0", ?string $encoding = null, ?string $standalone = null): bool {}
 
 function xmlwriter_end_document(XMLWriter $xmlwriter): bool {}
 
@@ -164,7 +164,7 @@ class XMLWriter
     public function writeRaw(string $content): bool {}
 
     /** @alias xmlwriter_start_document */
-    public function startDocument(?string $version = '1.0', ?string $encoding = null, ?string $standalone = null): bool {}
+    public function startDocument(?string $version = "1.0", ?string $encoding = null, ?string $standalone = null): bool {}
 
     /** @alias xmlwriter_end_document */
     public function endDocument(): bool {}
index 6b81a623b0734857a904c17b6d50db38bea71721..7da7bfea39221a19df6df3f326656be6292a7a2e 100644 (file)
@@ -26,7 +26,7 @@ function zip_read($zip) {}
  * @param resource $zip_entry
  * @deprecated
  */
-function zip_entry_open($zip_dp, $zip_entry, string $mode = 'rb'): bool {}
+function zip_entry_open($zip_dp, $zip_entry, string $mode = "rb"): bool {}
 
 /**
  * @param resource $zip_ent