summaryrefslogtreecommitdiff
path: root/ext/imap/php_imap.c
diff options
context:
space:
mode:
authorNikita Popov <nikic@php.net>2016-08-11 20:24:22 +0200
committerNikita Popov <nikic@php.net>2016-08-16 15:48:33 +0200
commitba09a520d230506b26ba75e0714131b4ad16d034 (patch)
treea86af17ab3694253c95b78453fce30f12d9ae13b /ext/imap/php_imap.c
parent1397f754c8b51ad879c18da85be6b8d1baf77c19 (diff)
downloadphp-git-ba09a520d230506b26ba75e0714131b4ad16d034.tar.gz
Cleanup parameter/return type checking code
a) Extract all the logic for error message formatting into a separate function that is reused for everything. b) Extract the logic for whether a value matches a type into two functions, one for user types, one for internal ones. This tries to fight the increasing code duplication in the type checking code, whether everything was repeated at least four times and parts of the error message handling were repeated in dozens of branches.
Diffstat (limited to 'ext/imap/php_imap.c')
0 files changed, 0 insertions, 0 deletions