From 9bdf9eefd33b7e9e24755fbdb821a5b2a4422582 Mon Sep 17 00:00:00 2001 From: Matt Brown Date: Tue, 10 Apr 2018 12:38:29 -0400 Subject: [PATCH] Revert changes to sorting, force int return types for comparison functions --- src/Psalm/CallMap.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Psalm/CallMap.php b/src/Psalm/CallMap.php index bd465f404..edbd9be5b 100644 --- a/src/Psalm/CallMap.php +++ b/src/Psalm/CallMap.php @@ -361,8 +361,8 @@ return [ 'ArrayIterator::seek' => ['void', 'position'=>'int'], 'ArrayIterator::serialize' => ['string'], 'ArrayIterator::setFlags' => ['void', 'flags'=>'string'], -'ArrayIterator::uasort' => ['void', 'cmp_function'=>'callable(mixed,mixed):(int|bool)'], -'ArrayIterator::uksort' => ['void', 'cmp_function'=>'callable(mixed,mixed):(int|bool)'], +'ArrayIterator::uasort' => ['void', 'cmp_function'=>'callable(mixed,mixed):int'], +'ArrayIterator::uksort' => ['void', 'cmp_function'=>'callable(mixed,mixed):int'], 'ArrayIterator::unserialize' => ['string', 'serialized'=>'string'], 'ArrayIterator::valid' => ['bool'], 'ArrayObject::__construct' => ['void', 'input='=>'array|object', 'flags='=>'int', 'iterator_class='=>'string'], @@ -384,8 +384,8 @@ return [ 'ArrayObject::serialize' => ['string'], 'ArrayObject::setFlags' => ['void', 'flags'=>'int'], 'ArrayObject::setIteratorClass' => ['void', 'iterator_class'=>'string'], -'ArrayObject::uasort' => ['void', 'cmp_function'=>'callable(mixed,mixed):(int|bool)'], -'ArrayObject::uksort' => ['void', 'cmp_function'=>'callable(mixed,mixed):(int|bool)'], +'ArrayObject::uasort' => ['void', 'cmp_function'=>'callable(mixed,mixed):int'], +'ArrayObject::uksort' => ['void', 'cmp_function'=>'callable(mixed,mixed):int'], 'ArrayObject::unserialize' => ['void', 'serialized'=>'string'], 'arsort' => ['bool', '&rw_array_arg'=>'array', 'sort_flags='=>'int'], 'asin' => ['float', 'number'=>'float'], @@ -12317,7 +12317,7 @@ return [ 'TypeError::getPrevious' => ['Throwable|TypeError'], 'TypeError::getTrace' => ['array'], 'TypeError::getTraceAsString' => ['string'], -'uasort' => ['bool', '&rw_array_arg'=>'array', 'cmp_function'=>'callable(mixed,mixed):(int|bool)'], +'uasort' => ['bool', '&rw_array_arg'=>'array', 'cmp_function'=>'callable(mixed,mixed):int'], 'ucfirst' => ['string', 'str'=>'string'], 'UConverter::__construct' => ['void', 'destination_encoding'=>'string', 'source_encoding='=>'string'], 'UConverter::convert' => ['string', 'str'=>'string', 'reverse='=>'bool'], @@ -12366,7 +12366,7 @@ return [ 'ui\draw\text\font\fontfamilies' => ['array'], 'ui\quit' => ['void'], 'ui\run' => ['void', 'flags='=>'int'], -'uksort' => ['bool', '&rw_array_arg'=>'array', 'cmp_function'=>'callable(mixed,mixed):(int|bool)'], +'uksort' => ['bool', '&rw_array_arg'=>'array', 'cmp_function'=>'callable(mixed,mixed):int'], 'umask' => ['int', 'mask='=>'int'], 'UnderflowException::__clone' => ['void'], 'UnderflowException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'?Throwable|?UnderflowException'], @@ -12430,7 +12430,7 @@ return [ 'urlencode' => ['string', 'str'=>'string'], 'use_soap_error_handler' => ['bool', 'handler='=>'bool'], 'usleep' => ['void', 'micro_seconds'=>'int'], -'usort' => ['bool', '&rw_array_arg'=>'array', 'cmp_function'=>'callable(mixed,mixed):(int|bool)'], +'usort' => ['bool', '&rw_array_arg'=>'array', 'cmp_function'=>'callable(mixed,mixed):int'], 'utf8_decode' => ['string', 'data'=>'string'], 'utf8_encode' => ['string', 'data'=>'string'], 'V8Js::__construct' => ['void', 'object_name='=>'string', 'variables='=>'array', 'extensions='=>'array', 'report_uncaught_exceptions='=>'bool'],