NoAliasFunctionsFixer
extends AbstractFixer
in package
implements
ConfigurableFixerInterface
uses
ConfigurableFixerTrait
FinalYes
Tags
Table of Contents
Interfaces
Constants
- SETS = ['@internal' => ['diskfreespace' => 'disk_free_space', 'dns_check_record' => 'checkdnsrr', 'dns_get_mx' => 'getmxrr', 'session_commit' => 'session_write_close', 'stream_register_wrapper' => 'stream_wrapper_register', 'set_file_buffer' => 'stream_set_write_buffer', 'socket_set_blocking' => 'stream_set_blocking', 'socket_get_status' => 'stream_get_meta_data', 'socket_set_timeout' => 'stream_set_timeout', 'socket_getopt' => 'socket_get_option', 'socket_setopt' => 'socket_set_option', 'chop' => 'rtrim', 'close' => 'closedir', 'doubleval' => 'floatval', 'fputs' => 'fwrite', 'get_required_files' => 'get_included_files', 'ini_alter' => 'ini_set', 'is_double' => 'is_float', 'is_integer' => 'is_int', 'is_long' => 'is_int', 'is_real' => 'is_float', 'is_writeable' => 'is_writable', 'join' => 'implode', 'key_exists' => 'array_key_exists', 'magic_quotes_runtime' => 'set_magic_quotes_runtime', 'pos' => 'current', 'show_source' => 'highlight_file', 'sizeof' => 'count', 'strchr' => 'strstr', 'user_error' => 'trigger_error'], '@IMAP' => ['imap_create' => 'imap_createmailbox', 'imap_fetchtext' => 'imap_body', 'imap_header' => 'imap_headerinfo', 'imap_listmailbox' => 'imap_list', 'imap_listsubscribed' => 'imap_lsub', 'imap_rename' => 'imap_renamemailbox', 'imap_scan' => 'imap_listscan', 'imap_scanmailbox' => 'imap_listscan'], '@ldap' => ['ldap_close' => 'ldap_unbind', 'ldap_modify' => 'ldap_mod_replace'], '@mysqli' => ['mysqli_execute' => 'mysqli_stmt_execute', 'mysqli_set_opt' => 'mysqli_options', 'mysqli_escape_string' => 'mysqli_real_escape_string'], '@pg' => ['pg_exec' => 'pg_query'], '@oci' => ['oci_free_cursor' => 'oci_free_statement'], '@odbc' => ['odbc_do' => 'odbc_exec', 'odbc_field_precision' => 'odbc_field_len'], '@mbreg' => ['mbereg' => 'mb_ereg', 'mbereg_match' => 'mb_ereg_match', 'mbereg_replace' => 'mb_ereg_replace', 'mbereg_search' => 'mb_ereg_search', 'mbereg_search_getpos' => 'mb_ereg_search_getpos', 'mbereg_search_getregs' => 'mb_ereg_search_getregs', 'mbereg_search_init' => 'mb_ereg_search_init', 'mbereg_search_pos' => 'mb_ereg_search_pos', 'mbereg_search_regs' => 'mb_ereg_search_regs', 'mbereg_search_setpos' => 'mb_ereg_search_setpos', 'mberegi' => 'mb_eregi', 'mberegi_replace' => 'mb_eregi_replace', 'mbregex_encoding' => 'mb_regex_encoding', 'mbsplit' => 'mb_split'], '@openssl' => ['openssl_get_publickey' => 'openssl_pkey_get_public', 'openssl_get_privatekey' => 'openssl_pkey_get_private'], '@sodium' => ['sodium_crypto_scalarmult_base' => 'sodium_crypto_box_publickey_from_secretkey'], '@exif' => ['read_exif_data' => 'exif_read_data'], '@ftp' => ['ftp_quit' => 'ftp_close'], '@posix' => ['posix_errno' => 'posix_get_last_error'], '@pcntl' => ['pcntl_errno' => 'pcntl_get_last_error'], '@time' => ['mktime' => ['time', 0], 'gmmktime' => ['time', 0]]]
Properties
- $aliases : array<string, array{: string, : int}|string>
Methods
- getDefinition() : FixerDefinitionInterface
- Returns the definition of the fixer.
- getPriority() : int
- Returns the priority of the fixer.
- isCandidate() : bool
- Check if the fixer is a candidate for given Tokens collection.
- isRisky() : bool
- Check if fixer is risky or not.
- applyFix() : void
- configurePostNormalisation() : void
- createConfigurationDefinition() : FixerConfigurationResolverInterface
Constants
SETS
private
mixed
SETS
= ['@internal' => ['diskfreespace' => 'disk_free_space', 'dns_check_record' => 'checkdnsrr', 'dns_get_mx' => 'getmxrr', 'session_commit' => 'session_write_close', 'stream_register_wrapper' => 'stream_wrapper_register', 'set_file_buffer' => 'stream_set_write_buffer', 'socket_set_blocking' => 'stream_set_blocking', 'socket_get_status' => 'stream_get_meta_data', 'socket_set_timeout' => 'stream_set_timeout', 'socket_getopt' => 'socket_get_option', 'socket_setopt' => 'socket_set_option', 'chop' => 'rtrim', 'close' => 'closedir', 'doubleval' => 'floatval', 'fputs' => 'fwrite', 'get_required_files' => 'get_included_files', 'ini_alter' => 'ini_set', 'is_double' => 'is_float', 'is_integer' => 'is_int', 'is_long' => 'is_int', 'is_real' => 'is_float', 'is_writeable' => 'is_writable', 'join' => 'implode', 'key_exists' => 'array_key_exists', 'magic_quotes_runtime' => 'set_magic_quotes_runtime', 'pos' => 'current', 'show_source' => 'highlight_file', 'sizeof' => 'count', 'strchr' => 'strstr', 'user_error' => 'trigger_error'], '@IMAP' => ['imap_create' => 'imap_createmailbox', 'imap_fetchtext' => 'imap_body', 'imap_header' => 'imap_headerinfo', 'imap_listmailbox' => 'imap_list', 'imap_listsubscribed' => 'imap_lsub', 'imap_rename' => 'imap_renamemailbox', 'imap_scan' => 'imap_listscan', 'imap_scanmailbox' => 'imap_listscan'], '@ldap' => ['ldap_close' => 'ldap_unbind', 'ldap_modify' => 'ldap_mod_replace'], '@mysqli' => ['mysqli_execute' => 'mysqli_stmt_execute', 'mysqli_set_opt' => 'mysqli_options', 'mysqli_escape_string' => 'mysqli_real_escape_string'], '@pg' => ['pg_exec' => 'pg_query'], '@oci' => ['oci_free_cursor' => 'oci_free_statement'], '@odbc' => ['odbc_do' => 'odbc_exec', 'odbc_field_precision' => 'odbc_field_len'], '@mbreg' => ['mbereg' => 'mb_ereg', 'mbereg_match' => 'mb_ereg_match', 'mbereg_replace' => 'mb_ereg_replace', 'mbereg_search' => 'mb_ereg_search', 'mbereg_search_getpos' => 'mb_ereg_search_getpos', 'mbereg_search_getregs' => 'mb_ereg_search_getregs', 'mbereg_search_init' => 'mb_ereg_search_init', 'mbereg_search_pos' => 'mb_ereg_search_pos', 'mbereg_search_regs' => 'mb_ereg_search_regs', 'mbereg_search_setpos' => 'mb_ereg_search_setpos', 'mberegi' => 'mb_eregi', 'mberegi_replace' => 'mb_eregi_replace', 'mbregex_encoding' => 'mb_regex_encoding', 'mbsplit' => 'mb_split'], '@openssl' => ['openssl_get_publickey' => 'openssl_pkey_get_public', 'openssl_get_privatekey' => 'openssl_pkey_get_private'], '@sodium' => ['sodium_crypto_scalarmult_base' => 'sodium_crypto_box_publickey_from_secretkey'], '@exif' => ['read_exif_data' => 'exif_read_data'], '@ftp' => ['ftp_quit' => 'ftp_close'], '@posix' => ['posix_errno' => 'posix_get_last_error'], '@pcntl' => ['pcntl_errno' => 'pcntl_get_last_error'], '@time' => ['mktime' => ['time', 0], 'gmmktime' => ['time', 0]]]
Properties
$aliases
private
array<string, array{: string, : int}|string>
$aliases
= []
stores alias (key) - master (value) functions mapping
Methods
getDefinition()
Returns the definition of the fixer.
public
getDefinition() : FixerDefinitionInterface
Return values
FixerDefinitionInterfacegetPriority()
Returns the priority of the fixer.
public
getPriority() : int
Must run before ImplodeCallFixer, PhpUnitDedicateAssertFixer.
Return values
intisCandidate()
Check if the fixer is a candidate for given Tokens collection.
public
isCandidate(Tokens $tokens) : bool
Fixer is a candidate when the collection contains tokens that may be fixed during fixer work. This could be considered as some kind of bloom filter. When this method returns true then to the Tokens collection may or may not need a fixing, but when this method returns false then the Tokens collection need no fixing for sure.
Parameters
- $tokens : Tokens
Return values
boolisRisky()
Check if fixer is risky or not.
public
isRisky() : bool
Risky fixer could change code behavior!
Return values
boolapplyFix()
protected
applyFix(SplFileInfo $file, Tokens $tokens) : void
Parameters
- $file : SplFileInfo
- $tokens : Tokens
configurePostNormalisation()
protected
configurePostNormalisation() : void
createConfigurationDefinition()
protected
createConfigurationDefinition() : FixerConfigurationResolverInterface